Corrected from:
PLC Designer V3.26: Compiler-Version V3.5.17.40
Response of the new version:
After changing the initialisation value of a structural element, this change is applied after an online change or download.
What happens?
A variable of the type STRUCT does not take over the changed initialisation value of a structure element.
When does the behaviour occur?
The behaviour occurs when an initialisation value is changed in a structure and an online change or download is subsequently carried out. After a menu command 'Online' > 'Reset warm' or 'Online' > 'Reset cold', the corresponding variable is still initialised with the old value. Even if the boot application is updated with the online change or download and the controller is then restarted, the corresponding variable is initialised with the old value.
Which products are affected?
PLC Designer V3.24: Compiler-Version V3.5.17.20
Short-term measures:
After changing the initialisation value in a structure definition, perform the menu command 'Create' > 'Clean All'.
Alternatively, you can initialise the variable not in the structure, but in the declaration of the respective variable, which is of the type of the structure.
Evaluation / recommendations:
PLC variables are initialised with the value 0 by default. However, the initialisation value can also be changed in the PLC project. For variables of the data type STRUCT, the initialisation value can be changed in two places: in the definition of the structure or in the declaration of the variable. If the initialisation value is changed in the definition of the structure, this change does not take effect after a download/online change.
Automatic Translation