Inputs, Outputs and Flags

All operands supported by CODESYS are described in the CODESYS documentation. In the following details on the “address” operands (%I for inputs and %Q for outputs) used in CODESYS are described. All addressable operands can be accessed bit-wise (X), byte-wise (B), word-wise (W) and double-word-wise (D) in Automation Builder. The Motorola byteorder is used for operand access.

Declaration of addressable operands:

The declaration of the operands in the addressable flag area is done as follows:

Symbol AT address : Type [:= initialization value]; (* comment *)

[.] optional

The inputs and outputs are declared using the PLC configuration.

Caution

:strong:Multitasking

For multitasking, the digital inputs and outputs for every task are byte-wise cycle consistent, i.e., for instance inputs %IX0.0-%IX0.7 for task 1 and %IX1.0-%IX1.7 for task 2.

If, for example, task 1 has the higher priority and input %IX0.0 is used in task 1 and task 2, the value can change during the cycle of task 2 as it is updated every time task 1 is started. This is not relevant for programs with only one task.