ifm
System Manual
ecomat
mobile
PDM360NG (CR1080, CR1081, CR9042) Target V01
2011-07-28
Variable
Network variable via UDP
142
8.2
Network variable via UDP
Select first target system and create project............................................................................. 145
Set communication parameters ................................................................................................ 147
Activate network variable support ............................................................................................. 148
Integrate libraries....................................................................................................................... 149
Complete and transmit the project (global network variables).................................................. 150
Write projects for more devices................................................................................................. 155
Transmit projects....................................................................................................................... 157
Test transmission of the global network variables .................................................................... 157
3139
Global network variables are used for data exchange between controllers in the network. The values
of global network variables are available to all CoDeSys projects in the whole network if the variables
are contained in their declaration lists.
A distinction is made between export and import variables:
Export variables
originate from the
local
project.
Their values can be influenced locally.
It is also to be possible to use the variables in one or more other projects, but only with read
access. To do so, these variables must be
exported
(provided) from the local project.
Import variables
do not originate
from the local
project but from another project.
Their values cannot be influenced locally.
The variables are used with read access in the
local
project (and possibly also in several other
projects). To do so, these variables must be
imported
into the corresponding local project.
►
To export or import, the global network variables must be combined in lists. You can assign an
EXP file to every global variable list.
In this example each project has 3 lists of global network variables:
- 1 list with export variables (with local data for reading in other controllers) and
- 2 lists with import variables (with data of the other controllers for local reading).
►
When you create a global variable list please note:
By selecting [Export before compile] in the window [Properties] CoDeSys updates the corresponding
EXP file (e.g.
ExportProj1.exp
) when the project is compiled.
By selecting [Import before compile] in the window [Properties], CoDeSys refers to the corresponding
EXP file (e.g.
ExportProj1.exp
) when the project is compiled, and updates the list.
UDP
(
U
ser
D
atagram
P
rotocol) is a minimal connectionless network protocol belonging to the
transport layer of the internet protocol family. The task of UDP is to pass data which is transmitted via
the internet to the right application.