When Renaming Variables Causes Re-initialization - 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

Renaming a single variable within a VAR section will not impact the allocated memory or the value stored at that memory location. The only thing that changes is the name of the memory location.

However, there are cases where renaming variables can lead to unexpected results. For example, if you simply swap the positions of two variables, the code may be adapted to the new memory locations, but the memory itself is not reset. This can result in critical behavior of your process.

To avoid such issues, the Software Loader re-initializes all variables whenever the same variable name is used for a different memory location inside the same VAR section. This ensures that the variables are properly initialized and avoids any unexpected behavior.

A re-initialization is also done after certain changes, such as adding a new variable or removing a variable from the VAR section.

Note

If you want to preserve the current values of your process when using 'download in run' with simple renaming, it is recommended to perform the renaming in multiple steps. This way, the Software Loader can properly handle the changes and maintain the integrity of the variables.