A network variable list (receiver) is added to the
. It defines variables, which are specified as network variables in another device within the network.Thus you can add a network variable list (receiver) object to an application if a network variable list (sender) with special network properties (network variable list) is available in one of the other network devices. This is independent of whether defined in the same project or in different projects. If several of appropriate network variable lists (sender) are found within the present project for the present network, select the desired network variable list (sender) from a selection list
when adding a network variable list (receiver) via the dialog box . Network variable lists (sender) from other projects must be imported as described in this chapter.Therefore, each network variable list (receiver) corresponds exactly to one network variable list (sender) in another device.
Dialog box
When adding the network variable list (receiver), besides a
, also define a , responsible for the handling of the network variables.Alternatively to directly choosing a network variable list (sender) from another device, you can specify a network variable list (sender) export file *.GVL with the option dialog box. In any case this is necessary if the desired network variable list (sender) is defined within another project. For this purpose, select the option in the selection list and enter the file path in the text field (or click the button to open the dialog for browsing in the file system).
. This network variable list (sender) file has been generated previously from the network variable list (sender) viaYou can modify the settings at a later time via the dialog box.
A network variable list (receiver) is displayed by the NVL editor, but it cannot be modified. It displays the content of the corresponding network variable list (sender). If you modify the basic network variable list (sender), the network variable list (receiver) is updated accordingly.
A comment is added automatically at top of the declaration part of a network variable list (receiver), providing information on the sender (device path), the network variable list (sender) name, and the protocol type.
Network variable list
arrVar : ARRAY[0..g_iArraySize-1] OF INT ;
is not transferred arrVar : ARRAY[0..10] OF INT ;
is transferred
For further information, refer to the Network Communication chapter.
In the following example, a simple network variable exchange is established. In the sender controller, a network variable list (sender) is created. In the receiver controller, the corresponding network variable list (receiver) is created.
Perform the following preparations in a default project, where a sender controller
and a receiver controller are available in the :Create a POU (program)
below the node of .Under the
node of this application, add the task that calls .Create a POU (program)
below the node of .Under the
node of this application, add the task that calls .Step 1: Define a global variable list in the sender controller:
Step |
Action |
Comment |
---|---|---|
1 |
In the , select the node of the controller and click the green plus button. Execute the command . |
The dialog box of the network variable list (sender) is displayed. |
2 |
Enter the |
The EcoStruxure Machine Expert screen. node appears below the node in the and the editor opens on the middle of the |
3 |
In the editor, enter the following variable definitions:
![]() |
– |
Step 2: Define the network properties of the network variable list (sender):
Step |
Action |
Comment |
---|---|---|
1 |
In the , select the node, click the green plus button, and execute the command . |
The dialog box is displayed. |
2 |
Open the tab and configure the parameters as indicated in the graphic:![]() |
– |
3 |
Click . |
The dialog box is closed and the network variable list (sender) network properties are set. |
Step 1: Define a global network variable list in the receiver controller:
Step |
Action |
Comment |
---|---|---|
1 |
In the , select the node of the controller , click the green plus button, and execute the command . |
The dialog box is displayed. |
2 |
Configure the parameters as indicated in the graphic. ![]() |
This global network variable list is the counterpart of the network variable list (sender) defined for the sender controller. |
3 |
Click . |
The dialog box is closed and the appears below the node of the controller:![]() This network variable list (receiver) automatically contains the same variable declarations as the . |
Step 2: View and / or modify the network settings of the network variable list (receiver):
Step |
Action |
Comment |
---|---|---|
1 |
In the , right-click the node and select the command . |
The dialog box is displayed. |
2 |
Open the tab. |
– |
Step 3: Test the network variable exchange in online mode:
Step |
Action |
Comment |
---|---|---|
1 |
Under the node of the controller , double-click the POU . |
The editor for opens on the right-hand side. |
2 |
Enter the following code for the variable ![]() |
– |
3 |
Under the node of the controller , double-click the POU . |
The editor for opens on the right-hand side. |
4 |
Enter the following code for the variable ![]() |
– |
5 |
Log on with sender and receiver applications within the same network and start the applications. |
The variable |