ifm
Basic Device Manual AS-i ControllerE M4 Target V15
2015-10-30
Programming
Remanent PLC data (flags)
151
12.4
Remanent PLC data (flags)
Three types of data can be stored in the PLC:
Remanent variable (in CoDeSys
®
declared as retain variable)
Volatile variable
(if not declared as "retain variable")
Remanent flags:
MW 0...79
Volatile flags
MW 80...127
Like all other data, the remanent variables are stored in the volatile SRAM memory and are not
automatically saved in the flash memory! The library ifm_Asi_Utils_xxxxxx.lib contains a function to
save 1 KWords of remanent variables if needed.
NOTICE
Due to the design the maximum number of possible write cycles for the flash memory is limited.
Do not save data cyclically! Loss of data due to the destruction of the memory is possible!
► Store remanent variables separately only if needed.
For this reason, only statical information such as formulations or target times should be stored in the
remanent storage area. When the voltage is restored, the area of the remanent variables with the last
stored values is restored.
Remanent variables are declared as "Retain variables" in CoDeSys
®
:
In addition, there are the remanent flag words MW 0...MW 79 to store dynamic values such as counter
values. In case of power failure these 80 words are automatically saved by the operating system and
restored when the voltage is restored. The flags in MW 80...MW 127 are not remanent!
12.5
System variables
System variables in the controllere can be indirectly accessed via a special table of pointers at the
basic address FFB00 h.
The easiest way to use these system calls is to integrate the supplied library ifm_AsiUtils_010000.lib in
your project.
The library applies to controllere devices with the firmware RTS 2.x and replaces the previous libraries
"ecoasi20.lib" and "ecoasi21.lib".