Attribute 'TcSwapWord'

The pragma can be used to define that the byte order should be changed for this allocated output variable (swapping of low byte and high byte). If the pragma is present, the checkbox "Swap LOBYTE and HIBYTE" is checked for the output within the PLC process image.

Syntax: {attribute 'TcSwapWord'}

Insertion location: Line above the declaration line of an allocated output variable (AT%Q)

Examples:

VAR
    {attribute 'TcSwapWord'}
    nVar1  AT%Q* : WORD;
    {attribute 'TcSwapDWord'}
    nVar2  AT%Q* : DWORD;
END_VAR