Skip to main content

Exchanging safety network variables

Important

The CODESYS Safety User Manual must be read unconditionally before starting any work or using this help. The manual contains a description of functions in CODESYS Safety Extension as well as notices that must be followed unconditionally when creating an application.

The exchange of network variables between safety controllers functions by means of the network variable exchange in CODESYS Standard. Safety network variables are transmitted by means of the modules in the SafetyNetVar library. In CODESYS Safety Extension, the Safety network variable list (Sender) and Safety network variable list (Receiver) objects are available for exchange.

. Properties of Safety NetVars
  • The cross-communication between safety controllers is used for exchanging safety-oriented signals.

  • Variables of the following type can be exchanged: SAFEBOOL, SAFEWORD, and SAFEINT.

  • If cross-communication was configured using the Safety network variable list (Sender) and Safety network variable list (Receiver) objects and downloads to safety and standard controllers were performed, then the communication link is established automatically over the standard controllers of the safety controller.

  • The safety controller always exchanges the variable value that the variable has at the end of the application cycle. All exchanged telegrams (variable values and received confirmations) are sent in sync to the application cycle in the output phase and received in the input phase.

  • A sender can send the same variable to several receivers and it is programmatically and functionally independent of its receivers. The receivers must register with the sender for establishing safe communication.

  • A configured variable exchange starts automatically, continues running automatically, and starts again automatically after the cause for interruption has been removed, when the following conditions are fulfilled:

    • The routing of the standard controllers of sender and receiver(s) runs.

    • Safe communication of sender and receiver runs.

    • The communication path is fast enough, the cycles times are short enough, and the watchdog time is long enough.

  • The NetVarReceiver and NetVarSender modules of the SafetyNetVar library are used for cross-communication. In addition, an instance of the NetVarSenderStack module is generated for each sender/receiver relationship.

If a sender-receiver association exists, then the associated sender is displayed in brackets in the device tree for each safety network variable list (receiver), and vice versa. If several safety network variable lists (receiver) are associated to one safety network variable list (sender), then [<-…] is displayed after the sender name in the device tree.

Figure 125. Device tree with safety network variable list (sender) and safety network variable list (receiver)
Device tree with safety network variable list (sender) and safety network variable list (receiver)