68
ifm System Manual ecomatmobile BasicDisplay (CR0451) V01
Variable Special information about bitmap graphics
8 Variable
Retain variable .............................................................................................................................69
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 (ecomatmobile controller
- BasicController: CR040n
- BasicDisplay: CR0451
- PDM360smart: CR1070, CR1071
in a special file:
- PDM360: CR1050, CR1051, CR1060
- PDM360compact: CR1052, CR1053, CR1055,
CR1056
in the MRAM memory:
- PDM360NG: CR108n
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 ecomatmobile controller
- BasicController: CR040n
- BasicDisplay: CR0451
- PDM360smart: CR1070, CR1071
in a special file:
- PDM360: CR1050, CR1051, CR1060
- PDM360compact: CR1052, CR1053, CR1055,
CR1056
in the MRAM memory:
- PDM360NG: CR108n
Below is a description of the particularities in the PDM for ...
retain variable (→ page 69
) and
network variable.
More information
CoDeSys programming manual ecomatmobile DVD "Software, tools and documentation"