I’m curious if anyone is aware of a general procedure or best practices for performing upgrades on the PFC controllers? Specifically for systems that are deployed in the field, both for firmware and runtime applications where access to the codesys IDE is not available. Ideally I am looking for some method to be able to perform the upgrade (FW and application SW) via SD card or a simple application that can be run from a laptop by someone with limited technical knowledge.
The typical situation is that a customer might want their system updated to the latest version for security or enhancement reasons. Since deployment, the customer might have made configuration (settings) changes to their equipment and also added users in the runtime from the HMI. If the controller were to be updated with new firmware and an updated application loaded, these settings would be wiped out.
I would envision something like this:
Create a complete backup of the current application such that the controller can be rolled back to the original state if something fails. (Bootable SD card?)
Store current configuration and credentials (hash files?) on the SD card to load back into the controller after the upgrade.
Load new FW on the controller (via wagoUpload or is this possible from an SD card too?)
Load runtime application to the controller (via bootable SD card?)
Remove bootable SD card, insert original SD card with config files. From Application, trigger program for loading of config files and user credentials.
Carry out test to confirm that upgrade was successful
I have already written code to save configuration settings to a CSV file and load them back when the application is freshly installed. I don’t know how the user credentials are stored and whether it might be possible to carry those over after a firmware/ application upgrade.
Does anyone have some documentation they could point towards or tips that they might suggest looking at to carry out upgrades in the field? Is the process I described above possible to do?
Hello, so user credentials (Linux users) are stored in the PLC setting files:
During a wago upload upgrade those credentials and settings are kept.
Generally i’m only using a wago upload “.appload” file to do a proper update (FW and program).
WAGO upload also enable you to backup and restore files during the update.
Your customer could always do a full backup using an SD card but beware that most of the time the retain memory will be lost (try to find a way to save them in a file just for the update and first boot)
Option 1: use SD card to transfer the whole system, firmware and application
Option 2: Use “Firmware backup” from WBM page and select “PLC Runtime Project” to copy your application to a file, which can then easily be restored in the destination device.
Thanks for the feedback. Yeah basically I store all the retain tags in a csv file prior to the upgrade procedure. I will test these methods out and make sure everything is retained.
I understand that the linux users are retained on upgrade but I am using the legacy codesys visualization user management and was wondering if it might be as simple as saving the hash file containing the login credentials and copying that back into the respective location after a backup to retain them? I don’t know where to find this file though…
Thanks for the tip, I tried it out and it wasn’t the /home/codesys/PlcLogic/visu/webvisu_visuusermanagement.vum_loginvisualization.pb file that stores the user management data rather there is a CSV file with the name application_visuusermgmtdb in that same visu/ directory which appears to contain all the login details for the web visualization. I ran a quick test by copying the application_visuusermgmtdb to another directory, then on the device I deleted all users via the user management. Finally I copied the old database back into the visu folder and the users appeared in the user management and were able to log in again. I’m not sure if this will hold if I wipe the entire application and then copy that DB back in but it certainly looks promising! I will carry out some further tests at a later time.
I’m using WagoUpload with an appload file to update both the firmware and the application, and more.
With this method, you can:
Keep the PFC configuration (IP address, etc.)
Back up specific files (for example configuration files or application_visuusermgmtdb.csv)
Update the firmware if the controller is running a different version
Load the CODESYS application
Restore the backup files
Load specific files
Install IPK packages
If you want to try using an appload, you can install the CODESYS add-on “Add-on Appload Creator” from the WAGO Download Center. It automatically creates the appload package directly in CODESYS.
You’ll also find documentation explaining how to create or customize the wupload.cfg file (this file is the manifest used during the appload installation).