Professional Documents
Culture Documents
IEC 61131 Standard Assignment #1
IEC 61131 Standard Assignment #1
Lecture 2 – part 1
Introduction to systematic PLC
programming
IEC 61131 standard
Assignment #1
Plant Model
Physical
Controller
Education
Programming
Maintenance Installation
•
Library
Increased connectivity (investment protection)
Function Block
"Heating"
Function
"LIMIT"
Function Block
"Feeding"
Function Function Block
"TEST" "Turning"
7
MAS411 Industrial IT (Spring 2017) 7
IEC standard Industrial IT
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
access paths
Task association
Access path association
FC FB
OB1
DB
FB FC
Operating System
OB - Organization Block
FC
FC - Function
FB - Function Block
DB – Data Block
FB
Memory
Other
OB’s like OB35 is timed interrupt
OB35 & OB100 Default period of 100 ms to be integrated
(IC’s block) with synchronized system’s
FC, FB and DB
• FC can be used for functions without memory
• FB can be used for «objects» consisting of both functions and
memory (DB). Data in the DB will be remembered after the
FB has finished.
• You can use the internal memory of the PLC (M0.0, M0.1,
M0.2, MD10, MW20, etc), but this space is limited.
• It is strongly recommended to use Data Blocks (DB). In this
way, one single PLC can run many programs created by
different people without memory conflicts.
BOOL boolean 1 0 to 1
SINT short integer 8 -128 to 127
IEC 61131-3 Elementary Data Types
A AND A OR
C C
B B
LSB MSB
0 1 2 3 4 5 6 7
BYTE value = X.0 + 2*X.1 + 4*X.2 + 8*X.3 + 16*X.4 + 32*X.5 + 64*X.6 + 128*X.7
Range: 0 to 255
X := 100; 1 2 4 8 16 32 64 128
0 0 1 0 0 1 1 0
X = 64 + 32 + 4 = 100
X.5
X.5 : = X.5 XOR 1;
1 2 4 8 16 32 64 128
0 0 1 0 0 0 1 0
X = 64 + 4 = 68;
A B C
-| |--|/|----------------( )
LD A
ANDN B
ST C
AND
A C
B
outputs
inputs actuators
sensors PLC motors, valves
Green NS – ST1
Yellow NS – ST2
Green EW – ST3
Yellow EW - ST4
4 seconds delay from
yellow to green
ST2 ST4
T1 ST1 T4
S1 pressed Delay 4 s
Transients: T1,T2,T3,T4,T5 T5
e.g. T1: transient from ST1 to ST2 FS
Alternative
Implementation Equivalent
with SR Block
T4 ST1
S Q
T5
T1
R
Statement List:
Example Equivalent
A(
O ST1
O T4
O T5
)
AN T1
= ST1
ST1 >=1
T4 >=1
T5 &
ST1
T1
• Tisserant, E. and Bessard, L. and De Sousa, M., “An open source IEC 61131-3 integrated development
environment"; IEEE (2007)
• De Sousa, M. and Carvalho, A., “Emerging Technologies and Factory Automation, 2003. Proceedings.
ETFA'03. IEEE Conference"; IEEE (2003)
• Berger, H., 2006, Automating with SIMATIC, 3rd edition, Publicis Corporate Publishing
• Olsson, G. og Piani, G., 1992, Computer Systems for Automation and Control, Prentice Hall
• http://www.automation.siemens.com/mcms/simatic-controller-software/en/step7/Pages/Default.aspx
• www.iec.ch
• www.PLCopen.org