Byte swap

The structure of process values in the PLC is individual for each PLC type. This means that individual data types may be structured differently. When exchanging individual process variable values, the adaptation for visualisation is usually carried out by the communication component.

If a structure is used to access PLC data block by block (via a process variable that has the data type of a structure) as a byte stream ( structure access parameter (OPC)), the communication component can no longer perform this adjustment as it is not informed about the structure of the byte block. This adaptation must therefore be carried out in the variable server.

The byte swap parameter causes the two consecutive bytes of a byte block transmitted as a byte stream to be swapped with each other.

Setting

Description of the

1

When reading from the PLC, a byte block is requested from the variable server via the communication component. After receiving the block, two consecutive bytes are swapped. Only then is the internal process variable cache filled with the bytes of the received block in accordance with the structure.

When writing, a byte block is compiled from the internal process variable cache according to the structure specifications. The two consecutive bytes are then swapped. The block is then transferred to the PLC.

0

When reading from the PLC, a byte block is requested from the variable server via the communication component. The internal process variable cache is filled with the bytes of the received block without byte exchange in accordance with the structure.

When writing, a byte block is compiled from the internal process variable cache according to the structure specifications. This block is then transferred directly to the PLC.

The use of this parameter depends on the PLC used and only makes sense if:

  • the parameter Structure access is set to As byte stream and

  • structures can be used as data types for process variables.

Further customisation options for this type of access:

Parameters for module: