



CAUTION

If you use pointers to addresses, then the contents of addresses can be moved during an online change. If you use absolute addresses, then the contents of addresses does not change during an online change.
Syntax:
%<memory area prefix> ( <size prefix> )? <memory position> <memory area prefix> : I | Q | M <size prefix> : X | B | W | D <memory position> : <number> ( .<number> )* // Depends on the target system
When defining an address, you use specific strings to express the memory position
and size. An address is marked with the percent sign (%
), followed by the memory range prefix, the optional size prefix, and the memory range
position. The numbering that you use for addressing the memory position depends on
the target system.
Memory Range Prefix |
|
---|---|
|
Input memory range for inputs, "Inputs" For physical inputs via input drivers, "Sensors" |
|
Output memory range for outputs, "Outputs" For physical outputs via output drivers, "Actuators" |
|
Flag memory range |
Size Prefix |
Data Type |
Data Width |
---|---|---|
No size prefix |
Single bit |
|
|
Single bit |
|
|
|
8 bits |
|
|
16 bits |
|
|
32 bits |
Examples
|
Single bit address of the output bit 7.5 |
|
Word address of the input word 215 |
|
Byte address of the output byte 7 |
|
Address of a double word at memory position 48 in flag memory |
|
Word address of an input word; interpretation dependent on the current controller configuration |
|
Variable declaration with address information of an input word |
|
Boolean variable declaration Note: For Boolean variables, one byte is allocated internally if a single bit address
is not specified. A change in the value of |
|
Boolean variable declaration with explicit specification of a single bit address On access, only the input bit 7.5 is read. |
-
Memory position