I am looking into running a “warm reset” + “start” operations on PFC200 PLC trough an API/remote connection.
The main use case is that in our project the controller will read some configuration data at the startup from a separate database. When we are changing the configuration on the DB it would make sense to send “warm reset” command to the PLC to make sure that all previous configurations have been wiped.
One solution would be to just send reboot command to the PLC trough SSL connection. But it is a bit inconvenient to wait for the full bootup process every time the config has been changed.
There are methods in WagoAppControl library for this functionality, but after testing it looks like it is impossible to start the program after a warm reset. Since we are running only 1 application, when the app has been stopped by the reset command it cannot restart itself. There was also note about this in the docs.
Thank you for the example. I think this is the official way to add this functionality.
Still have to say quenorha’s suggestion is pretty tempting, since it does not require any additional configuration to the project.
What do you think Patrik, is there any downsides in restarting the runtime compared to the official solution here? One thing I noticed is, that after restart Codesys will loose the log in credentials and requires username/password on next log in, but that is very minor thing for our use case.