6.2.1 Marker $EA1 - Address according to IEC 61131-3
For access to the physical interfaces, the digital and analogue inputs and outputs, addressing according to IEC
addresses is used, which allow direct linking of variables to the inputs and outputs of the DDC.
The structure of such an address follows the structure %(1)(2)(3)(4):
Position(1)indicateswhetheritisaphysicalinput,outputoraflag.
Position(2)definesthedatatypeandcanbecombinedwithposition(1)asdesired.
Position(3)distinguisheswhethertheflagisaninputoranoutput.
Position(4)definestheaddress.
Structure of the IEC addresses Function
% (1) (2) (3) (4)
I Physical input
Q Physical output
M 4 Flag = virtual input (setpoint)
M 5 Flag = virtual output
X n.m Data type bit (TRUE / FALSE)
W n Data type word (16-bit, unsigned: 0 .. 65535)
I n Data type integer (16-bit, signed: -32768 ..
32767)
1)
U n
Data type ULong (32-bit, unsigned)
1)
L n
Data type Long (32-bit, signed)
1)
1)
is created in CODESYS as %IW but with data type INT, ULong or Long
The following table summarises the permitted combinations:
Address Meaning Use
%IXn.m Binary input: word n, bit m I/O
%QXn.m Binary output: word n, bit m I/O
%IWn "Analogue" input: word n I/O
%IIn "Analogue" input: integer n (signed input value) I/O
%QWn "Analogue" output: word n I/O
%MX4.n.m Flaginputbit–digital(n = 0 - 9 = word number; m =0 - 15 = bit
number)
Setpoint
%MW4.n Flaginputword–analogue(n = 0 - 9 = word number) Setpoint
%MX5.2n.m Flag output bit: - digital (n = 0 - 9 = word number; m =0 - 15 =
bit number)
Error message