Setting up the "non-volatile data" function

The software module allows for storing division remainders (e.g. during scaling), the last input variables (data source) and the calculated output variable in a non-volatile manner. For this purpose, persistent variables are declared in the IEC program.

Operating principle

The data is exchanged consistently in the task CallMain between the task Main and the task HighPrio and is copied to the persistent data area. During initialization and after starting the MOVI-C® CONTROLLER, the data is read back from the persistent buffer and is copied to the corresponding structures. If the difference (absolute) between the currently read value and the previously stored value is greater than the configured value for Warning limit, then a warning is issued and the output variable xReferenced is set to "FALSE".

Procedure

Do the following to set up the function:

  1. In the IEC Editor in the device tree, add a new object "Persistent Variables" to the Application object.
  2. Compile (build) the IEC project.
  3. Open the newly added "Persistent Variables" object.
  4. Place the cursor in the code of the object at the position where you want to add the data.
  5. On the "Declarations" tab, click [Add all instance paths].
    • All instance paths are created in the "Persistent Variables" object.