Sunteți pe pagina 1din 14

PLC Architecture Industrial Automation

Programmable Logic Controller


PLC

Prof. José A. Rodríguez Mondéjar UPCO ICAI Departamento de Electrónica y Automática 1

PLC Architecture Industrial Automation

PLC Definition
• PLC is a
• user friendly,
• microprocessor
based,
• specialized computer
• that carries out
control functions
• of many types
• and levels of
complexity

DEFINE THE PLC ARCHITECTURE


Prof. José A. Rodríguez Mondéjar UPCO ICAI Departamento de Electrónica y Automática 2

1
PLC Architecture Industrial Automation

More PLC characteristics (I)


Typical wired relay control
• Flexibility
– Same PLC model in
different machines
– Implementing changes and
correct errors
• Change program
• Versus rewiring
connections

Prof. José A. Rodríguez Mondéjar UPCO ICAI Departamento de Electrónica y Automática 3

PLC Architecture Industrial Automation

More PLC characteristics (II)


• Lower cost
– Increased technology makes it possible to condense more
functions into smaller and less expensive package.
• Pilot running
– A PLC based control can be prerun and evaluated in the office or
lab.
• Reliability and Maintainability
– Solid-states devices are more reliable, in general, than mechanical
systems or relays and timers.
– Consequently, the control system maintenance costs are low and
downtime is minimal.
• Ladder or Boolean Programming Method
– The PLC programming can be accomplished in the ladder mode
(similar to wired relay) by an electrician or technician (not complex
automation)

Prof. José A. Rodríguez Mondéjar UPCO ICAI Departamento de Electrónica y Automática 4

2
PLC Architecture Industrial Automation

Basic Module Architecture


• Central processing unit (CPU)
– The heart of the system: processes data, carries out the logic
operations
• I/O Modules
– Input modules
• Takes input front the outside world (plant)
• Protects the CPU from the outside world (Optical Isolation)
– Output modules
• Provides output voltages to energize motor starters, lights, coils, valves
Power supply

I/O modules

CPU

Prof. José A. Rodríguez Mondéjar UPCO ICAI Departamento de Electrónica y Automática 5

PLC Architecture Industrial Automation

Connection example (motor control)


• Integrated CPU

VCC VCC
General
E124.0 A124.0
Run
PLC
E124.1 A124.1 Motor relay
Temper BTemper
E124.2 A124.2

GND GND

Prof. José A. Rodríguez Mondéjar UPCO ICAI Departamento de Electrónica y Automática 6

3
PLC Architecture Industrial Automation

Modular architecture
• The PLCs are expandable. Expansion modules contain
additional inputs and outputs. These are connected to the
base unit using a ribbon connector or a rack.

Prof. José A. Rodríguez Mondéjar UPCO ICAI Departamento de Electrónica y Automática 7

PLC Architecture Industrial Automation

PLC Digital Input Module layout


• The input module perform four tasks electronically:
– Senses the presence or absence of an input signal at each of its
input terminals.
• The input signal tells what switch, sensor or other signal is on or off in
the process being controlled
• Standard levels: 24VDC, 110AC, 220AC, 4-20mA
– Converts the signal for on, or high to a DC level usable
– Carries out electronic isolation
– Produces an output to be sensed by the PLC CPU

Optoisolator Filter (50 Khz) Converter Terminal


Prof. José A. Rodríguez Mondéjar UPCO ICAI Departamento de Electrónica y Automática 8

4
PLC Architecture Industrial Automation

PLC Digital Output Module Layout


• A DC signal from the CPU is converted through each
module section (terminal) to a usable output voltage, either
AC or DC (voltage or current)
– Standard levels: 24VDC, 110AC, 220AC, 4-20mA

Logic
Input Optoisolator Converter

Prof. José A. Rodríguez Mondéjar UPCO ICAI Departamento de Electrónica y Automática 9

PLC Architecture Industrial Automation

Digital Output module Classification


• Relay
• Transistor

Prof. José A. Rodríguez Mondéjar UPCO ICAI Departamento de Electrónica y Automática 10

5
PLC Architecture Industrial Automation

Other modules
• Analog Input/Output modules
– ± 10 volts
– 0...10 volts
– 0...20 mA
– 4...20 mA
– Important point: speed acquisition / precision
• PID module
• Network module
• ASCII module

Prof. José A. Rodríguez Mondéjar UPCO ICAI Departamento de Electrónica y Automática 11

PLC Architecture Industrial Automation

Internal Block Diagram of a PLC (I)

TIMERS
NETWORK Processor ROM RAM
COUNTERS

INPUT CLOCK OUTPUT


MODULES MODULES

Prof. José A. Rodríguez Mondéjar UPCO ICAI Departamento de Electrónica y Automática 12

6
PLC Architecture Industrial Automation

Internal Block Diagram of a PLC (II)


• Processor
– The computer center that carries out the logic operations (also
arithmetic)
• Memory
– The area of the CPU in which information is stored and
manipulated
– ROM (Read Only Memory)
• Operating System
• System Data
– RAM (Random Access Memory)
• User data
• Copy of input signal states
• Copy of output signal states
• Counters
• Timers
• User program

Prof. José A. Rodríguez Mondéjar UPCO ICAI Departamento de Electrónica y Automática 13

PLC Architecture Industrial Automation

Internal Block Diagram of a PLC (III)


• Clock
– Clock speed determines how quickly microprocessor executes
instructions.
• Communications
– RS232
• Programming equipment: Personal computer
• Short distance
– RS485 or similar
• Connection with other equipment
• Long distance/noise immunity
– PROFIBUS
– FIPBUS
– MODBUS
– MPI

Prof. José A. Rodríguez Mondéjar UPCO ICAI Departamento de Electrónica y Automática 14

7
PLC Architecture Industrial Automation

How does PLC work?


• Like a computer:
– Operating System (Real Time Operating System RTOS)
– Executes User Control Program
main() {
PLC
int i1, i2, f;

while (1) {
VCC Read Inputs; VCC

E124.0 A124.0
Input1
E124.1 A124.1
Input2 Execute user program;
E124.2 A124.2

GND Write Outputs; GND

}
}

Prof. José A. Rodríguez Mondéjar UPCO ICAI Departamento de Electrónica y Automática 15

PLC Architecture Industrial Automation

PLC Example Input1 Input2

• Like a computer:
– Keyboard is the input signals for plant
– Screen is the output signals to the plant
main() {
PLC
int i1, i2, f;

while (1) {
VCC i1=Read(Input1); VCC

E124.0 i2=Read(Input2); A124.0


Input1
E124.1 A124.1
Input2 f=i1&&i2; %AND
E124.2 A124.2

GND Write(f,Output1) GND

}
} User Control Program

Prof. José A. Rodríguez Mondéjar UPCO ICAI Departamento de Electrónica y Automática 16

8
PLC Architecture Industrial Automation

Example running
Event Loss
Scan time
Input1

Input2
Output1

i1
i2

CPU

USER Null Task


SO CONTROL
PROGRAM Read Inputs Write Outputs

Prof. José A. Rodríguez Mondéjar UPCO ICAI Departamento de Electrónica y Automática 17

PLC Architecture Industrial Automation

SCAN CYCLE

INPUT OUTPUT
INPUT USER OUTPUT
STATUS STATUS
TERMINALS PROGRAM TERMINALS
TABLE TABLE

PROGRAM SCAN:
INPUT SCAN: OUTPUT SCAN:
During program scan,
Input terminals Data associated
data in input table is
are read and with output
applied to user program,
inputs status status table is
program is executed and
table is updated transferred to
output table is updated
accordingly output terminals
accordingly

Prof. José A. Rodríguez Mondéjar UPCO ICAI Departamento de Electrónica y Automática 18

9
PLC Architecture Industrial Automation

IMPORTANT
• ANY changes in the status of input devices during the
program or output scan are not recognized until the next
input scan
• Data changes in the output table are not transferred to the
output terminal during the input and program scans. The
transfer affecting the output devices takes place only
during the output scan.

Prof. José A. Rodríguez Mondéjar UPCO ICAI Departamento de Electrónica y Automática 19

PLC Architecture Industrial Automation

Do you understand?
• Output?
– 0 permanent
– 1 permanent
– 0101010… main() {
int i1, i2, f; PLC
while (1) {
i1=Read(Input1);
VCC VCC
i2=Read(Input2);
E124.0 A124.0
Input1
E124.1 f=i1&&i2; %AND A124.1
Input2
E124.2 f=i1||i2; %OR A124.2

GND GND
Write(f,Output1)

}
}
Prof. José A. Rodríguez Mondéjar UPCO ICAI Departamento de Electrónica y Automática 20

10
PLC Architecture Industrial Automation

HOW TO PROGRAM A PLC?


• High level language?
– C Language Control System Process
– Difficult to program
• Pointers!!
• Language near technicians PLC
background
– Easy to program
– Standard
– Flexible
Serial
• Easy and complex languages
in the same PLC
communication

Prof. José A. Rodríguez Mondéjar UPCO ICAI Departamento de Electrónica y Automática 21

PLC Architecture Industrial Automation

IEC 1131-3 Standard


• The IEC standard specifies the following programming
languages
Sequential Function Chart
Instruction List (GRAFCET) Structured Text
AND A 0 Init

ANDN B C:= A AND NOT B


1 Stopped
= C
Run

2 Fill
Function Block Diagram Full Ladder Diagram
3 Heat
AND A B C
Hot
A C -| |--|/|----------------( )
4 Empty out
B Empty

Prof. José A. Rodríguez Mondéjar UPCO ICAI Departamento de Electrónica y Automática 22

11
PLC Architecture Industrial Automation

Memory model
• Components of the PLC
program: 15
14
– Instructions MD12
13
– Data: Memory 12
• Matrix 11
10
– 8 bits x Address number
9 MW8
– 16 bits x Address number 8
• Accessing methods 7
6
– Bit M0.3
5 MB5 M3.2
• Work with logical variables
4
– Byte: MB0 3
– Word: MW0, MW2. 2 MD0
1
– Long word: MD0, MD4 MW0
0 7 6 5 4 3 2 1 0 MB0
• Telemecanique uses 8 bit
– %MW0 8x16 Memory

Prof. José A. Rodríguez Mondéjar UPCO ICAI Departamento de Electrónica y Automática 23

PLC Architecture Industrial Automation

Variable Types or Table Types User Input Output


• Memory Table Table Table
– M0.1, MB3, MW4, MD0 M255 E127 A127
– User variables
• Digital Input Table
·····
·····
·····

– E124.0, EB124, EW124 (Siemens)


– I124.0, IB124, IW124 (IEC)
– Remember the difference between real M1 E1 A1
input and input variable in the program. M0 E0 A0
• Digital Ouput Table
Timers Counters
– A124.0, AB124, AW124 (Siemens)
T127 Z63
– Q124.0, QB124, QW124 (IEC)
• Timer Table
– T1 (16 bits timer
·····
·····

– The value increases by clock


• Counter Table
– Z5 (16 bits counter T1 Z1
T0 Z0
– Event count
Prof. José A. Rodríguez Mondéjar UPCO ICAI Departamento de Electrónica y Automática 24

12
PLC Architecture Industrial Automation

Ladder Diagram Example


Symbol Programming
E124.0 E124.1 E124.2 A124.0 General Run Térmico Motor

E124.2 A124.1 Térmico BTérmico

Symbol definition
increases program
readable
VCC VCC
General
E124.0 A124.0
Run
PLC
E124.1 A124.1 Motor
Térmico BTérmico
E124.2 A124.2

GND GND

Prof. José A. Rodríguez Mondéjar UPCO ICAI Departamento de Electrónica y Automática 25

PLC Architecture Industrial Automation

Ladder Diagram is only a representation


• The program execution is not Segmento 1: Control A124.0
3
parallel 1
• The execution is instruction
E124.0 A124.0

by instruction: in sequence
– The brain of a PLC if a E124.1

microprocessor
2

Segmento 2: Control A124.1 7


4 E124.1 A124.1

5 E124.2

6
E124.3

Prof. José A. Rodríguez Mondéjar UPCO ICAI Departamento de Electrónica y Automática 26

13
PLC Architecture Industrial Automation

Choose a PLC
• Memory size
• Scan Time/Maximum
number of instructions
• Integrated functions (PID)
• I/O Capability
– Different interfaces with real
world
• Flexibility/expandability
– Maximum number of IO
Signals that PLC can
control
• Networking
– Non standard protocol
– Vs standard protocol
• Cost
• Serviceability/support
• Training/Documentation

Prof. José A. Rodríguez Mondéjar UPCO ICAI Departamento de Electrónica y Automática 27

14

S-ar putea să vă placă și