Beckhoff network variables - Settings

Beckhoff network variables (NWV) can be used for cyclic or acyclic sending of data between Windows-based PCs. In a device declared as a publisher (sender), such a network variable is received on the other side by a subscriber declared as the same type. As the name suggests, this data traffic is network-based, and the configuration is directly based on the protocols used.

A choice of two protocols is available:

The telegram with the process data arrives at the recipient device (network port) via these addressing modes. In the Ethernet device/TwinCAT several transported process data are allocated via a variable ID

All network variables must be declared in the System Manager before they can be used.

The following intervention options are then available during operation:

Diagnostic variables on the publisher and subscriber side provide information about the connection quality.

If network variables are used, the temporal boundary conditions for the network topology used must be taken into account: In switched mode (MAC addressing) communication cycles of approx. 10 ms and below can be achieved, in routed mode (IP addressing) a few 100 ms may be achievable in some cases.

Beckhoff network variables - Settings 1:

Diagnostic variable "quality"

If the processing tasks operate with different cycle times or the user changes the DataExchangeDivider, this must be considered in the analysis of the diagnostic variables. In conjunction with a fast subscriber (e.g. 10 ms), a slow publisher (e.g. 100 ms) leads to poor connection quality (as reported by the diagnostic Quality variable). Dynamic temporary blocking of sending a publisher must also be considered. In this case the subscriber registers poor quality.

Beckhoff network variables - Settings 2:

Diagnostic variable "CycleIndex"

Please note the following information to decide whether you have to serve the variable CycleIndex.

Basic principles of Beckhoff network variables

Beckhoff network variables - Settings 4:

Data representation on different platforms

Beckhoff network variables - Settings 5:

Please note that the depictions of simple and complex data (WORD, ARRAYs, REAL, STRING, user-defined structures) may vary internally on different platforms!

x86 platforms use byte-alignment, others use (ARM) 2-byte or 4-byte alignment.

This means that if a complex structure is created in an x86/PC PLC project and in an ARM PLC project, they can each have a different effective size and a different internal structure.

Beckhoff network variables - Settings 6:

Recommendation for structures that are identical on both end devices

Further recommendation

Please refer to the notes in the Structure section of the Infosys.

Use of bus terminal controllers (BCxxxx, BXxxxx)

Since the representation of floating point numbers (REAL) on Bus Terminal Controllers (BCxxxx, BXxxxx) differs from that in the x86, these cannot be transmitted. "SINT", for example, can be used for signed values.

Settings in the System Manager

Beckhoff network variables - Settings 7:

Appearance of the variables

  • Depending on the platform used (PC or EL66xx), the Publisher/Subscriber will appear differently. A Publisher/Subscriber can be created
  1. on a PC network interface, see Fig. 3
  2. on an EL66xx, see Beckhoff network variables - Settings

Publisher, Box

The following settings options are available in the Beckhoff System Manager TwinCAT 2.10 build 1328:

Beckhoff network variables - Settings 8:
Fig. 3: Publisher RT Ethernet settings

RT Ethernet settings:

Beckhoff network variables - Settings 9:

Use of broadcast and multicast

Network variables sent as broadcast or multicast at MAC or IP level can generate high network load (depending on the cycle time), since they are multiplied into the whole connected network. This may cause simple network devices such as printers to crash. With short cycle times all network traffic may become blocked. We strongly recommend using unicast addressing, considering variable identification, as described above.

Advanced Settings:

Beckhoff network variables - Settings 10:

UDP/IP settings - the addressing technique of the IP network layer with IP addresses is used. UDP is a connection-less protocol without feedback.

Beckhoff network variables - Settings 11:

Use of broadcast and multicast

Network variables sent as broadcast or multicast at MAC or IP level can generate high network load (depending on the cycle time), since they are multiplied into the whole connected network. This may cause simple network devices such as printers to crash. With short cycle times all network traffic may become blocked. We strongly recommend using unicast addressing, taking into account variable identification, as described above.

Beckhoff network variables - Settings 12:

ARP handling (ARP = Address Resolution Protocol: allocation of hardware/MAC addresses to network addresses [IP]) is managed by the operating system (Windows).

Advanced Settings:

Publisher, Variable

Beckhoff network variables - Settings 13:

Settings:

Subscriber, box

Beckhoff network variables - Settings 14:

Settings:

Process data:

Subscriber, variable

Beckhoff network variables - Settings 15:

Settings:

Process data: