Remanent and persistent data

There are special flags for remanent and persistent data in the higher memory area.

Remanent data

The remanent data is located in the flags area. The default setting is for 64 remanent bytes, i.e. from %MB0 to %MB63. This region can be expanded to a maximum size of 4 kbyte. It should be borne in mind that the task time increases with the quantity of remanent data (approx. 0.5 ms for 512 bytes). The settings for the remanent data can be made via the (TwinCAT) System Manager, or with the KS2000 configuration software (Table 1, Register 15, default value 64 max. 4 kbyte).

Persistent data

Persistent data is even more stable, and is retained even through a program download. The number of persistent data must be greater than or equal to the number of remanent data! Like the remanent data, the persistent data is located in the region allocated for flags (%MBxx). You can make the settings for the persistent data using the KS2000 configuration software (Table 1, Register 18, default value 0, max. 4 kbyte).

Sample

400 bytes of remanent data, of which 200 bytes should be persistent
Register 15 400 (%MB200 ... %MB399)
Register 18 200 (%MB0 … %MB199)