![background image](http://html1.mh-extra.com/html/ifm/basiccontroller-cr0431/basiccontroller-cr0431_programming-manual_3915933051.webp)
51
ifm
Programming Manual BasicController relay CR0431 v03.03.00
05 / 2018
Configurations
Variables
>
4.5.1
Retain variables
8672
Retain variables can be saved automatically in a protected memory area and be reloaded
automatically during a reboot.
14166
Typical applications for retain variables are for example:
• operating hours which are counted up and retained while the machine is in operation,
• position values of incremental encoders,
• preset values entered in the monitor,
• machine parameters,
i.e. all variables whose values must not get lost when the device is switched off.
All variable types, also complex structures (e.g. timers), can be declared as retain.
► To do so, activate the control field [RETAIN] in the variable declaration (→ window).
>
Save retain variables
9853
In the device the data type RETAIN is only stored in the volatile memory (RAM) during the runtime.
To save the data permanently, at the end of each cycle they are automatically be saved in the FRAM
memory ¹).
¹) FRAM indicates here all kinds of non-volatile and fast memories.
NOTE
In this device, do NOT use the following functions from the 3S library
SysLibPlcCtrl.lib
:
- FUN SysSaveRetains
- FUN SysRestoreRetains
>
Read back retain variables
9854
After power on and before the first program cycle the device automatically writes the saved data back
to the working memory once. To do so, no additional FBs must be integrated into the application
program.
NOTE
In this device, do NOT use the following functions from the 3S library
SysLibPlcCtrl.lib
:
- FUN SysSaveRetains
- FUN SysRestoreRetains
Summary of Contents for BasicController CR0431
Page 228: ...228 10 Notizen Notes Notes...