2015-04-14 08:11

CoDeSys - How to backup variable values (Recipe Manager)
Uppdaterad:
2013-05-15
Språk:
EN
Informationstyp:
Knowledge
Procedure how to make backup of variable values from the Soft PLC (CoDeSys) to a file in a computer.
Attached example show the iX TxA-SoftControl device (Recipe_Backup.zip including):
- RecepieManagerExample.projectarchive (CoDeSys project of T4A SoftControl)
- ValueBackup1.txtrecipe (Example of backup text file)
- iX_T4A_SC_RecValues (iX Developer project of T4A SoftControl)
We have some global variables declared in the GVL list of a CoDeSys project:
And some values are set in the soft PLC (T4A SoftControl):
Add an object "Recipe Manager" to the CoDeSys application:
2015-04-14 08:11
Storage Type, File Extension and Selected Columns can be defined for the recipe file:
Add Recipe Definition:
2015-04-14 08:11
Add a new recipe column:
Select a name for the first Recipe column (ValuesBkp1):
2015-04-14 08:11
The column "ValuesBkp1" are created:
Import the global varialbes into the Recipe:
The variables of the GVL was included in the Recipe list, and when Login to the PLC we can monitor the Current Values:
2015-04-14 08:11
Now read values from PLC to Recipe:
Values are read to the Recipe tool of CoDeSys:
Save values to file:
2015-04-14 08:11
By using the function "Load and Write Recipe" the backup can be restored to the TxA SoftControl device.
The values in the file ValueBackup1.txtrecipe, can be edited with a normal text editor:
2015-04-14 08:11
Note!
Some important steps that need to be done according KI00326, see related link for details.
Export Variables to iX HMI
In Codesys we have to make a “XML” file for import to iX Developer. In order to be able to export application variables from CoDeSys to iX HMI a
“Symbol configuration” is needed. The XML file for iX Developer is created when you transfer the project to the TxA SoftControl or “Generate code” in
menu “Build”. The file is saved in same library as the “CoDesys” project.
- Highlight the “Application” entry in “Devices”
- Right click and select “Add Object”
- Choose “Symbol configuration”
- Enter chosen name in the “Name” option and click “Open”
Transfer CoDeSys project to TxA SoftControl
A gateway needs to be created in order to communicate between the PC and the HMI.
- Double click the “TxA SoftControl” option under “Devices”
- Select the “Communication setting” options
- If no gateway present, create one by selecting “Add Gateway” (choose default value)
- Highlight the gateway
- Press “Scan network” and wait until scanning is done
- All CoDeSys devices on the network will be listed below the gateway
Import of variables into iX Developer project
- Setup an iX application (TxA SoftControl)
- At this stage, it is time to import the variables that were exported from CoDeSys
- In “Functions”, double click the “Tags” option
- In the window, choose the “Import tags to” option
- Select the “CoDeSys V3 import format” (Import Modules) and browse to the location where the CoDeSys project is saved
- Choose the xml file with the same name as the CoDeSys project and press “Open”. Mark “Connect selected import file to project”.
- Select “Import”
- Select “All items” and press OK
- Press “OK” in the “Import Completed” dialog
2015-04-14 08:11