simons - 2023-02-22

I do CoDeSys trainings and need to make things look easy. I find that this handling has gotten much worse (BUG) or I'm missing something.

Beginners declare variables using Autodeclare.
Even beginners need Persistent Variables.
To store them all in the PersistentVars list is not an option. They need to be stored in many different GVLs for struture.

A few codesys versions ago I could create perstistent vars using autodeclare for any GVL. Then in PersistentVars I chose add all instance paths. done.

Nowadays Auto Declare automatically switches to object PersistentVars if I Check Box Persistent.

Its misleading because declaring Var first in GVL and then in PerstentVars list makes it look like everything is fine because the variable is created with path to GVL in persistentVars. But it doesn't work as a Persistent. After program update the value is gone.

[-img src=autodeclare persistent.jpg width=50%: missing =-]

I can solve this by manually writing keyword Persistent in a GVL and then add all instance paths. Not a good solution for beginners.

I think this is a bug or I'm missing something.