11BProgramming
66BRemanent PLC data (flag)
12-5
12.4
Remanent PLC data (flag)
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
The remanent variables are stored, just like all the other data, in the volatile SRAM
memory and are not automatically stored in the flash memory! The library
"ifm_AsiUtils_010000.lib" contains a function to store 1 Kwords of remanent vari-
ables if required.
CAUTION
Due to the design the maximum number of possible write cycles for the flash
memory is limited.
|
Do not poll the PLC cyclically! Possible loss of data due to destruction of the
memory!
►
Store remanent variables separately only if required.
For this reason, only statical information such as formulations or target times
should be stored in the remanent storage section. When the voltage is restored,
the section 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 val-
ues such as counter values. In case of power failure these 80 words are automati-
cally stored 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 0xFFB00.
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 units with the firmware RTS 2.x and replaces the
previous libraries "ecoasi20.lib" and "ecoasi21.lib".