Knowledge Base
cancel
Showing results for 
Search instead for 
Did you mean: 

Script public numerics not holding their values after a cold start or upgrade

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. 

Environment

  • Script Programs

Cause

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 variables 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 I/Os and Public variables will go to the initial values. If the initials values are not set properly then the site may not come back up according to the expected sequence of operation. 
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. 

Tags (1)
Labels (1)
Version history
Revision #:
1 of 1
Last update:
‎2018-09-10 05:59 AM
Updated by: