ifm
System Manual
ecomat
mobile
PDM360NG (CR1080, CR1081, CR9042) Target V01
2011-07-28
Variable
Operate camera(s) on the PDM
140
8 Variable
Retain variable .......................................................................................................................... 141
Network variable via UDP ......................................................................................................... 142
3130
In this chapter you will learn more about how to handle variables.
In principle, a distinction is made between the following variable types in CoDeSys:
Variable
Declaration
Scope of validity
Memory behaviour
Local
In the individual POU:
PROGRAM...
VAR
(Declaration)
END_VAR
Only valid in the POU where
it was configured
Global
In [Resources] > [Global Variables]
> [Globale_Variablen]:
VAR_GLOBAL
(Declaration)
END_VAR
Valid in all POUs of this
project
Volatile
Local retain
In the individual POU:
PROGRAM...
VAR RETAIN
(Declaration)
END_VAR
Only valid in the POU where
it was configured
Global retain
In [Resources] > [Global Variables]
> [Globale_Variablen]:
VAR_GLOBAL RETAIN
(Declaration)
END_VAR
Valid in all POUs of this
CoDeSys project
Values are saved (on request):
in the FRAM memory ¹):
- all (
ecomat
mobile
controller
- BasicController: CR040n
- BasicDisplay: CR0451
- PDM360NG: CR108n, CR9042
- PDM360smart: CR1070, CR1071
in a special file:
- PDM360: CR1050, CR1051, CR1060
- PDM360compact: CR1052, CR1053, CR1055,
CR1056
Network
In [Resources] > [Global Variables]
> declaration list:
VAR_GLOBAL
(Declaration)
END_VAR
Volatile
Network retain
In [Resources] > [Global Variables]
> declaration list:
VAR_GLOBAL RETAIN
(Declaration)
END_VAR
Values are available to all
CoDeSys projects in the
whole network if the variable
is contained in the
declaration lists.
Values are saved (on request):
in the FRAM memory ¹):
- all
ecomat
mobile
controller
- BasicController: CR040n
- BasicDisplay: CR0451
- PDM360NG: CR108n, CR9042
- PDM360smart: CR1070, CR1071
in a special file:
- PDM360: CR1050, CR1051, CR1060
- PDM360compact: CR1052, CR1053, CR1055,
CR1056
¹) FRAM indicates here all kinds of non-volatile and fast memories.
Below is a description of the particularities in the PDM for ...
-
retain variable
(
→
) and
-
network variable
(
→
page
More information
CoDeSys programming manual
ecomat
mobile
DVD "Software, tools and documentation"