Issue
With the "Apply initial value" property activated in a script program, there may be confusion on how this impacts the operation of the program after a cold start of the controller, which includes system upgrades.
Product Line
EcoStruxure Building Operation
Environment
Script Programs
Cause
In SmartStruxure versions up to and including 1.9.X, when the “Apply initial value” property of a script program is set to Yes, then the following scenario will occur upon a cold start of the server;
- The inputs, outputs, and public numerics will revert to the initial values set in the script program.
Note: It is important to keep this in mind before upgrading a site that has script programs in the database. If the “Apply initial value” setting is Yes, then the Input, Output, and Public Numerics will be re-initialized with their Initial Value attribute. Depending on whether these attributes were configured and/or the application, upgrade or cold start may result in data loss or unexpected behavior.
Resolution
Versions up to and including 1.9.X
If the values of public numerics need to be retained after a cold start in a script program:
- The "Apply initial value" property must be set to No.
- Outcome after a Cold Start:
- Inputs and Outputs will go to null
- Public Numerics will retain their last known value
If the values of the public numerics need to go to their configured initial value:
- The "Apply initial value" property must be set to Yes.
- Outcome after a Cold Start:
- Inputs and Outputs will go to their configured initial value
- Public Numerics will go to their configured initial value
Warning: If "Apply initial value" is set to No, it has been observed in upgrades to version 1.9 that some public numerics do not retain their last known value. The fix for this issue has been assigned to EBO 2.0.