I want to save my persistent variablelist in to a recipe. I now that this can be done marking the variables rightclick and press SaveCurrentValuesToRecipe, i would like to trigger this command in the PLC program by some logic. Can this be done and how
Check Recipe Management library. For example, method ReadAndSaveRecipe
Example from CODESYS Store:
Reviving this old thread as I'm trying to find the same solution. The links above don't work any more.
I need to programmatically save the current values of my persistent variables once a night to a recipe file to ensure they are backed up in case of a power failure.
Below is the link to codesys help for "Save Current Values to Recipe" but nowhere does it show how to do it or an example.
"Save Current Values to recipe".
If anyone can point me in the right direction id really appreciate.
Thanks a lot for your reply.
This is great. The only thing I'm missing now is an equivalent command to restore the persistant recipe values from the same file that is used in the "Read and Save Recipe" method.
Just need the equivalent to use within my apllication of this.
Has anyone used this before??.
Are you sure that you need exactly this command? (with note "You would normally select this command after executing the command Reorder list and clear gaps"
Maybe the "common" way will work for you...
Thanks for your help again. So i now have what I want using the below commands.
I needed to create the backup file incase of a power cut in which case i can simply rename it to the same name as the persvars file and reload.
Thanks for your help again. So I now have what I want using the below commands.
I needed to create the backup file incase of a power cut in which case I can simply rename it to the same name as the persvars recipe file and reload.
Log in to post a comment.