Professional Documents
Culture Documents
Ai 230 PLC1
Ai 230 PLC1
2.1 Instrumentation
2.2 Control
2.3 Programmable Logic Controllers
2.3.1 PLCs: Definition and Market
2.3.3 PLCs: Functions and construction
2.3.5 PLC Programming Languages
2.3.5.1 IEC 61131 Languages
2.3.5.2 Function blocks
2.3.5.3 Program Execution
2.3.5.4 Input / Output
2.3.5.5 Structured Text
2.3.5.6 Sequential Function Charts
2.3.5.7 Ladder Diagrams
2.3.5.8 Instruction Lists
2.3.5.9 Programming environment
Industrial Automation
2013
Formerly:
Today:
Function:
Distinguish
Instrumentation
flow meter, temperature, position,. but also actors (pump, )
Control
programmable logic controllers with digital peripherals & field bus
Visualization
Human Machine Interface (HMI) in PLCs (when it exists) is limited
to service help and control of operator displays
Industrial Automation
2013
Simple PLC
network
digital inputs
Industrial Automation
2013
PLC in a cabinet
CPU1
redundant field
bus connection
Industrial Automation
2013
CPU2
serial connections
inputs/outputs
Industrial Automation
2013
PLC: functions
Measure
Control (Command and Regulation)
Protection
Event Logging
Communication
Human interface
Industrial Automation
2013
PLC: Characteristics
large number of peripherals: 20..100 I/O per CPU, high density of wiring, easy assembly.
digital and analog Input/Output with standard levels
operate under harsh conditions, require robust construction, protection against dirt,
water and mechanical threats, electro-magnetic noise, vibration, extreme temperature
range (-30C..85C), sometimes directly located in the field.
programming: either very primitive with hand-help terminals on the target machine
itself, or with a laptop
network connection for programming on workstations and connection to SCADA
field bus connection for remote I/Os
primitive Human-Machine-Interface for maintenance, either through LCD-display or
connection of a laptop over serial lines (RS232) or wireless.
economical - 1000.- .. 15'000.- for a full crate.
the value is in the application software (licenses 20'000 ..50'000)
Industrial Automation
2013
Enterprise Network
Engineer
station
Operator
station
Supervisor
Station
gateway
direct I/O
Industrial Automation
2013
Field Stations
COM 2
CPU
I/O
gateway
COM
COM
CPU
I/O
I/O
COM
I/O
COM
CPU
I/O
I/O
I/O
I/O
CPU
PLC
Field Bus
FB
gateway
small PLC
data concentrators,
not programmable,
but configurable
COM1
I/O
Control Station
with Field Bus
Field Bus
COM
directly connected
I/O
I/O
I/O
I/O
PLC
COM 2
CPU
COM1
I/O
I/O
I/O
I/O
I/O
COM1
large
PLCs
CPU
Control Bus
(e.g. Ethernet)
Field Devices
Aftertheplantlost
electricpower,operators
couldreadinstrumentsonly
bypluggingintemporary
batteries
[IEEESpectrumNov2011
aboutFukushima]
Photo TEPCO
Industrial Automation
2013
Global players
Kinds of PLC
(1)
Compact
Monolithic construction
Monoprocessor
Fieldbus connection
(2)
Modular PLC
Modular construction (backplane)
One- or multiprocessor system
Fieldbus and LAN connection
Small Micro Memory Card (MMC) function possible
(3)
Soft-PLC
Linux or Windows NT or CE-based automation products
Direct use of CPU or co-processors
Industrial Automation
2013
Compact PLC
courtesy ABB
courtesy ABB
courtesy ABB
Thermocouple
inputs
binary I/Os,
CAN field bus
RS232 to HMI
courtesy Turbec
cost: 1000.-
Industrial Automation
2013
Modular PLC
can be tailored to needs of application
development
environment
RS232
LAN
backplane
parallel bus
courtesy ABB
fieldbus
Power Supply
primitive or no HMI
cost effective if the rack can be filled
CPU CPU
Analog I/O
Binary I/O
fieldbus
courtesy ABB
courtesy Backmann
Industrial Automation
2013
Compact or modular ?
field bus
extension
compact PLC
(fixed number of I/Os)
# I/O modules
Industrial Automation
2013
Industry- PC
courtesy INOVA
courtesy MPI
Wintel architecture
(but also: Motorola, PowerPC),
HMI (LCD..)
Limited modularity through mezzanine boards
(PC104, PC-Cards, IndustryPack)
Backplane-mounted versions with PCI or Compact-PCI
Industrial Automation
2013
23
4
3
3
12
2
PC as engineering workstation
PC as human interface (Visual Basic, Intellution, Wonderware)
PC as real-time processor
PC assisted by a Co-Processor (ISA- or PC104 board)
PC as field bus gateway to a distributed I/O system
I/O modules
Industrial Automation
2013
Protection devices
substation
measurement
transformers
communication to operator
Ir
Is
It
Ur
Us
UT
Human interface
for status
and
settings
Programming
interface
trip relay
Protection devices are highly specialized PLCs that measure the current and voltages in an electrical
substation, along with other statuses (position of the switches,) to detect situations that could
endanger the equipment (over-current, short circuit, overheat) and trigger the circuit breaker (trip) to
protect the substation.
In addition, they record disturbances and send the reports to the substations SCADA.
Sampling: 4.8 kHz, reaction time: < 5 ms.
costs: 5000
Industrial Automation
2013
Siemens
Hitachi
Number of Points
Memory
1024
10 KB
640
16 KB
Programming Language
Ladder Diagrams
Instruction List
Logic symbols
Hand-terminal
Ladder Diagrams
Instruction List
Logic symbols
Basic
Hand-terminal
Programming Tools
Download
2678 cm2
1000 cm2
Label surface
per line/point
5.3 mm2
7 characters
6 mm2
6 characters
Network
10 Mbit/s
19.2 kbit/s
Mounting
DIN rail
cabinet
Industrial Automation
2013
2.1 Instrumentation
2.2 Control
2.3 Programmable Logic Controllers
2.3.1 PLCs: Definition and Market
2.3.3 PLCs: Functions and construction
2.3.5 PLC Programming Languages
2.3.5.1 IEC 61131 Languages
2.3.5.2 Function blocks
2.3.5.3 Program Execution
2.3.5.4 Structured Text
2.3.5.5 Sequential Function Charts
2.3.5.6 Ladder Diagrams
2.3.5.7 Instruction Lists
2.3.5.8 Programming environment
Industrial Automation
2013
Implementation
Industrial Automation
2013
time
analog
variable
(e.g. 4..20mA)
time
filtering
&
scaling
sampling
analogdigital
converter
1
binary
variable
y(i)
filtering
011011001111
processing
sampling
(e.g. 0..24V)
0001111
counter
time
digitalanalog
converter
amplifier
analog
variable
e.g. -10V..10V
transistor
or
relay
binary
variable
non-volatile
memory
time
Industrial Automation
2013
CPU
Real-Time
Clock
ROM
flash
EPROM
serial port
controller
Ethernet
ethernet
controller
extension
bus
parallel bus
fieldbus
controller
buffers
analogdigital
converters
digitalanalog
converters
Digital Output
Digital
Input
signal
conditioning
power
amplifiers
relays
signal
conditioning
external
I/Os
field bus
Industrial Automation
2013
Industrial Automation
2013
2.1 Instrumentation
2.2 Control
2.3 Programmable Logic Controllers
2.3.1 PLCs: Definition and Market
2.3.3 PLCs: Functions and construction
2.3.5 Programming languages
2.3.5.1 IEC 61131 Languages
2.3.5.2 Function blocks
2.3.5.3 Program Execution
2.3.5.4 Input / Output
2.3.5.5 Structured Text
2.3.5.6 Sequential Function Charts
2.3.5.7 Ladder Diagrams
2.3.5.8 Instruction Lists
2.3.5.9 Programming environment
Industrial Automation
2013
Type 3 report
recommendation
IEC 61131-3
name change
70
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
Analog World
Pneumatic and electromechanical
controllers
I1
A
B
C
combinatorial
P1
P2
Regulation, controllers
continuous processes
sequential
discrete processes
Described by variables of nonoverlapping values. The transition from
one state to another is abrupt, it is
caused by an external event.
PLC
Industrial Automation
2013
"Real-Time" languages
Ladder Diagrams
Real-Time Java
instruction lists
Forth
GRAFCET
SDL
etc
could not impose themselves
Industrial Automation
2013
etc...
wide-spread in the control industry.
Now standardized as IEC 61131
PUMP
CALC
AUTO
>=1
IN1 OUT
DO
START STEP
T1
MAN_ON
STEP A
IN2
ACT
T2
STEP B
ACT
CALC
IN1 OUT
OUT
ACTION D1
D1_READY
ACTION D2
D2_READY
ACTION D3
D3_READY
ACTION D4
D4_READY
PUMP
IN2
MAN_ON
T3
CALC1
AUTO
http://www.isagraf.com
textual languages
Keyword
BOOL
SINT
INT
DINT
LINT
USINT
UINT
UDINT
ULINT
REAL
LREAL
TIME
DATE
TIME_OF_DAY or TOD
DATE_AND_TIME or DT
STRING
BYTE
WORD
DWORD
LWORD
Industrial Automation
2013
Data Type
Bits
Boolean
Short integer
Integer
Double integer
Long integer
Unsigned short integer
Unsigned integer
Unsigned double integer
Unsigned long integer
Real numbers
Long reals
Duration
Date (only)
Time of day (only)
Date and time of day
Character string
Bit string of length 8
Bit string of length 16
Bit string of length 32
Bit string of length 64
1
8
16
32
64
8
16
32
64
32
64
variable
variable
variable
variable
variable
8
16
32
64
More information:
http://www.plcopen.org/pages/tc1_standards/downloads/plcopen_iec61131-3_feb2014
.pptx
http://www.plcopen.org/pages/pc2_training/downloads/index.htm
Industrial Automation
2013
2.1 Instrumentation
2.2 Control
2.3 Programmable Logic Controllers
2.3.1 PLCs: Definition and Market
2.3.3 PLCs: Functions and construction
2.3.5 PLC Programming Languages
2.3.5.1 IEC 61131 Languages
2.3.5.2 Input & Output
2.3.5.3 Function blocks
2.3.5.4 Program Execution
2.3.5.5 Structured Text
2.3.5.6 Sequential Function Charts
2.3.5.7 Ladder Diagrams
2.3.5.8 Instruction Lists
2.3.5.9 Programming environment
Industrial Automation
2013
The Inputs and Outputs of the PLC must be connected to (typed) variables
IN_1
OUT_1
Industrial Automation
2013
predefined addresses
Industrial Automation
2013
2.1 Instrumentation
2.2 Control
2.3 Programmable Logic Controllers
2.3.1 PLCs: Definition and Market
2.3.3 PLCs: Functions and construction
2.3.5 PLC Programming Languages
2.3.5.1
IEC 61131 Languages
2.3.5.2
Input / Output
2.3.5.3
Function blocks language
2.3.5.4
Program Execution
2.3.5.5
Structured Text
2.3.5.6
Sequential Function Charts
2.3.5.7
Ladder Diagrams
2.3.5.8
Instruction Lists
2.3.5.9
Programming environment
Industrial Automation
2013
Industrial Automation
2013
&
external outputs
external inputs
Trigger
Running
Reset
Tempo
&
S Q
Spin
Industrial Automation
2013
input signals
Example
set point
measurement
parameters
PID
output signals
command
overflow
"continuously"
executing block,
independent,
no side effects
Example
Industrial Automation
2013
(set point)
(set point)
Industrial Automation
2013
Retroactions are an exception to this rule. In this case, the signal direction is
identified by an arrow (forbidden in some editors use global variables instead).
a
b
x
z
Industrial Automation
2013
1) Functions
- are part of the base library.
- have no memory.
Examples: and gate, adder, multiplier, selector,....
2) Elementary Function Blocks (EFB)
- are part of the base library
- have a memory ("static" data).
- may access global variables (side-effects !)
Examples: counter, filter, integrator,.....
3) Programs (Compound blocks)
- user-defined or application-specific blocks
- may have a memory
- may be configurable (control flow not visible in the FBD
Examples: PID controller, Overcurrent protection, Motor sequence
(a library of compound blocks may be found in IEC 61804-1)
Industrial Automation
2013
Industrial Automation
2013
Industrial Automation
2013
Basic blocks
Summator / Subtractor
Multiplier / Divider
Integrator / Differentiator
Filter
Minimal value, Maximum value
Radix
Function generator
Regulation Functions
P, PI, PID, PDT2 controller
Fixed set-point
Ratio and multi-component regulation
Parameter variation / setting
2-point regulation
3-point regulation
Output value limitation
Ramp generator
Adaptive regulation
Drive Control
Programmable Logic Controllers 2.3 - 44
MoveAbsolute
AXIS_REF
BOOL
REAL
REAL
REAL
REAL
REAL
MC_Direction
Axis
Execute
Position
Velocity
Acceleration
Deceleration
Jerk
Direction
Axis
Done
CommandAborted
Error
ErrorID
AXIS_REF
BOOL
BOOL
BOOL
WORD
Industrial Automation
2013
y
T
Truth Table:
Mathematical Formula:
Textual Description:
Industrial Automation
2013
x1
x2
x1
x2
previous state
dx
Kpx Kd
Ki xd
dt
0
Calculates the root mean square of the input with a filtering constant
defined in parameter FilterDelay
Programmable Logic Controllers 2.3 - 46
Industrial Automation
2013
Selector
Arithmetic Functions
Binary
selection
Select one of N
inputs depending
on input K
Flip-flop
Up counter
dominant set
Q:=S1|(Q&!R)
Trigger
dominant
reset
Q:=!R1&(Q|S)
rising edge
detector
CU input (rising
edges count up)
R reset counter
(CV:=0)
PV preset value
Q 1 if CV >= PV
CV current value
ADD
adder
SUB
subtractor
MUL
multiplier
DIV
divider
INT
Reset
PV
In
Integrator
(if reset)
Out := PV,
else
Out:= t *In +
Out
2.
In
ADD
(10)
In1
(1024)
Out
(initially 2)
DIV
In2
(2)
Remember:
INT
If (Reset) :
Out := PV,
Else:
Out := t *In + Out
Out
(initially 0)
INT
Reset = 0
PV
In
t1
CTU
CU
RESET Q
CV
PV
t2
t3 t4 t5 t6
t7
t8
CU
Reset = 0, PV = 3, CV = #up Q = (CV >= PV) ?
Flipflop: dominant set or reset?
4.
S
S1
R
S
R1
SR
Q
RS
Q
dominant set
Q:=S1|(Q&!R)
dominant
reset
Q:=!R1&(Q|S)
http://tinyurl.com/IAFunctionBlock
https://docs.google.com/forms/d/1ynmoXf3JTcRn2yv2_4bKhcK0HJNDYpiTnQQm13lDSso/viewform
Industrial Automation
2013
2.
2, 12, 22, 32, 42
If out is initially 0:
0, 0, 0, 0, 0
If out is initially 1024: 1024, 1024, 1024,
3.
CV = 1, 1, 2, 2, 3, 3, 4, 4
Q = 0, 0, 0, 0, 1, 1, 1, 1
4.
S1
R
SR
Q
dominant set
Q:=S1|(Q&!R)
Q
https://
docs.google.com/forms/d/1ynmoXf3JTcRn2yv2_4b
KhcK0HJNDYpiTnQQm13lDSso/viewform
Industrial Automation
2013
ftp://advantechdownloads.com/Traini
ng/KW%20training/
12s
75
0
-25
Industrial Automation
2013
12s
75
0
-25
Hints:
- Compute the slopes
- Use integrators, comparators, flip-flops and selectors
Industrial Automation
2013
Out
75.0
-25.0
+ 8.3
-20.0
=
Compound block
=
Industrial Automation
2013
M1
Y1
Segment B
X2
Y2
M1
X3
Industrial Automation
2013
M2
2.1 Instrumentation
2.2 Control
2.3 Programmable Logic Controllers
2.3.1 PLCs: Definition and Market
2.3.3 PLCs: Functions and construction
2.3.5 PLC Programming Languages
2.3.5.1 IEC 61131 Languages
2.3.5.2 Function blocks
2.3.5.3 Program Execution
2.3.5.4 Input / Output
2.3.5.5 Structured Text
2.3.5.6 Sequential Function Charts
2.3.5.7 Ladder Diagrams
2.3.5.8 Instruction Lists
2.3.5.9 Programming environment
Industrial Automation
2013
A
B
C
F1
F3
Machine Code:
The function blocks are
translated to machine language
(intermediate code, IL),
that is either interpreted or
compiled to assembly language
Blocks are executed in sequence,
normally from upper left to lower right
The sequence is repeated every t ms.
Industrial Automation
2013
X01
F2
X02
function
input1
input2
output
F4
Y
F1
A
B
X01
F2
X01
X
F3
B
C
X02
F4
X
X02
Y
Programmable Logic Controllers 2.3 - 57
write
outputs
X
execute
individual period
O
time
Industrial Automation
2013
Program configuration
resource
task
task
program
program
FB
task
task
program
program
FB
FB
FB
represented variables
access paths
communication function
Legend:
FB
Industrial Automation
2013
Parallel execution
Function blocks are particularly well suited for true multiprocessing (parallel processors).
The performance limit is given by the needed exchange of signals by shared memory.
Semaphores are not used since they could block an execution and make the concerned
processes non-deterministic.
processor
1
processor
2
processor
3
input/
output
shared
memory
shared
memory
shared
memory
shared
memory
Industrial Automation
2013
2.1 Instrumentation
2.2 Control
2.3 Programmable Logic Controllers
2.3.1 PLCs: Definition and Market
2.3.3 PLCs: Functions and construction
2.3.5 PLC Programming Languages
2.3.5.1 IEC 61131 Languages
2.3.5.2 Function blocks
2.3.5.3 Program Execution
2.3.5.4 Input / Output
2.3.5.5 Structured Text
2.3.5.6 Sequential Function Charts
2.3.5.7 Ladder Diagrams
2.3.5.8 Programming environment
Industrial Automation
2013
Structured Text
(StrukturierteTextsprache,langagelittralstructur)
Industrial Automation
2013
Data Types
Function Blocks are typed: the types of connection, input and output must match.
Elementary Types are defined either in Structured Text or in the FB configuration.
analog types:
binary types:
BOOL
BYTE
WORD
DWORD
1
8
16
32
REAL
LREAL
(Real32)
(Real64)
TYPE
ANALOG_CHANNEL_CONFIGURATION
STRUCT
RANGE: ANALOG_SIGNAL_RANGE;
MIN_SCALE : ANALOG_DATA ;
MAX_SCALE : ANALOG_DATA ;
END_STRUCT;
ANALOG_16_INPUT_CONFIGURATION :
STRUCT
SIGNAL_TYPE : ANALOG_SIGNAL_TYPE;
FILTER_CHARACTERISTIC : SINT (0.99)
CHANNEL: ARRAY [1..16] OF ANALOG_CHANNEL_CONFIGURATION;
END_STRUCT ;
END_TYPE
Industrial Automation
2013
IF(Switch_0ANDSwitch_1)THEN
Start_Motor:=1;
Start_Count:=Start_Count+1;
END_IF;
pos:=0;
WHILE((pos<100)
&s_arr[pos].value<>target))DO
pos:=pos+2;
String_tag.DATA[pos]:=
SINT_array[pos];
END_WHILE;
Industrial Automation
2013
element_num:=0;
SIZE(SINT_array,0,SINT_array_size);
WHILESINT_array[element_num]<>13DO
String_tag.DATA[element_num]:=SINT_array[element_num];
element_num:=element_num+1;
String_tag.LEN:=element_num;
IFelement_num=SINT_array_sizethen
exit;
END_IF;
END_WHILE;
Explanations:
1.Initialize element_num to 0.
2.Count the number of elements in SINT_array (array that contains the ASCII characters) and store the result in
SINT_array_size (DINT tag).
3.If the character at SINT_array[element_num] = 13 (carriage return), then stop.
4.Set String_tag[element_num] = the character at SINT_array[element_num].
5.Add 1 to element_num. This lets the controller check the next character in SINT_array.
6.Set the Length member of String_tag = element_num. (This records the number of characters in String_tag so
far.)
7.If element_num = SINT_array_size, then stop. (You are at the end of the array and it does not contain a
carriage return.)
8.Go to 3.
[http://literature.rockwellautomation.com/idc/groups/literature/documents/pm/1756-pm007_-en-p.pdf ]
Industrial Automation
2013
[http://literature.rockwellautomation.com/idc/groups/literature/documents/pm/1756-pm007_-en-p.pdf ]
Industrial Automation
2013
Solution:
SIZE(Inventory,0,Inventory_Items);
FORposition:=0toInventory_Items1DO
IFBarcode=Inventory[position].IDTHEN
Quantity:=Inventory[position].Qty;
EXIT;
END_IF;
END_FOR;
[http://literature.rockwellautomation.com/idc/groups/literature/documents/pm/1756-pm007_-en-p.pdf ]
Industrial Automation
2013
2.1 Instrumentation
2.2 Control
2.3 Programmable Logic Controllers
2.3.1 PLCs: Definition and Market
2.3.3 PLCs: Functions and construction
2.3.5 PLC Programming Languages
2.3.5.1 IEC 61131 Languages
2.3.5.2 Function blocks
2.3.5.3 Program Execution
2.3.5.4 Input / Output
2.3.5.5 Structured Text
2.3.5.6 Sequential Function Charts
2.3.5.7 Ladder Diagrams
2.3.5.8 Programming environment
Industrial Automation
2013
START STEP
T1
STEP A
STEP B
ACTION D1
D1_READY
ACTION D2
D2_READY
T2
Industrial Automation
2013
SFC: Elements
S0
event condition
("1" = always true)
"1"
transitions
Sa
states
token
Ea
Sb
Eb
Sc
State which come into existence with a token are called initial states.
All initial states receive exactly one token, the other states receive none.
Industrial Automation
2013
"1"
token switch : the token crosses the first active
Sa
Ea
Eb
Sc
Ec
Sb
Sd
Ed
Se
Ee
Industrial Automation
2013
Ef
Sg
Sf
Eg
State1
P1 State1_P1: do at enter
N
State1_N: do while
P0 State1_P0: do at leaving
Industrial Automation
2013
rather than define a P0 action reset timer., there is an implicit variable defined as
<state name>.t that express the time spent in that state.
S
S.t > t#5s
Sf
Industrial Automation
2013
intentional displacement to
avoid optical preference of a
path.
Priority:
Industrial Automation
2013
SFC: Exercise
Variables
Input:
I0, I1, I2, I3 (boolean);
Output:
Trap = {0: closed; 1: open}
Speed = {+20: +1 m/s; +1: +5 cm/s; 0: 0m/s}
Register = {0: closed; 1: open}
negative values: opposite direction
trap
I0
+speed
I1
I2
I3
4 - Go back to I0
5 - Open the trap and wait 5s.
repeat above steps indefinitely
Programmable Logic Controllers 2.3 - 78
Industrial Automation
2013
SFC: Structuring
Every flow chart without a token generator may be redrawn as a
structured flow chart (by possibly duplicating program parts)
Not structured
structured
A
a
b
d
B'
A'
Industrial Automation
2013
Solution:
assistance through the flow chart editor.
Function Blocks:
Continuous (time) control
Principle:
A flow chart taken as a whole can be considered a function
block with binary inputs (transitions) and binary outputs (states).
Industrial Automation
2013
procedure
xy(...);
begin
...
endxy;
extern (ST/IL)
function blocks
flow chart
Industrial Automation
2013
Function Block
a
"1"
S
R
c
NOT
b
d
Industrial Automation
2013
Flow Chart
init
"1"
a
b
Function Blocks
S
R
&
B
C
S
R
B
&
b
S
R
C
&
Industrial Automation
2013
V1
L1
V3
V2
upper
lower
MS
H1
heater
(actor)
temperature
(sensor)
V4
MD
Industrial Automation
2013
2.1 Instrumentation
2.2 Control
2.3 Programmable Logic Controllers
2.3.1 PLCs: Definition and Market
2.3.2 PLCs: Kinds
2.3.3 PLCs: Functions and construction
2.3.5 PLC Programming Languages
2.3.5.1 IEC 61131 Languages
2.3.5.2 Function blocks
2.3.5.3 Program Execution
2.3.5.4 Input / Output
2.3.5.5 Structured Text
2.3.5.6 Sequential Function Charts
2.3.5.7 Ladder Diagrams
2.3.5.8 Programming environment
Industrial Automation
2013
Output (actions)
Rung 0
Rung 1
Rung 2
Industrial Automation
2013
The contact plan or "ladder diagram" language allows an easy transition from the
traditional relay logic diagrams to the programming of binary functions.
It is well suited to express combinational logic
It is not suited for process control programming (there are no analog elements).
The main Ladder Diagrams symbols represent the elements:
make contact
break contact
relay coil
Industrial Automation
2013
bobine
Spule
origin:
electrical
circuit
make contact
(contact travail)
01
02
relay coil
(bobine)
03
50
break contact
(contact repos)
02
01
corresponding
ladder diagram
50
03
50
05
44
Industrial Automation
2013
rung
01
logic" equivalent
01
02
50
02
50
01
40
02
01
02
40
Industrial Automation
2013
textual expression
! 1 & 2 & ( 3 & ! 4 | ! 5 & 6 ) = 50
50
Or
N1 & 2 STR 3 & N4 STR N5 & 6
/ STR & STR = 50
0
2
1
3
10
4
6
11
Industrial Automation
2013
5
7
12
50
00
01
FUN 02
200
literal expression:
!00 & 01 FUN 02 = 200
Industrial Automation
2013
O = output
I = input
Source: http://teacher.buet.ac.bd/zahurul/ME6401/ME6401_PLC.pdf
Industrial Automation
2013
Address of variable
(module number, port
number)
Industrial Automation
2013
2.1 Instrumentation
2.2 Control
2.3 Programmable Logic Controllers
2.3.1 PLCs: Definition and Market
2.3.2 PLCs: Kinds
2.3.3 PLCs: Functions and construction
2.3.5 PLC Programming Languages
2.3.5.1 IEC 61131 Languages
2.3.5.2 Function blocks
2.3.5.3 Program Execution
2.3.5.4 Input / Output
2.3.5.5 Structured Text
2.3.5.6 Sequential Function Charts
2.3.5.7 Ladder Diagrams
2.3.5.8 Instructions Lists
2.3.5.9 Programming environment
Industrial Automation
2013
Industrial Automation
2013
Industrial Automation
2013
End:ST
speed3(*result*)
Instructions Lists is the most efficient way to write code, but only for specialists.
Otherwise, IL should not be used, because this language:
provides no code structuring
has weak semantics
is machine-dependent
Industrial Automation
2013
LDN BOOL2
ST RES
JMP continue
mark:
LD BOOL2
ST RES
continue:
Brackets (without)
LD 2
MUL 2
ADD 3
ST RES
(with)
LD 2
MUL(2
ADD 3
)
ST RES (* 10 is stored in RES*)
End:ST
speed3(*result*)
Temp1 = 10
Temp2 = 15
Speed1 = 50
Speed2 = 100
Industrial Automation
2013
b)
Temp1 = 10
Temp2 = 5
Speed1 = 50
Speed2 = 100
Ladder Diagram
A B
-| |--|/|----------------( )
Instruction List
?
Structured Text
C:= ?
http://tinyurl.com/IA61131
https://docs.google.com/forms/d/1lGkFXQrlwlnoKc8gUg-_ESAdtVy-RgIOLnFbkIOGNa8/viewform
Industrial Automation
2013
Ladder Diagram
A B
-| |--|/|----------------( )
AND
Instruction List
LD
ANDN
ST
Structured Text
http://tinyurl.com/IA61131
https://docs.google.com/forms/d/1lGkFXQrlwlnoKc8gUg-_ESAdtVy-RgIOLnFbkIOGNa8/viewform
Industrial Automation
2013
2.1 Instrumentation
2.2 Control
2.3 Programmable Logic Controllers
2.3.1 PLCs: Definition and Market
2.3.2 PLCs: Kinds
2.3.3 PLCs: Functions and construction
2.3.5 PLC Programming Languages
2.3.5.1 IEC 61131 Languages
2.3.5.2 Function blocks
2.3.5.3 Program Execution
2.3.5.4 Input / Output
2.3.5.5 Structured Text
2.3.5.6 Sequential Function Charts
2.3.5.7 Ladder Diagrams
2.3.5.8 Instructions Lists
2.3.5.9 Programming environment
Industrial Automation
2013
Industrial Automation
2013
symbols
workstation
code
firmware
download
variable
monitoring
and
forcing
for debugging
network
PLC
Industrial Automation
2013
Program maintenance
The source of the PLC program is generally on the laptop of the technician.
This copy is frequently modified, it is difficult to track the original in a process
database, especially if several people work on the same machine.
Therefore, it would be convenient to be able to reconstruct the source programs
out of the PLC's memory (called back-tracking, Rckdokumentation, reconstitution).
This supposes that the instruction lists in the PLC can be mapped directly to graphic
representations -> set of rules how to display the information.
Names of variables, blocks and comments must be kept in clear text, otherwise the
code, although correct, would not be readable.
For cost reasons, this is rarely implemented.
Industrial Automation
2013
Industrial Automation
2013
Industrial Automation
2013
Assessment
Which are programming languages defined in IEC 61131 and for what are they used ?
In a function block language, which are the two elements of programming ?
How is a PLC program executed and why is it that way ?
Draw a ladder diagram and the corresponding function block chart.
Draw a sequential chart implementing a 2-bit counter
Program a saw tooth waveform generator with function blocks
How are inputs and outputs to the process treated in a function block language ?
Write a program for a simple chewing-gum coin machine
Program a ramp generator for a ventilator speed control (soft start and stop in 5s)
Industrial Automation
2013