Updating firmware and automation projects

Updating in general

In agile development, updating is a crucial task. In PLCnext Technology there are many ways to perform updates:

Means... ...for updating
firmware PLCnext Engineer projects PLCnext apps Manually downloaded
ACF or PLM components
Device and Update Management (DaUM)
(if created with
PLCnext Engineer
2023.6 or newer)
OPC UA® Server (e.g. with UaExpert)
Proficloud
(if created with
PLCnext Engineer
2022.9 or newer)
PLCnext Store
Web‑based Management


(Offline installation
from PLCnext Store)

Web‑based Management 2 (WBM 2)
pages Update and Backup & restore

(if created with
PLCnext Engineer
2025.0 or newer)

(Offline installation
from PLCnext Store)
PLCnext Engineer (IEC 61131‑3C++, or C# programs)
SFTP software (e.g. WinSCP)

Note: In order to update to a current firmware release, a firmware version 2022.0 LTS or newer must be installed on the controller. Firmware versions 2021.9 and before will not accept the *.raucb firmware update file.

  • Coming from devices running on 2019.0 LTS up to 2021.9 firmware, first update to the 2022.0 LTS release.
  • After restarting under firmware 2022.0 LTS, update to the newer release.

PrepareForUpdateStateMachine

Availability see implementation overview

Starting with releases 2023.3 of the Device and Update Management (DaUM), a state machine named PrepareForUpdateStateMachine began to play a central role in a growing number of scenarios of updating firmware or automation programs on your PLCnext Control.

For programming a PLC application, developers should know how to handle the "handshaking" processes depending on the PrepareForUpdateStateMachine, by adding proper variables, publishing them in their config files, and setting up status/error notifications. Afterwards, their PLC applications can be updated by users via WBM 2 (SystemUpdate page), and the same goes for updating via DaUM or via OPC UA® directly.

In addition, the Backup & restore mechanism by means of the WBM 2  (SystemBackup & restore page) depends on this PrepareForUpdateStateMachine.

Implementation

The following overview shows the implementation of the PrepareForUpdateStateMachine in tools and apps.

Issued by PrepareForUpdateStateMachine implemented
Device and Update Management (DaUM) firmware release 2023.0 LTS or newer;
DaUM Windows® service 2023.3
OPC UA® Server (e.g. via UaExpert) firmware release 2023.3 or newer
Proficloud firmware release 2024.0 LTS or newer
PLCnext Store – not applicable 
Web‑based Management – not implemented, see WBM 2
Web‑based Management 2 (WBM 2)
pages Update and Backup & restore
firmware release 2025.0 or newer
PLCnext Engineer (IEC 61131‑3C++, or C# programs) – not applicable 

Coupling between PrepareForUpdateStateMachine and PlcState

Before and during update processes, the current state of the controller needs to be switched on demand. For example, before stopping the PLC for a firmware update on the controller, the processes in the production plant need to go into an intermediary holding state. For such an action, the basic PLC state wouldn't suffice. Therefore, update processes in PLCnext Technology from now on rely on the PrepareForUpdateStateMachine, which is based on the OPC UA standard.

States and changes of the PrepareForUpdateStateMachine

In the Idle state of the PrepareForUpdateStateMachine, the controller can switch between the states of the PlcState machine (for all details see full description of the PlcState machine). 

Updating is triggered by a Prepare command; if it needs to be cancelled during Preparing state, an Abort command brings the machine back to the Idle state.

In the PreparedForUpdate state, switching the PlcState is prohibited by the PlcState:Suspended flag, and therefore firmware updates, backups or restore actions can be performed. 

By issuing a Resume command, the PrepareForUpdateStateMachine is brought back to the Idle state. 

States and changes of the pre-existing PlcState

How applications work with the state machine

These are the usual "handshaking" procedures:

  • During transition from Idle to Preparing state, PLC applications are informed by a Prepare request and can react to that by invoking a procedure to pause operation. The duration of the operation is not restricted in any way. Therefore, a manual method ForcePrepare is available in case the application doesn't react any more after a Prepare request. Once the preparation is completed the PLC application informs the SoftwareUpdate component about being in the PreparedForUpdate state. Then the SoftwareUpdate component stops the PLC (resulting in PlcState::Stop) and the update process can be performed.
  • During transition from Preparing to Resuming state, PLC applications are informed by a Resume request and can react to that by invoking a procedure to resume operation. The duration of the resuming operation is not restricted. Once resuming is completed the PLC application informs the SoftwareUpdate component about being in the Idle state.
  • Whenever the SoftwareUpdate component needs to abort a current operation that relies on the PrepareForUpdateStateMachine, PLC applications are informed by an Abort request. PLC applications should instantly abort the operation in question so the state machine goes to the Idle state. Note: For use in the Resuming state, the Abort request is not yet specified in OPC UA® DI. 

 

 


• Published/reviewed: 2025-05-28  ✿  Revision 079 •