Direct adressing

Direct addressing

With the help of direct addressing inputs, outputs and the data area can be read and written directly via the address. In some situations you can simplify the Grafcet enormously: For example, if 8 Boolean symbols are combined with AND in a transition. This can be simplified if only the byte in which the Boolean symbols are stored is checked for the value 255.

Access modes

Access Syntax Example
Bit access %D{Byte Address}.{Bit Address} %D2.2
Byte access %DB{Byte address} %DB5
Word Access %DW{Byte Address} %DW8
Double word access %DD{byte address} %DD10


The correct address for a certain symbol can be found in the symbol table in the column "DB address":


Example 1: Reset several output symbols via a write command: It is much shorter to set a *byte or word** to "0" in an action than 8 or 16 Boolean symbols. In the next sample the byte address of the first 8 Boolean outputs is "25". See picture:

Via a stored action upon activation that is connected to an initial step, all 8 outputs are initially set to '0':

Example 2: Compare whether at least 1 symbol has the state '1'. If you want to check if at least 1 symbol has the state '1', you can e.g. check 8 symbols simultaneously via a byte access. The two transitions (left and right in the following picture) are triggered by the same condition. All inputs have byte address 0.


Note: If symbols are addressed directly, there is a risk that the address of the symbol will change. If you insert new symbols into the symbol table, note that the direct addressing may have to be adapted.