Declaring All variables As Persistent
Dear All,
I had all of my global variables declared as retain and i did not lose data after power cycle, but now after declaring all of my variables in "VAR_GLOBAL PERSISTENT" the values are now returning to its initial value every time i cycle the power!
Anybody has a clue?
Regards,
Abdelrazzaq Hiasat
I had all of my global variables declared as retain and i did not lose data after power cycle, but now after declaring all of my variables in "VAR_GLOBAL PERSISTENT" the values are now returning to its initial value every time i cycle the power!
Anybody has a clue?
Regards,
Abdelrazzaq Hiasat
Voted best answer
Hi,
Look in the help for Persistent - there is a detailed description for all available combinations

Most probably you need to declare variables as RETAIN PERSISTENT, not only PERSISTENT
Look in the help for Persistent - there is a detailed description for all available combinations
Most probably you need to declare variables as RETAIN PERSISTENT, not only PERSISTENT
Source: Codesys help
Add new comment