Retain variables are not saved in a mode protecting against mains failure

Which products are affected?
EVS93xx-EI (Servo PLC V6.x)
EVS93xx-ET (Servo PLC V6.x with technology function)

What happens?
If RETAIN variables (variables saved in a mode protecting against mains failure) are also connected to a user code by means of the Instance Parameter Manager (tab: Resources) these variables show the following behaviour when the PLC target system is restarted:
The variables indicate the values which had been saved via C0003 before the PLC has been switched off and not the ones of the RETAIN variables before the switch off.

When does the problem occur?
The response described before occurs if the DDS project has been generated for a Servo PLC V2.x and is loaded into a Servo PLC V6.x.

Possible diagnostics?
None.

Short-term measures/recommendations?
  • Instead of one RETAIN variable which is to be connected to a code, declare two variables. Declare one variable as RETAIN variable and connect the other variable by means of the Instance Parameter Manager to a code. Copy the value of the RETAIN variable into the variable which is connected to the code in the system POUs PLC_ColdStart and PLC_Restart. Afterwards, copy cyclically the value of the code variable into the RETAIN variable. As a result, both variables have always the same value and are therefore saved in a mode protecting against mains failure even without having to save the parameter set with C0003 = 1.
  • Change the DDS project target system from Servo PLC V2.x to Servo PLC V6.x (tab: Resources>Target settings). Due to this change the PLC configuration of the project is deleted, i. e. the system POUs required must be re-entered in the PLC configuration (tab: Resources>PLC configuration).

Evaluation:
If, in a project, RETAIN variables have been connected to user codes a DDS project which has been created for a Servo PLC V2.x cannot be loaded in a Servo PLC V6.x without changing the program. In practice, the connection of RETAIN variables with codes is used very rarely.

URL for linking this AKB article: https://www.lenze.com/en-de/go/akb/200605984/1/
Contact form