Here are the steps to backup and restore your persistent variables in Codesys when you update firmware.
Create a new Recipe Manager, Right click on Application→Add Object→Recipe Manager
Add the Recipe Manager to your application
Login to your EPIC and download/online change to add the Recipe Manager
Open your Persistent Variables list Select all variables you want to back up and right click→“Save Current Values to Recipe”
Uploading: 6-System Auto Generates Recipe Open the Recipe.png…
Codesys will add a new table to your Recipe Manager called “PersistentVariables”
Open the new “PersistentVariables” Table and right click→ “Save Recipe”
After saving you can open the *.txtrecipe file and verify the values were stored.
Update the controller firmware, which will reset your persistent variables to the defaults
Open the “PersistentVariables” Recipe and right click→”Load and Write Recipe”
Select the appropriate write parameter and load the *.txtrecipe file.
Verify the data was written to the Persistent Variables List