At a Glance
Access Syntax
The syntax of a direct addressing data instance is defined by the % symbol followed by a memory location prefix and in certain cases some additional information.
The memory location prefix can be:
M, for internal variables
K, for constants (Premium, M580 and M340)
S, for system variables
N, for network variables
I, for input variables
Q, for output variables
%M Internal Variables
Access syntax:
Syntax |
Format |
Example |
Program access rights |
|
---|---|---|---|---|
Bit |
%M<i> or %MX<i> |
3 bits (EBOOL) |
%M1 |
R/W |
Word |
%MW<i> |
16 bits (INT) |
%MW10 |
R/W |
Word extracted bit |
%MW<i>.<j> |
1 bit (BOOL) |
%MW15.5 |
R/W |
Double word |
%MD<i> (1) |
32 bits (DINT) |
%MD8 |
R/W |
Real (floating point) |
%MF<i> (1) |
32 bits (REAL) |
%MF15 |
R/W |
Legend |
||||
(1): Not available for Modicon M340. |
<i> represents the instance number (starts a 0 for Premium and 1 for Quantum).
For M580 and M340, verify that double-type instance (double word) or floating instance (real) are located in an integer type %MW and that the index <i> of the %MW is even.
Memory organization:

%K Constants
Access syntax:
Syntax |
Format |
Program access rights |
|
---|---|---|---|
Word constant |
%KW<i> |
16 bits (INT) |
R |
Double word constant |
%KD<i> (1) |
32 bits (DINT) |
R |
Real (floating point) constant |
%KF<i> (1) |
32 bits (REAL) |
R |
Legend |
|||
(1): Not available for Modicon M340. |
<i> represents the instance number.
%I Constants
Access syntax:
Syntax |
Format |
Program access rights |
|
---|---|---|---|
Bit constant |
%I<i> |
3 bits (EBOOL) |
R |
Word constant |
%IW<i> |
16 bits (INT) |
R |
<i> represents the instance number.
%S System Variables
Access syntax:
Syntax |
Format |
Program access rights |
|
---|---|---|---|
Bit |
%S<i> or %SX<i> |
1 bit (BOOL) |
R/W or R |
Word |
%SW<i> |
32 bits (INT) |
R/W or R |
<i> represents the instance number.
%N Network Variables
These variables contain information, which has to be exchanged between several application programs across the communication network.
Access syntax:
Syntax |
Format |
Program access rights |
|
---|---|---|---|
Common word |
%NW<n>.<s>.<d> |
16 bits (INT) |
R\W or R |
Word extracted bit |
%NW<n>.<s>.<d>.<j> |
1 bit (BOOL) |
R\W or R |
<n> represents the network number.
<s> represents the station number.
<d> represents the data number.
<j> represents the position of the bit in the word.
Case with Input/Output Variables
These variables are contained in the application-specific modules.
Access syntax:
Syntax |
Example |
Program access rights |
|
---|---|---|---|
Input/Output structure (IODDT) |
%CH<@mod>.<c> |
%CH4.3.2 |
R |
%I inputs |
|||
BOOL type module detected error bit |
%I<@mod>.MOD.ERR |
%I4.2.MOD.ERR |
R |
BOOL type channel detected error bit |
%I<@mod>.<c>.ERR |
%I4.2.3.ERR |
R |
BOOL or EBOOL type bit |
%I<@mod>.<c> |
%I4.2.3 |
R |
%I<@mod>.<c>.<d> |
%I4.2.3.1 |
R |
|
INT type word |
%IW<@mod>.<c> |
%IW4.2.3 |
R |
%IW<@mod>.<c>.<d> |
%IW4.2.3.1 |
R |
|
DINT type double word |
%ID<@mod>.<c> |
%ID4.2.3 |
R |
%ID<@mod>.<c>.<d> |
%ID4.2.3.2 |
R |
|
Read type REAL (floating point) |
%IF<@mod>.<c> |
%IF4.2.3 |
R |
%IF<@mod>.<c>.<d> |
%IF4.2.3.2 |
R |
|
%Q outputs |
|||
EBOOL type bit |
%Q<@mod>.<c> |
%Q4.20.3 |
R/W |
%Q<@mod>.<c>.<d> |
%Q4.20.30.1 |
R/W |
|
INT type word |
%QW<@mod>.<c> |
%QW4.2.3 |
R/W |
%QW<@mod>.<c>.<d> |
%QW4.2.3.1 |
R/W |
|
DINT type double word |
%QD<@mod>.<c> |
%QD4.2.3 |
R/W |
%QD<@mod>.<c>.<d> |
%QD4.2.3.2 |
R/W |
|
Read type REAL (floating point) |
%QF<@mod>.<c> |
%QF4.2.3 |
R/W |
%QF<@mod>.<c>.<d> |
%QF4.2.3.2 |
R/W |
|
%M variables (Premium) |
|||
INT type word |
%MW<@mod>.<c> |
%MW4.2.3 |
R/W |
%MW<@mod>.<c>.<d> |
%MW4.2.3.1 |
R/W |
|
DINT type double word |
%MD<@mod>.<c> |
%MD4.2.3 |
R/W |
%MD<@mod>.<c>.<d> |
%MD4.2.3.2 |
R/W |
|
Read type REAL (floating point) |
%MF<@mod>.<c> |
%MF4.2.3 |
R/W |
%MF<@mod>.<c>.<d> |
%MF4.2.3.2 |
R/W |
|
%K Constants (Modicon M580, Modicon M340 and Premium) |
|||
INT type word |
%KW<@mod>.<c> |
%KW4.2.3 |
R |
%KW<@mod>.<c>.<d> |
%KW4.2.3.1 |
R |
|
DINT type double word |
%KD<@mod>.<c> |
%KD4.2.3 |
R |
%KD<@mod>.<c>.<d> |
%KD4.2.3.12 |
R |
|
Read type REAL (floating point) |
%KF<@mod>.<c> |
%KF4.2.3 |
R |
%KF<@mod>.<c>.<d> |
%KF4.2.3.12 |
R |
<@mod = \<b>.<e>\<r>.<m>
<b> bus number (omitted if station is local).
<e> device connection point number (omitted if station is local, the connection point is also called Drop for Quantum users).
<r> rack number.
<m> module slot
<c> channel number (0 to 999) or MOD reserved word.
<d> data number (0 to 999) or ERR reserved word (optional if 0 value). For M580 and M340, <d> is even.
Examples: local station and station on bus for Modicon M340 PLCs.

Examples: local station and station on bus for Quantum and Premium PLCs.
