Understanding the IEC 1131-3 / CEI 61131-3 addressing

Return to Introduction  Previous page  Next page

 

This section discuss the IEC 1131-3 addressing identifiers. This kind of identifiers are used in a PLC to address resources. A IEC address always starts with the '%' character.

 

We can classify two main classes of addressing

 

Addresses that refer to a PHYSICAL resource in the PLC (Input, Outputs and so on)
Addresses that refer to an INTERNAL MEMORY word of the PLC

 

IEC variables that refers to a PHYSICAL resource of a PLC are expressed in the generic form

 

 

% [Q | I ] [X] [adr2] . [adr1] . [adr0]

 

 

Where

 

'%' is the header of an IEC address

'Q' specify an OUTPUT resource

'I' specify an INPUT resource

 

The effective address is expressed in a hierarchical form that could consist of more numbers separated by dots. For example the address %QX1.2.3 could express the output bit 3 on the second word of the module 1

The IEC directive do not specify how deep a hierarchy can be, this is related to your particular PLC system

 

 

IEC variables that refers to an INTERNAL MEMORY resource of a PLC are expressed in the following form

 

 

% M [ X | W | D ] [adr2] . [adr1] . [adr0]

 

 

Where

 

'%' is the header of an IEC address

'M' specify a MEMORY resource

The 'X', 'W', 'D' define, respectively, a BOOLEAN, a 16-bits WORD and a 32-bits double WORD

 

The address hierarchy, like explained before, follow

 

For example

 

%MW200

Refers to the WORD (16-Bits) number 200

%MX350.5

Refers to bit number 5 of the word 350

%MD4000

Refers to double word (32-Bits) number 4000

%MX4.207.8

Refers to bit 8 of word 207 of PLC number 4