'Turning' process data

The process data are transferred in Intel format as standard. If the data are required in Motorola format, they have to be 'turned' accordingly. This step illustrates how to 'turn' the data in TwinCAT.

If the standard format is required, you can skip this step.

Prerequisites for this step:

  • A parameterized slave.

'Turn' the process data as follows:

1. In the tree view, right-click on a variable containing data to be 'turned'.
2. Click on the Flags tab.
'Turning' process data 1:
3. Click on the required option. For WORD variables, only LOBYTE and HIBYTE can be swapped. With DWORD variables you can additionally swap the WORD.
'Turning' process data 2:
  • In this way you can 'turn' process data. Use the following example to see how the data change for the individual options.
    Example for DWORD.

Data of the slave

Data which the master receives

Original data

No option selected

Swap Byte (blue)

Swap Word (green)

Swap both (blue and green)

0x01020304

0x01020304

0x02010403

0x03040102

0x04030201


The data can also be 'turned' in the PLC project, using the command ROR.
Example for ST: VarProfinet:=ROR(VarAnalog.8); (*both variables of type WORD*)