Table 5-13 Available memory areas:
Storage Area
Input fields (physical inputs driven by
I
inputs, "sensors")
Output area (physical outputs driven by
Q
outputs, "actuators")
M
Memory area
Table 5-14 The following length prefixes can be used:
X
None
B
W
D
Table 5-15 Examples
%QX7.5
%IW215
%QB7
%MD48
%IW2.5.7.1
ivar AT %IW0 : WORD;
Make sure to use a valid address:
To specify an effective address in your application, you must first know the appropriate location in
the process image, which is the memory area used: Input(I), Output(Q) or Memory(M) area, as
described in the table above. Then about specifying the desired size:
The current device configuration and settings (hardware structure, device description, IO settings)
play a decisive role. In particular, take into account the difference in address interpretation
between devices using "byte addressing mode" and devices using "IEC addressing mode"
word-oriented mode.
So depending on the size and addressing mode, different memory locations can be addressed
by the same address definition.
See the table below for a comparison of byte addressing and word-oriented IEC addressing for
bits, bytes, words, and dwords. This table plots the overlapping memory regions in byte
addressing mode (see example after table).
Regarding the writing method, please note that for bit addresses, the IEC addressing mode is
always word-oriented, that is, the area before the dot corresponds to the number of words, and
the area after the name corresponds to the number of bits.
Table 5-16 Comparison of byte- and word-oriented addressing for address sizes D, W, and X:
Double word/Word
Byte addressing
D0
W0
Name
Single binary bit
Single binary bit
Byte (8 bits)
Word (16 bits)
Double word (32 bits)
Address 7 of the output area, bit 5
Address 215 of the input area, 1 word
Address 7 of the output area, 1 byte
Address 48 of the memory area, double word.
Depends on PLC settings
t Example of variable declaration with specified
address
Byte
Word-Oriented
IEC Addressing
D0
W0
B0
47
Size(Bytes)
1280
1280
32767
X (bit)
Byte addressing
Word-Oriented IEC
X0.7
...
X0.0
X0.7
Addressing
...
X0.0
Need help?
Do you have a question about the MAT-LC-C Series and is the answer not in the manual?