This object is a global variable list (GVL), which only contains persistent variables of an application. Thus it has to be assigned to an application. For this purpose, it has to be inserted in the
via selecting the respective node, clicking the green plus button, and selecting .Consult the Programming Guide specific to your controller for information on the behavior of remanent variables.
Only those variables which are declared with VAR PERSISTENT
and which are contained in this list are persistent. The command adds all PERSISTENT
declarations found in other POUs to the list.
Variables declared with VAR PERSISTENT
are also retain variables. Retain variables have the capacity to keep their values after executing a command. The difference is, that persistent variables are only reinitialized upon executing the command or by a new application download (after the application had been removed from the controller). An exception is made if you modified their names or data types.
Persistent variable list
For further information, refer to the description of remanent variables.
Also refer to the description of the special commands for handling persistent variables.
Edit a persistent variable list in the persistence editor, which corresponds to the GVL editor. The VAR_GLOBAL PERSISTENT RETAIN
is already preset in the first line.
When you add variables to an application, you can declare some of the variables as remanent variables. Remanent variables can retain their values in the event of power outages, reboots, resets, and application program downloads. There are multiple types of remanent variables, declared individually as retain or persistent, or in combination as retain-persistent.
Consult the Programming Guide specific to your controller for information on the memory size reserved for retain and persistent variables in the different controllers.
To add a global variable list called Persistent Variables to your application, proceed as follows:
Step |
Action |
---|---|
1 |
Select the respective application node in the , click the green plus button, and select .Alternatively, you can right-click the application node, and execute the command . |
2 |
In the Add Persistent Variables dialog box type a name for this list in the text box. |
3 |
Click Add. Result: A persistent variable node is created in the . For an example, refer to the Overview paragraph in this chapter. |