Storage in a non-volatile mode of the current value of user codes

Question:
How can the last set value of a user code be maintained even after mains disconnection?

Answer:
After mains connection user codes always get their initialisation code.

In order to maintain the last used value after mains disconnection, an additional variable in the interconnection can be used, which applies its value powerfail-proof. This variable is written in the codes with the first task sequence. Then the code writes itself.

For the realization a switch (L_TbSelect) and a not-logic (L_TbNot) are required. During the first sequence the variable (e. g.RetainVariable) writes the code [e. g. C3000S0 User code (retain)]. From the second task sequence on the not-logic changes the switch so that the code writes itself. It is The processing sequence must absolutely be kept.

Tips:
  • In case of several user codes the same function block with the Not-Logik (L_TbNot) can be used.
  • In order to switch to the view of the processing sequence in the function block editor switch from 'Editor' to 'Overview'.  

1 = Application of the user code in the application

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