Issue
Trying to run a Script program from a Graphic but getting error Read Only Property.
The control in the Graphic has been bound to a VALUE object, in the Script program an output variable (ManualChange in the code below) is bound to the same VALUE object.
The program is supposed to toggle the value of 'theOutput' when triggered by setting 'ManualChange' from the Graphic, this works in versions prior to 1.4.
Numeric Output theOutput, ManualChange LEAD_CHANGE: ManualChange = Off Goto WaitForManualCHG WaitForManualCHG: If ManualChange = On then if theOutput = on then theOutput = off else theOutput = on Goto LEAD_CHANGE endif
Product Line
EcoStruxure Building Operation
Environment
- WorkStation
- Automation Server - AS
- Enterprise Server - ES
Cause
Starting in version 1.4, SmartStruxure does not allow more than one write reference to the same VALUE, once a write reference is defined for a value or other references to the same value are READ ONLY.
Resolution
Change the ManualChange variable in the Script to a PUBLIC and then from the Graphic bind directly to it.
Numeric Output theOutput Numeric public ManualChange LEAD_CHANGE: ManualChange = Off Goto WaitForManualCHG WaitForManualCHG: If ManualChange = On then if theOutput = on then theOutput = off else theOutput = on Goto LEAD_CHANGE endif
See screen shot below of the binding in the Graphic