Question:
Why can the motor potentiometer L_Mpot (and all the other function blocks that have an input characterised by XXRetain) not save the last value off-mains although everything has been compiled properly?
Answer:
The input dnActRetain has not been assigned a retain-type dummy variable. Although the program is correct, the value to be saved is in the RAM and is lost when the power supply is switched off.