Word exchange VT_R4, VT_R8
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 carry out this adaptation as it is not informed about the structure of the byte block. This adaptation must therefore be carried out in the variable server.
The VT_R4, VT_R8 word swap parameter causes two consecutive words (word = 2 bytes) of a structure element of data type VT_R4 or VT_R8 to be swapped with each other within a transmitted byte block.
|
Setting |
Description of the |
|---|---|
|
|
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 according to the structure of the structure. If an addressed structure element is of data type VT_R4 /VT_R8, two consecutive words are swapped with each other. When writing, a byte block is compiled from the internal process variable cache according to the structure specifications. The variable server checks whether a structure element has the data type VT_R4/VT_R8. If this is the case, the consecutive words of the value are swapped with each other. The block is then transferred to the PLC. |
|
|
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 according to the structure of 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: