Skip to main content

Dialog: Properties: Network Variables

Symbol: _icon_project_compare.png

Function: In this dialog, you define the network properties for the variable list which is selected in the device tree. Furthermore, any variables in it which are declared as network variables are also available.

Call: Context menu of the variable list in the device tree → Properties, Network Variables tab

Network type

UDP

Task

Task of the current application which controls the variables to be sent

CODESYS always sends the variables at the end of a task cycle.

List identifier

Used to identify the network variable list

Has to be unique

Pack variables

The size of the packages (telegrams) that are transmitted depends on the network type. In the case of UDP, a package is 256 bytes.

standard icon: CODESYS bundles the variables for sending in packages in order to reduce as much as possible the number of packages to send. In the case of variables of type array or structured data types, this can lead to the splitting of the variables into multiple telegrams. As a result, data inconsistencies are possible within these variables, even if the variable size is smaller than the package size.

_cds_icon_option_deactivated.png: CODESYS generates one package per variable.

Transmit checksum

standard icon: A checksum is provided for each variable package. The receiver checks the checksum to make sure that the variable definitions match from the sender and receiver. A package with conflicting checksums is not accepted.

Acknowledgment

standard icon: CODESYS sends an acknowledgment message for each received data package. If the sender does not receive an acknowledgment before it sends again, then an error is written to the diagnostic structure.

Note: For the NetVarUdp library version 3.5.7.0 and higher, a receiver channel is no longer assigned when acknowledged transfer is not selected. As a result, network variable exchange is also possible between two controllers on one hardware device.

Cyclic transmission, Interval

CODESYS sends the variables within the defined interval.

Example for time definition: "T#70ms"

Transmit on change, Minimum gap

standard icon: CODESYS sends the variables only if their values have changed. You can use "minimum gap" to define the least amount of time between two transmissions.

Transmit on event, Variable

standard icon: CODESYS sends the variables as soon as the defined variable yields TRUE.

Settings

Protocol-specific settings

Possible entries depend on the network library:

Port: Number of the port which CODESYS uses for data exchange with other network units

The Default value is "1202".

You can change the current value at any time in the Value field: Select the field, press the Space Bar, and specify the value.

Caution: The other nodes in the network have to define the same port. If more than one UDP connection is defined in the project, then the port numbers in all configurations are adapted to this value.

Broadcast Adr.: The Default value is 255.255.255.255, which means that data exchange will take place with all network units.

You can change the current value at any time in the Value field: Select the field, press the Space Bar, and specify the address or address range of a subnetwork.

Example: 197.200.100.255 when communication should take place with all nodes which have IP addresses in the range of "197.200.100.x"

For more information, see: Configuring a Network Variable Exchange