<< to CrossControl homepage

Support & Service Center

Persistent variables in CoDeSys

Printer-friendly versionPrinter-friendly versionPDF versionPDF version

Persistent variables in CODESYS can be easily handled through the CODESYS persistent storage feature.

Attached below is a simple persistent storage example with code comments.

As also noted in the example, persistent storage of any data writes to the flash memory of the display.  The industrial flash memory used in the displays has a very high but still limited amount of writes before the flash will begin to wear.  Therefore, when programming applications it is recommended to limit the amount of writes to flash memory.  This can be done by purposely triggering the flash writes only when needed as opposed to writing to memory in a cyclic way.  If you are writing to flash more than a couple times per minute throughout your application life you are at risk for early wear.



Binary Data persistantvariable_demo.projectarchive302.29 KB