Application example 2 - Transferring character strings

This application example shows how a character string of data type "String" is transferred from a Beckhoff controller to a Mitsubishi controller and vice versa via CC-Link.

Because a string variable of data type string requires a whole byte for each character and therefore usually more than two bytes are used for an instance, several UINT16 PDO entries are required in the configuration for sending and receiving.

Application example 2 - Transferring character strings 1:
PDO entries for sending/receiving

To transfer a string, a UNION with the structure as shown in the next diagram is used.

Application example 2 - Transferring character strings 2:
UNION structure

This is instantiated in Main and linked with the applied PDOs of the terminal, once for sending and once for receiving a string.

Application example 2 - Transferring character strings 3:
Linking with PDOs

If both controllers are logged in and operational, the data exchange looks as follows.

Application example 2 - Transferring character strings 4:
Data exchange