Can you verify what happens with the persistent variables when you upload your CODESYS configuration via a Boot Application (not a simulation or direct download)? From my experience, when uploading with a Boot Application, the variables do not retain.
Hi, No it should work with boot application because a copy of the application will be stored in the target device (PLC or any controller like Raspberry Pi). I tested this with a Festo PLC. What I've done: Create a project and the persistent variable like in my Video. Create a boot application. Change the values. Power on and off. (Even I closed the codesys and then restarted it). --> The values are retained.
@@industrial_automation thanks for replying! When you uploaded with a boot application, you didn't download the project to the PLC/Device before that? You only used the Boot Application to send the project across? I'm away on holiday at the moment, but when I'm back in front of my demo rigs, I'll try it with your method and see if it resolved the issue I have with persistence variables not retaining when using Boot Applications. Hopefully it does!
@@darrenewer I did the download. Even I changed some part of code and downloaded the changes. It works. (Be carefull just not to change the persistent variables. If you change them the values will be lost)
@@industrial_automation if you tried this by directly downloading the program into the device via ethernet, then that's masking the problem I'm talking about. Try a brand new program, brand new device with no program installed. Create a new codesys project with persistence variables, and then create a boot application. Add the program to your device via the boot application (not ethernet). You may find the problem I'm talking about with the presence channel files not being transferred across within the .app and .crc files.
@@industrial_automation yeah, this method doesn't work if you only use the Boot Application method to transfer your project across (i.e. laptop NOT connected to PLC). You'll notice within the PlcLogic folder that the ac_persistence folder is missing. It only transfers across when you perform a direct download (i.e. laptop connected to PLC).
Thanks for the video
You're very welcome.
Can you verify what happens with the persistent variables when you upload your CODESYS configuration via a Boot Application (not a simulation or direct download)? From my experience, when uploading with a Boot Application, the variables do not retain.
Hi,
No it should work with boot application because a copy of the application will be stored in the target device (PLC or any controller like Raspberry Pi). I tested this with a Festo PLC. What I've done: Create a project and the persistent variable like in my Video. Create a boot application. Change the values. Power on and off. (Even I closed the codesys and then restarted it). --> The values are retained.
@@industrial_automation thanks for replying! When you uploaded with a boot application, you didn't download the project to the PLC/Device before that? You only used the Boot Application to send the project across? I'm away on holiday at the moment, but when I'm back in front of my demo rigs, I'll try it with your method and see if it resolved the issue I have with persistence variables not retaining when using Boot Applications. Hopefully it does!
@@darrenewer I did the download. Even I changed some part of code and downloaded the changes. It works. (Be carefull just not to change the persistent variables. If you change them the values will be lost)
@@industrial_automation if you tried this by directly downloading the program into the device via ethernet, then that's masking the problem I'm talking about. Try a brand new program, brand new device with no program installed. Create a new codesys project with persistence variables, and then create a boot application. Add the program to your device via the boot application (not ethernet). You may find the problem I'm talking about with the presence channel files not being transferred across within the .app and .crc files.
@@industrial_automation yeah, this method doesn't work if you only use the Boot Application method to transfer your project across (i.e. laptop NOT connected to PLC). You'll notice within the PlcLogic folder that the ac_persistence folder is missing. It only transfers across when you perform a direct download (i.e. laptop connected to PLC).