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

Trying to run a Script program from a Graphic but getting error Read Only Property.

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

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.

(See Lessons Learned Article #13949)

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

Tags (1)
Labels (1)
Version history
Revision #:
1 of 1
Last update:
‎2018-09-11 06:32 AM
Updated by: