Common elements
IEC compliance table for common elements:
Table No. |
Feature No. |
Description of Feature |
---|---|---|
1 |
2 |
Lower case characters |
3a |
Number sign (#) |
|
4a |
Dollar sign ($) |
|
5a |
Vertical bar (|) |
|
2 |
1 |
Upper case and numbers |
2 |
Upper and lower case, numbers, embedded underlines |
|
3 |
Upper and lower case , numbers, leading or embedded underlines |
|
3 |
1 |
Comments |
3a |
1 |
Pragmas |
4 |
1 |
Integer literals |
2 |
Real literals |
|
3 |
Real literals with exponents |
|
4 |
Base 2 literals |
|
5 |
Base 8 literals |
|
6 |
Base 16 literals |
|
7 |
Boolean zero and one |
|
8 |
Boolean |
|
9 |
Typed literals |
|
5 |
1 |
Single-byte character strings |
3 |
Single-byte typed string literals |
|
6 |
2 |
Dollar sign |
3 |
Single quote |
|
4 |
Line feed |
|
5 |
New line |
|
6 |
Form feed (page) |
|
7 |
Carriage return |
|
8 |
Tab |
|
9 |
Double quote |
|
7 |
1a |
Duration literals without underlines: short prefix |
1b |
long prefix |
|
2a |
Duration literals with underlines: short prefix |
|
2b |
long prefix |
|
8 |
1 |
Date literals (long prefix) |
2 |
Date literals (short prefix) |
|
3 |
Time of day literals (long prefix) |
|
4 |
Time of day literals (short prefix) |
|
5 |
Date and time literals (long prefix) |
|
5 |
Date and time literals (short prefix) |
|
10 |
1 |
Data type |
3 |
Data type |
|
4 |
Data type |
|
7 |
Data type |
|
8 |
Data type |
|
10 |
Data type |
|
12 |
Data type |
|
13 |
Data type |
|
14 |
Data type |
|
15 |
Data type |
|
16 |
Data type |
|
17 |
Data type |
|
18 |
Data type |
|
19 |
Data type |
|
12 |
4 |
Array data types |
5 |
Structured data types |
|
14 |
4 |
Initialization of array data types |
6 |
Initialization of derived structured data types |
|
15 |
1 |
Input location |
2 |
Output location |
|
3 |
Memory location |
|
4 |
Single bit size (X Prefix) |
|
5 |
Single bit size (No Prefix) |
|
7 |
Word (16 bits) size |
|
8 |
Double word (32 bits) size |
|
9 |
Long (quad) word (64 bits) size |
|
17 |
3 |
Declaration of locations of symbolic variables (Note 5) |
4 |
Array location assignment (Note 5) |
|
5 |
Automatic memory allocation of symbolic variables |
|
6 |
Array declaration (Note 11) |
|
7 |
Retentive array declaration (Note 11) |
|
8 |
Declaration for structured variables |
|
18 |
1 |
Initialization of directly represented variables (Note 11) |
3 |
Location and initial value assignment to symbolic variables |
|
4 |
Array location assignment and initialization |
|
5 |
Initialization of symbolic variables |
|
6 |
Array initialization (Note 11) |
|
7 |
Retentive array declaration and initialization (Note 11) |
|
8 |
Initialization of structured variables |
|
9 |
Initialization of constants |
|
10 |
Initialization of function block instances |
|
19 |
1 |
Negated input |
2 |
Negated output |
|
19a |
1 |
formal function / function block call |
2 |
non-formal function / function block call |
|
20 |
1 |
Use of |
2 |
Usage without |
|
20a |
1 |
In-out variable declaration (textual) |
2 |
In-out variable declaration (graphical) |
|
3 |
Graphical connection of in-out variable to different variables (graphical) |
|
21 |
1 |
Overloaded functions |
2 |
Typed functions |
|
22 |
1 |
|
2 |
|
|
3 |
|
|
4 |
|
|
23 |
1 |
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
|
9 |
|
|
10 |
|
|
11 |
|
|
24 |
12 |
|
13 |
|
|
14 |
|
|
15 |
|
|
16 |
|
|
17 |
|
|
18 |
|
|
25 |
1 |
|
2 |
|
|
3 |
|
|
4 |
|
|
26 |
5 |
|
6 |
|
|
7 |
|
|
8 |
|
|
27 |
1 |
|
2a |
|
|
2b |
|
|
3 |
|
|
4 |
|
|
28 |
5 |
|
6 |
|
|
7 |
|
|
8 |
|
|
9 |
|
|
10 |
|
|
29 |
1 |
|
2 |
|
|
3 |
|
|
4 |
|
|
6 |
|
|
7 |
|
|
8 |
|
|
9 |
|
|
30 |
1a |
|
1b |
|
|
2b |
|
|
3b |
|
|
4a |
|
|
4b |
|
|
5b |
|
|
6b |
|
|
7b |
|
|
8b |
|
|
9b |
|
|
10a |
|
|
10b |
|
|
11a |
|
|
11b |
|
|
33 |
1a |
|
2a |
|
|
2b |
|
|
3a |
|
|
4a |
|
|
4b |
|
|
4c |
|
|
34 |
1 |
Bistable Function Block (set dominant) |
2 |
Bistable Function Block (reset dominant) |
|
35 |
1 |
Rising edge detector |
2 |
Falling edge detector |
|
36 |
1a |
|
1b |
|
|
1d |
|
|
2a |
|
|
2b |
|
|
2d |
|
|
3a |
|
|
3b |
|
|
3d |
|
|
37 |
1 |
|
2a |
|
|
3a |
|
|
39 |
19 |
Use of directly represented variables |
40 |
1 |
Step and initial step - Graphical form with directed links |
3a |
Step flag – General form |
|
4 |
Step elapsed time– General form |
|
41 |
7 |
Use of transition name |
7a |
Transition condition linked through transition name using LD language |
|
7b |
Transition condition linked through transition name using FBD language |
|
7c |
Transition condition linked through transition name using IL language |
|
7d |
Transition condition linked through transition name using ST language |
|
42 |
1 |
Any Boolean variable declared in
a |
2l |
Graphical declaration of action in LD language |
|
2f |
Graphical declaration of action in FBD language |
|
3s |
Textual declaration of action in ST language |
|
3i |
Textual declaration of action in IL language |
|
43 |
1 |
Action block physically or logically adjacent to the step (Note 7) |
2 |
Concatenated action blocks physically or logically adjacent to the step (Note 8) |
|
44 |
1 |
Action qualifier in action block supported |
2 |
Action name in action block supported |
|
45 |
1 |
|
2 |
Qualifier |
|
3 |
Qualifier |
|
4 |
Qualifier |
|
5 |
Qualifier |
|
6 |
Qualifier |
|
7 |
Qualifier |
|
9 |
Qualifier |
|
11 |
Qualifier |
|
12 |
Qualifier |
|
45a |
2 |
Action control without "final scan" |
46 |
1 |
Single sequence |
2a |
Divergence of sequence selection: left-to-right priority of transition evaluations |
|
3 |
Convergence of sequence selection |
|
4 |
Simultaneous sequences - divergence and convergence |
|
5a |
Sequence skip: left-to-right priority of transition evaluations |
|
6a |
Sequence loop: left-to-right priority of transition evaluations |
|
49 |
1 |
|
5a |
Periodic |
|
5b |
Non-periodic |
|
6a |
|
|
6c |
|
|
50 |
5a |
Non-preemptive scheduling (Note 13) |
5b |
Preemptive scheduling (Note 14) |
Note 1
List of type conversion functions:
BOOL_TO_BYTE
,BOOL_TO_DINT
,BOOL_TO_INT
,BOOL_TO_REAL
,BOOL_TO_TIME
,BOOL_TO_UDINT
,BOOL_TO_UINT
,BOOL_TO_WORD
,BOOL_TO_DWORD
BYTE_TO_BOOL
,BYTE_TO_DINT
,BYTE_TO_INT
,BYTE_TO_REAL
,BYTE_TO_TIME
,BYTE_TO_UDINT
,BYTE_TO_UINT
,BYTE_TO_WORD
,BYTE_TO_DWORD
,BYTE_TO_BIT
DINT_TO_BOOL
,DINT_TO_BYTE
,DINT_TO_INT
,DINT_TO_REAL
,DINT_TO_TIME
,DINT_TO_UDINT
,DINT_TO_UINT
,DINT_TO_WORD
,DINT_TO_DWORD
,DINT_TO_DBCD
,DINT_TO_STRING
INT_TO_BOOL
,INT_TO_BYTE
,INT_TO_DINT
,INT_TO_REAL
,INT_TO_TIME
,INT_TO_UDINT
,INT_TO_UINT
,INT_TO_WORD
,INT_TO_BCD
,INT_TO_DBCD
,INT_TO_DWORD
,INT_TO_STRING
REAL_TO_BOOL
,REAL_TO_BYTE
,REAL_TO_DINT
,REAL_TO_INT
,REAL_TO_TIME
,REAL_TO_UDINT
,REAL_TO_UINT
,REAL_TO_WORD
,REAL_TO_DWORD
,REAL_TO_STRING
TIME_TO_BOOL
,TIME_TO_BYTE
,TIME_TO_DINT
,TIME_TO_INT
,TIME_TO_REAL
,TIME_TO_UDINT
,TIME_TO_UINT
,TIME_TO_WORD
,TIME_TO_DWORD
,TIME_TO_STRING
UDINT_TO_BOOL
,UDINT_TO_BYTE
,UDINT_TO_DINT
,UDINT_TO_INT
,UDINT_TO_REAL
,UDINT_TO_TIME
,UDINT_TO_UINT
,UDINT_TO_WORD
,UDINT_TO_DWORD
UINT_TO_BOOL
,UINT_TO_BYTE
,UINT_TO_DINT
,UINT_TO_INT
,UINT_TO_REAL
,UINT_TO_TIME
,UINT_TO_UDINT
,UINT_TO_WORD
,UINT_TO_DWORD
,WORD_TO_BOOL
,WORD_TO_BYTE
,WORD_TO_DINT
,WORD_TO_INT
,WORD_TO_REAL
,WORD_TO_TIME
,WORD_TO_UDINT
,WORD_TO_UINT
,WORD_TO_BIT
,WORD_TO_DWORD
DWORD_TO_BOOL
,DWORD_TO_BYTE
,DWORD_TO_DINT
,DWORD_TO_INT
,DWORD_TO_REAL
,DWORD_TO_TIME
,DWORD_TO_UDINT
,DWORD_TO_UINT
,DWORD_TO_BIT
,
The effects of each conversion are described in the help text supplied with the Base Library.
Note 2
List of types for truncate function:
REAL_TRUNC_DINT
,REAL_TRUNC_INT
,REAL_TRUNC_UDINT
,REAL_TRUNC_UINT
The effects of each conversion are described in the help text supplied with the Base Library.
Note 3
List of types for BCD conversion function:
BCD_TO_INT
,DBCD_TO_INT
,DBCD_TO_DINT
List of types for BCD conversion function:
INT_TO_BCD
,INT_TO_DBCD
,DINT_TO_DBCD
The effects of each conversion are described in the help text supplied with the Base Library.
Note 4
List of types for String functions:
LEN_INT
,LEFT_INT
,RIGHT_INT
,MID_INT
,INSERT_INT
,DELETE_INT
,REPLACE_INT
,FIND_INT
Note 5
A variable can be mapped to a directly represented variable if they stricly have the same type.
This means that a variable of type INT
can only be mapped on a directly represented variable of type INT
.
But there is one exception to this rule: for
internal word (%MW<i>
), Flat word (%IW<i>
) and constant word (%KW<i>
) memory variables
any declared variable type is allowed.
Allowed mappings:
Syntax |
Data type |
Allowed variable types |
|
---|---|---|---|
Internal bit |
|
|
|
Internal word |
|
|
All types are allowed except:
|
Internal double word |
|
|
No mapping, because of overlapping
between |
Internal real |
|
|
No mapping, because of overlapping
between |
Constant word |
|
|
All types are allowed except:
|
Constant double word |
|
|
No mapping, because of overlapping
between This kind of variables only exists on Premium PLCs. |
Constant real |
|
|
No mapping, because of overlapping
between This kind of variables only exists on Premium PLCs. |
System bit |
|
|
|
System word |
|
|
|
System double word |
|
|
|
Flat bit |
|
|
This kind of variables only exists on Qantum PLCs. |
Flat word |
|
|
All types are allowed except:
This kind of variables only exists on Qantum PLCs. |
Common word |
|
|
|
Topological variables |
|
... |
Same Type (On some digital
I/O modules it is allowed to map arrays of |
Extract bits |
|
|
|
Note 6
Only operator
"+
" (for ADD), "-
" (for SUB), "*
" (for MUL) or "/
" (for DIV) in ST language.
Note 7
This feature is only presented in the "expanded view" of the chart.
Note 8
This feature is presented in the "expanded view" of the chart, but not as concatenated blocks, but as a scrollable list of action names with associated qualifiers inside one single block symbol.
Note 9
There is only a one-to-one mapping of program instance to task. The textual format is replaced by a property dialog.
Note 10
The textual format is replaced by a property dialog.
Note 11
All variables
are retentive (RETAIN
qualifier implicitly assumed
in variable declarations).
Note 12
The textual format is replaced by the project browser representation.
Note 13
Using Mask-IT
instruction, the user is able to get a non-preemptive behaviour. You
will find MASKEVT
(Global EVT masking) and UNMASKEVT
(Global EVT unmasking) in the System functions
of the libset.
Note 14
By default, the multi-task system is preemptive.