In CODESYS V3 internal PLC it is possibile to define:
The target of this FAQ is to explain how to create Persistent Retain and Constant variables in CODESYS V3 Workbench.
Execute a right click on Application item from project tree,
then expand Add Object and select Persistent Variables from the object list.
Give a name to the Persistent Variables object, or let the default PersistentVars.
By double clicking on PersistentVars in project tree, it is possible to define Retain Persistent variables.
If these variables have to be exported into the xml file, select them from Symbol Configuration (that has to be added to the Application).
Execute Generate code from Build menu.
In the project POU, create VAR CONSTANT section and define Constant variables.
Open Project Settings from Project menu.
From Compile option uncheck Replace constants checkbox
Execute Rebuild from Build menu.
If these variables have to be exported into the xml file, select them from Symbol Configuration (that has to be added to the Application).
Execute Generate code from Build menu.
CODESYS V3 internal PLC