Standards Compliance According To IEC 61131-3
Standards Compliance According To IEC 61131-3
Standards Compliance According To IEC 61131-3
1. Introduction:
The IEC 61131 standard is applicable for the programmable logic controllers (PLC).
In accordance with the rules of the European Union, this international standard has been
accepted in Germany as DIN EN 6 1131, in France as NF EN 6 1131, and in England as BS EN 6
1131.
The most important parts of the standard are quoted below. Quotes are in italics.
SIMATIC STEP 7 Lite only offers the programming languages STL/LAD/FBD. In accordance
with this, the following statements concerning the IEC languages ST / SFC do not apply to
STEP 7 Lite.
a) A standardized PLC system may not include any substitute or additional language element to
attain a standardized characteristic.
b) All implementation-dependent parameters must be specified according to Annex D.
c) User errors from Annex E must be reported; (for a partial program check, reference must be
made to incompleteness).
d) User errors during converting and/or during start-up must be reported, and appropriate
measures must be specified or introduced.
e) All characteristics not permissible or not present in the standard must be described as
"expansions."
f) These expansions must be treated in the same way as is specified for errors (as a test that
can be used as an option).
g) All implementation-independent characteristics from Appendix D must be handled as is
specified for errors (as a test that can be used as an option).
h) No standardized names with meanings that vary can be used for manufacturer-defined
characteristics.
i) The formal syntax of the text languages is described according to Annex A.
The STEP 7 programming software fulfills the requirements of the standard in points b), c),
d), e), h), i). In respect to a), there exist language elements for compatibility reasons with
STEP 5, which might be taken for additional elements. The f) and g) requirements are not
used for STEP 7.
The standard defines all standardized language elements in tables, the rows of which reference
the realized feature by number. The language elements which are realized in STEP 7 according
to the standard are specified below.
(A good knowledge of the norm mentioned is a prerequisite for understanding the following
tables.
The German version of DIN IEC 61131-3 : 1994-08 can be obtained from
Beuth Verlag GmbH, 10772 Berlin, Germany, Fax (..30) 2601-1231.
The International Standard IEC 1131-3 : First edition 1993-03 (English/French) can be obtained from
Central Office of IEC, 3 rue de Varembe, Geneve, Switzerland.)
2 Identifier features
3 Comment features
1 Comment
Note: STL only line comments starting with // and ending with new line.
4 Numeric literals
1 Integer literals
2 Real literals
3 Real literals with exponents
4 Base 2 literals
5 Base 8 literals (SCL only)
6 Base 16 literals *)
7 Boolean digits 0/1 (SCL only)
8 Boolean FALSE and TRUE
10 Keywords
1 BOOL
3 INT
4 DINT
10 REAL
12 TIME
13 DATE
14 TIME_OF_DAY or TOD
15 DATE_AND_TIME or DT
16 STRING *)
17 BYTE
18 WORD
19 DWORD
15 Memory Location and size prefix features for directly represented variables
1 I or E depending in the language setting
2 Q or A depending in the language setting
3 M
4 X *)
5 none
6 B
7 W
8 D
42 Declaration of actions
1 Any Boolean variable
43 Step/action association
1 Action block
2 Concatenated actions
3 Textual step body
45 Action qualifiers
2 N
3 R
4 S
5 L
6 D
Note: for detailed information see S7-Graph. S7-Graph has additional qualifiers for
actions with conditions.
46 Sequence evolution
1 Single sequence
2a Divergence of sequence selection
3 Convergence of sequence selection
4 Simultaneous sequences - divergence/convergence
5a Sequence skip
6a Sequence loop
7 Directional arrows
52 Operators
1-21 Note: different syntax, same functionality.
Vertical lines:
3 ISO/IEC 646 "vertical line" character
4 Graphic or semigraphic
Horizontal/vertical connection:
5 ISO/IEC 646 "plus" character
6 Graphic or semigraphic
8
Note: in FBD represented as coils.
61 Contacts
1 Normally open contact
3 Normally closed contact
5 Positive transition-sensing contact
7 Negative transition-sensing contact
62 Coils
1 Coil
2 Negated coil
3 SET (latch) coil
4 RESET (unlatch) coil
ANNEX A - Syntax
See manual for STL and SCL.
----------- I--------------------- - I- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
---
I Range of values of duration I - 24D_20H_31m_23.648s to
I I 24D_20H_31m_23.647s
- - - - - - - - - - - I - - - - - - - - - - - - - - - - - - - - -- - I- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
---
2.3 Data types I Range of values for variables of I - 24D_20H_31m_23.648s
I TIME type I 24D_20H_31m_23.647s
I Precision of representation of I milliseconds
I seconds in I
I TIME_OF_DAY and I
I DATE_AND_TIME types I
- - - - - - - - - - - I - - - - - - - - - - - - - - - - - - - -- - - I- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
---
I Maximum number of array I 6
I subscripts I max. 65536 Elements
I Maximum array size I dependent on memory limitations,
I Maximum number of structure I used data type.
I elements I
I Maximum structure size I max. 64 KB of data possible
I Maximum number of variables I approx. 4000 (estimated)
I per declaration I
----------- I-------------------- -- I- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
---
I Maximum number of I not available
I enumerated values I
- - - - - - - - - - - I - - - - - - - - - - - - - - - - - - - -- - - I- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
--
I Default maximum length of I
I STRING variables I 254
I Maximum allowed length of I
I STRING variables I 254
----------- I---------------------- I- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
---
2.4 Variables I Maximum number of hierarchical I
I levels I 2
I Logical or physical mapping I physical mapping
- - - - - - - - - - - I - - - - - - - - - - - - - - - - - -- - - - - I- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
---
I Maximum number of subscripts I 6
I Maximum range of subscript I
I values I 65 536 entries
I Maximum number of levels I
I of structures I 8
- - - - - - - - - - - I - - - - - - - - - - - - - - - - - -- - - - - I- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
---
I Initialization of system inputs I system : 0
I I user: definable initial values
---------- I--------------------- - I- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
---
I Maximum number of variables I
I per declaration I approx. 4000 (estimated)
- - - - - - - - - -- I - - - - - - - - - - - - - - - - - - - - - - I- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
---
2.5 Program I Information to determine I not available
organization I execution times of program I
units I organization units I
- - - - - - - - - - - I - - -- - - - - - - - - - - - - - - - - - - - I- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
---
I Method of function I symbols
I representation (names or I
I symbols) I
----------- I----- ----------------- I- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
---
I Maximum number of function I dependant on PLC
I specifications I 128 to 65536
----------- I----- ----------------- I- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
---
I Maximum number of inputs of I not available
I extensible functions I
- - - - - - - - - - - I - - - - - - - - - - - - -- - - - - - - - - - I- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
---
I Effects of type conversions on I not available
I accuracy I
- - - - - - - - - - - I - - - - - - - - - -- - - - - - - - - - - - - I- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
---
I Accuracy of functions of one I IEEE Floating point
I variable I
I Implementation of arithmetic I
I functions I
----------- I--- ------------------- I- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
---
I Maximum number of function I dependent on
I block specifications and I PLC 128 to 65536
I instantiations I
- - - - - - - - - - - I - - - - - - -- - - - - - - - - - - - - - - - I- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
---
I PVmin, PVmax of counters I -32568 to 32567
----------- I---- ------------------ I- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
---
I Number/length limitations on I
I SEND inputs and RCV outputs I
- - - - - - - - - - - I - - - - -- - - - - - - - - - - - - - - - - - I- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
---
I Program size limitations I dependant on the PLC memory,
I I from approx. 1000 instructions
I I per block
----------- I----- ----------------- I- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
---
2.6 Sequential I Timing and portability effects of I
function chart I execution control elements I
- - - - - - - - - - - I - - -- - - - - - - - - - - - - - - - - - - - I- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
---
I Precision of step elapsed time I 1 ms
I Maximum number of steps I 250
I per SFC I
----------- I----- ----------------- I- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
---
I Maximum number of transitions I 250
I per SFC and per step I
- - - - - - - - - - - I - - - -- - - - - - - - - - - - - - - - - - - I- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
---
I Action control mechanism I all qualifiers except for
I I "stored delayed"
----------- I---- ------------------ I- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
---
I Maximum number of actions per I 100
I step I
- - - - - - - - - - - I - - - -- - - - - - - - - - - - - - - - - - - I- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
---
I Graphic indication of step state I colors selectable
I Transition clearing time I <10 µs
I Maximum width of diverge/ I 8 parallel / alternative branches
I converge constructs I in 8 chains (64)
----------- I--------- ------------- I- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
---
2.7 I Contents of RESOURCE I integrated functions /
Configuration I libraries I FB and FC
elements I I
- - - - - - - - - - - I - - - - - - - - -- - - - - - - - - - - - - - I- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
---
I Maximum number of tasks Task I not available
I interval resolution I
I Pre-emptive or non-pre-emptive I
I scheduling I
- - - - - - - - - - - I - - - - - -- - - - - - - - - - - - - - - - - I- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
---
3.3 Structured I Maximum length of expressions I no restriction
Text I Partial evaluation of Boolean I
I expressions I no
----------- I----- ----------------- I- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
---
I Maximum length of statements I no restriction
- - - - - - - - - - - I - - - - - - - - - - - - - - - - - - - -- - - I- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
---
I Maximum number of CASE I no restriction
I selections I
- - - - - - - - - - - I - - - - - - - -- - - - - - - - - - - - - - - I- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
---
I Value of control variable upon I end value +1
I termination of FOR loop I
----------- I------- --------------- I- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
---
4 Graphic I Graphic/semigraphic I graphic
Languages I representation of restrictions on I
I network topology I
- - - - - - - - - - - I - - - - -- - - - - - - - - - - - - - - - - - I- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
---
I Evaluation order of I not available
I feedback loops I
- - - - - - - - - - - I - - - -- - - - - - - - - - - - - - - - - - - I- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
---