Supported port connectors

Connectors

The programs of a PLCnext Technology application communicate via IN ports and OUT ports. Only a combination of specific data types is supported.

Note: 
When setting the IN and OUT ports with PLCnext Engineer, you can only enter permitted combinations of data types.

In case you're implementing the configuration via an XML configuration file (not by using PLCnext Engineer, you first have to ensure that only combinations of data types listed in the Elementary data types table are defined. If an invalid combination is configured, the startup process of the firmware will be interrupted. For debugging, information on the startup behavior of the firmware is available in the Output.log diagnostic file. 
Since firmware version 2022.0 LTS, there is a notification that lists the configuration errors in case of an invalid configuration.

The following tables show all supported data type combinations of IN and OUT ports between programs. 

In order to check whether a GDS connector can be established, the firmware replaces the data type of each port with its matching C++ data type according to the elementary data type. Next, the data type combinations according to the following tables are valid.

Boolean and number values

table of boolean and number values

Date and time values

String values

Note: Ports of data type string cannot be connected with I/O ports. 

Structure

Note: Ports of data type struct cannot be connected with I/O ports.

All elementary data types can be used in struct data types.

In addition to connecting elementary data types and arrays, the GDS also enables the connection of entire structures. Structures are data types that can exist of elements of different data types. The design of structures can be freely defined. 

A StructConnector is used for connecting two struct ports. A StructConnector is a management object that is used to implement the connection of complete structures and the actual data transport. The connection logic of two struct ports therefore contains a comparison based on type definitions. It is checked whether the size of the structure, the data type, the offset, the dimensions and the number of elements match. It is also checked if the alignment of the individual struct members is consistent. This is important for determining the binary compatibility of the structures. The check is implemented without the names of the individual struct members.

The firmware completely copies the structures via memcpy(). Binary compatibility of the type definitions is required for this method. To compare the size of the structure types and subsequently, the data types and offsets of the individual structure fields, a type check is run.

Below figure shows the connection of structures between tasks. Here, the communication between two programs is implemented via a type SampleStruct port.

StructConnector_1.png

Array

All elementary data types can be used in one-dimensional array data types. 

For one-dimensional arrays a GDS connector can be established between Start Port and End Port, if both base data types match to the same C++ data type and if both arrays have exactly the same number of elements. Unlike a connection between variables of elementary data types, the conversion of array elements is not supported (e.g., no conversion of int16 into int32). 

Combinations between ports and I/O systems (octet string)

Available from firmware 2021.6

There are several possibilities of combining the different data types of ports and I/O systems. Unsigned FDCML data types and variables (e.g. octet string) can be interconnected with the similar data types of different programming languages as shown in the table below. 

A prerequisite for the interconnection is that the data size of start and end port must match. If the interconnection is of different data types, no swapping is executed. In this case there must be an array on one or both sides (start/end port).

FDCML data type C++ data type IEC 61131 data type Swapping
  • Octetstring1
  • Bitstring8
  • USINT
  • Unsigned8
uint8 BYTE no
  • Octetstring2
  • Bitstring16
  • UINT
  • WORD
  • Unsigned16
uint16 WORD yes
Octetstring2/BitString16 Array[2] of uint8 Array[2] of BYTE no
  • Octetstring4
  • Bitstring32
  • UDINT
  • DWORD
  • Unsigned32
uint32 DWORD yes
Octetstring4/Bitstring32
  • Array[4] of uint8
  • Array[2] of uint16
  • Array[1] of uint32
  • Array [4] of BYTE
  • Array [2] of WORD
  • Array [1] of DWORD 
no
  • Octetstring8
  • Bitstring64 
  • ULINT 
  • LWORD
  • Unsigned64
uint64 LWORD yes
  • Octetstring8/Bitstring64 
  • Array [8] of uint8
  • Array [4] of uint16
  • Array [2] of uint32
  • Array [1] of uint64
  • Array [8] of BYTE
  • Array [4] of WORD
  • Array [2] of DWORD 
  • Array [1] of LWORD 
no
  • Octetstring[]
  • BitstringX
  • UnsignedN
  • Array[] of uint8
  • Array[] of uint16
  • Array[] of uint32
  • Array[] of uint64
  • Array [] of BYTE
  • Array [] of WORD
  • Array [] of DWORD 
  • Array [] of LWORD

no


• Published/reviewed: 2024-09-24   ☀  Revision 073 •