Configuring a Network Variable Exchange with Controllers in the Same Project
Insert a Safety network variable list (Sender) object in the safety application of the sender safety controller.
Specify a unique safety address for the Safety network variable list (Sender) object.
Declare the variables to be exchanged in the Safety network variable list (Sender) object.
Insert a Safety network variable list (Receiver) object in the safety application of the receiver safety controller.
Assign the safety network variable list of the sender to the Safety network variable list (Receiver) object.
Define the Connection ID and Watchdog time for the connection.
Creating a safety network variable list (sender) in the sender safety controller and a safety network variable list (receiver) in the receiver safety controller
Requirement: Your project includes two safety controllers with the safety applications SafetyApp1 and SafetyApp2. The project is open.
In the sender safety controller, select the SafetyApp1 safety application object, and then click in the context menu.
The Add safety network variable list (sender) dialog opens.
Specify a name and comment for the safety network variable list (sender) and click Add.
The safety network variable list (sender) (
) is inserted below the safety application and opened in the editor.
The Safety address of this variable list and Maximum number of receivers input fields are preset with default values that can be modified if necessary.
In the device tree, select the recently added Safety network variable list (Sender) object and click Properties in the context menu.
In the Properties dialog, on the Safety tab, specify an object version number in the Version input field and click OK.
In the declaration part of the Safety network variable list (Sender) editor, click Insert Variable Declaration (
) in the context menu.
The Declare Safety Variable dialog opens.
Declare your network variable and click OK.
In the receiver safety controller, select the SafetyApp2 safety application object, and then click in the context menu.
The Add safety network variable list (receiver) dialog opens.
Specify a name and comment for the safety network variable list (receiver) and click Add.
The safety network variable list (receiver) (
) is inserted below the safety application and opened in the editor.
In the Associated sender list box, select the safety network variable list (sender) where you declared the network variable in the previous step.
On the Safety configuration tab, in the Safety address of sender field and the Object version of sender, CODESYS displays the information about the associated sender and the safety network variable in the variable list that you declared in the sender NVL.
Specify the values in the Connection ID and Watchdog time input fields.
Click
to build both applications. In the message view ( ), check that you have configured the safety network variable exchange without any errors.