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 FALSE and TRUE

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 BOOL

3

Data type INT

4

Data type DINT

7

Data type UINT

8

Data type UDINT

10

Data type REAL

12

Data type TIME

13

Data type DATE

14

Data type TIME_OF_DAY or TOD

15

Data type DATE_AND_TIME or DT

16

Data type STRING

17

Data type BYTE

18

Data type WORD

19

Data type DWORD

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 EN and ENO shown in LD

2

Usage without EN and ENO shown in FBD

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

*_TO_** (Note 1)

2

TRUNC (Note 2)

3

*_BCD_TO_** (Note 3)

4

**_TO_BCD_* (Note 3)

23

1

ABS function

2

SQRT function

3

LN function

4

LOG function

5

EXP function

6

SIN function

7

COS function

8

TAN function

9

ASIN function

10

ACOS function

11

ATAN function

24

12

ADD function

13

MUL function

14

SUB function

15

DIV function

16

MOD function

17

EXPT function

18

MOVE function

25

1

SHL function

2

SHR function

3

ROR function

4

ROL function

26

5

AND function

6

OR function

7

XOR function

8

NOT function

27

1

SEL function

2a

MAX function

2b

MIN function

3

LIMIT function

4

MUX function

28

5

GT function

6

GE function

7

EQ function

8

LE function

9

LT function

10

NE function

29

1

LEN function (Note 4)

2

LEFT function (Note 4)

3

RIGHT function (Note 4)

4

MID function (Note 4)

6

INSERT function (Note 4)

7

DELETE function (Note 4)

8

REPLACE function (Note 4)

9

FIND function (Note 4)

30

1a

ADD function (Note 6)

1b

ADD_TIME function

2b

ADD_TOD_TIME function

3b

ADD_DT_TIME function

4a

SUB function (Note 6)

4b

SUB_TIME function

5b

SUB_DATE_DATE function

6b

SUB_TOD_TIME function

7b

SUB_TOD_TOD function

8b

SUB_DT_TIME function

9b

SUB_DT_DT function

10a

MUL function (Note 6)

10b

MULTIME function

11a

DIV function function (Note 6)

11b

DIVTIME function

33

1a

RETAIN qualifier for internal variables (Note 11)

2a

RETAIN qualifier for output variables (Note 11)

2b

RETAIN qualifier for input variables (Note 11)

3a

RETAIN qualifier for internal function blocks (Note 11)

4a

VAR_IN_OUT declaration (textual)

4b

VAR_IN_OUT declaration and usage (graphical)

4c

VAR_IN_OUT declaration with assignment to different variables (graphical)

34

1

Bistable Function Block (set dominant)

2

Bistable Function Block (reset dominant)

35

1

Rising edge detector

2

Falling edge detector

36

1a

CTU (Up-counter) function block

1b

CTU_DINT function block

1d

CTU_UDINT function block

2a

CTD (Down-counter) function block

2b

CTD_DINT function block

2d

CTD_UDINT function block

3a

CTUD (Up-down-counter) function block

3b

CTUD_DINT function block

3d

CTUD_UDINT function block

37

1

TP (Pulse) function block

2a

TON (On delay) function block

3a

TOF (Off delay) function block

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 VAR or VAR_OUTPUT block, or their graphical equivalents, can be an action

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

None - no qualifier

2

Qualifier N

3

Qualifier R

4

Qualifier S

5

Qualifier L

6

Qualifier D

7

Qualifier P

9

Qualifier DS

11

Qualifier P1

12

Qualifier P0

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

CONFIGURATION...END_CONFIGURATION construction (Note 12)

5a

Periodic TASK construction

5b

Non-periodic TASK construction

6a

WITH construction for PROGRAM to TASK association (Note 9)

6c

PROGRAM declaration with no TASK association (Note 10)

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

%M<i> or %MX<i>

EBOOL

EBOOL

ARRAY [..] OF EBOOL

Internal word

%MW<i>

INT

All types are allowed except:

  • EBOOL

  • ARRAY [..] OF EBOOL

Internal double word

%MD<i>

DINT

No mapping, because of overlapping between %MW<i> and %MD<i> and %MF<i>.

Internal real

%MF<i>

REAL

No mapping, because of overlapping between %MW<i> and %MD<i> and %MF<i>.

Constant word

%KW<i>

INT

All types are allowed except:

  • EBOOL

  • ARRAY [..] OF EBOOL

Constant double word

%KD<i>

DINT

No mapping, because of overlapping between %KW<i> and %KD<i> and %KF<i>.

This kind of variables only exists on Premium PLCs.

Constant real

%KF<i>

REAL

No mapping, because of overlapping between %KW<i> and %KD<i> and %KF<i>.

This kind of variables only exists on Premium PLCs.

System bit

%S<i> or %SX<i>

EBOOL

EBOOL

System word

%SW<i>

INT

INT

System double word

%SD<i>

DINT

DINT

Flat bit

%I<i>

EBOOL

EBOOL

ARRAY [..] OF EBOOL

This kind of variables only exists on Qantum PLCs.

Flat word

%IW<i>

INT

All types are allowed except:

  • EBOOL

  • ARRAY [..] OF EBOOL

This kind of variables only exists on Qantum PLCs.

Common word

%NWi.j.k

INT

INT

Topological variables

%I..., %Q..., ...

...

Same Type

(On some digital I/O modules it is allowed to map arrays of EBOOL on %IX<topo> and %QX<topo> objects.)

Extract bits

%MWi.j, ...

BOOL

BOOL

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.