Professional Documents
Culture Documents
Programming Languages For PLC: International Standard IEC61131-3 (Part One)
Programming Languages For PLC: International Standard IEC61131-3 (Part One)
Robotics and
System
CONTROL Università degli Studi
di Modena e Reggio Emilia
Ingegneria Meccatronica
AA 2012/2013
IEC Standards
The International Electrotechnical Commission(IEC)
is a not-for-profit, non-governmental international
standards organization that prepares and publishes
International Standards for all electrical, electronic and
related technologies.
The IEC held its inaugural meeting on 26 June 1906,
following discussions between the British IEE, the
American Institute of Electrical and Electronics
Engineers (IEEE) (then called AIEE), and others.
It currently counts more than 130 countries.
Originally located in London, the commission moved to
its current headquarters in Geneva in 1948.
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
resource resource
Application configuration
(Software)
configuration
resource resource
FB FB FB FB
Application Software
(Run Time)
configuration
resource resource
task task task task
FB FB FB FB
FB FB FB FB
access paths
}
– Functions
Programming
– Function blocks
languages
– Programs
(Programming
Sequential Function Chart (SFC) elements } language)
Configuration elements
– Global variables
– Resources
– Access paths
– Tasks
C. Fantuzzi 3. I Linguaggi
C. Fantuzzi International Standard IEC61131-3
di Programmazione 13 13
The five IEC 61131-3
Programming languages
graphical languages
Function Block Diagram (FBD) Sequential Flow Chart (SFC)
AUTO CALC1
START STEP
DI CALC PUMP
<variable> := <expression>;
CASE <integer_expression> OF
<integer_value_1> : <code>;
<integer_value_2> : <code>;
...
ELSE
<code>;
END_CASE
WHILE <Boolean_Expr> DO
<code>
END_WHILE;
Trigger T &
S Spin
Running
Reset R
It mostly expresses combinatorial logic, but its blocks may have a memory
(e.g. flip-flops).
Example "continuously"
set point PID executing block,
independent,
measurement motor no side effects
c y
C. Fantuzzi 26
Ladder Diagram
make contact
origin: 02
electrical 01 relay coil
circuit (bobine)
03 50
break contact
(contact repos)
01 02
corresponding 50 rung
03
ladder diagram
50 50
02
Parallel + 01
40 01
02 40
02
1 2 3 4
%50 !N 1 & 2 STR 3 & N 4 STR N 5
5 6 & 6 / STR & STR = %50
0 1 4 5 12
%50 !0 & 1 STR 2 & 3 / STR STR 4
2 3 6 7 & 5 STR N 6 & 7
00 01
literal expression:
FUN 02 200
!00 & 01 FUN 02 = 200