Rules for Download-in-Run - Manual - Software Loader - The AX SIMATIC SW-Loader. - Software Loader (sld),tool

Software Loader CLI Tool (sld)

Portfolio
SIMATIC AX
Product
Software Loader
Software version
3.2.2
Edition
04/2025
Language
English (original)
Package Name
@ax/sld

When performing a delta-download in run, you need to be aware of the following rules:

  1. Changes made only inside the code part of FUNCTION, METHOD, and FUNCTION_BLOCK will not re-initialize the variables in the VAR section. This means that your new code will find variable values calculated by the previous code. For example, if you implemented a state machine, this might result in a surprising workflow because the current state might be misinterpreted, causing your state machine to switch into an unexpected state.

  2. Adding or removing variables, or changing the type of a variable in a VAR section of a CONFIGURATION, CLASS, or FUNCTION_BLOCK, will re-initialize all variables of your application. This also applies to variables in a STRUCT used in a location described before. Even renaming multiple variables may lead to a re-initialization of all variables.

  3. The change of an initial value of a variable in a VAR section is downloaded but will only be applied until the next structural change occurs or when the PLC is powered on again.

  4. The change of an initial value of a CALL argument of a FUNCTION or METHOD will be applied directly with the download.

Note

It is important to differentiate between a simple code change and a "structural change":

  • A simple code change will succeed in download-in-run in most situations. The variable values calculated by the previous code will still be present, and as long as the code logic can handle these values appropriately, the system should continue to operate as expected.

  • A change that includes a "structural change" will reset all variable values while your machine is processing. Your PLC program must handle this case to avoid potential damage to the machine.

The Software Loader cannot decide in advance which case will happen during the download. Therefore, it will abort the download if it detects a "structural change" in your application by default. However, in certain scenarios, such as executing a download in a CI pipeline, it might be necessary to enforce a download-in-run including structural changes. In such cases, you can use the --accept-reinit-variables option, acknowledging the potential risks and choosing to proceed with the download.