douglasfcx
Member
Using: Wonderware System Plataform 3.0 SP2; Intouch 10 SP2.
I used the Archestra to create objects using a script to automatically assign object attribute I/O references based upon the object instance name.
It was working fine but in some point, when I needed to create new objects, the script stopped to work. The same script that worked for the older objects dont create the references anymore.
The objects indicate one Warning for each reference in script, in the objects properties I can check the warning messages:
"Warning - Script: Could not resolve reference Me.Script.ExecutionCnt in attribute - Script._ExternalReferences"
"Warning - Script: Could not resolve reference Me.Tagname in attribute - Script._ExternalReferences"
"Warning - Script: Could not resolve reference Me.At in attribute - Script._ExternalReferences"
...
This is the script:
Script Name: Script; ExecutionType: Execute;
Expression: Me.Script.ExecutionCnt <= 2 AND Me.Ready==false;
Trigger Type: While True;
if Me.Script.ExecutionCnt == 2 then
Dim sString as System.String;
sString = Me.Tagname;
Me.NameTag = sString.Remove(0,sString.IndexOf("_")+ 1);
Me.At.InputSource = "PLC." + Me.NameTag + ".At";
Me.St.InputSource = "PLC." + Me.NameTag + ".St";
Me.Alr.InputSource = "PLC." + Me.NameTag + ".Alr";
Me.Mnt.InputSource = "PLC." + Me.NameTag + ".Mnt";
Me.Sd.InputSource = "PLC." + Me.NameTag + ".Sd";
Me.Clr.InputSource = "PLC." + Me.NameTag + ".Clr";
Me.Fal.InputSource = "PLC." + Me.NameTag + ".Fal";
Me.Te.InputSource = "PLC." + Me.NameTag + ".Te";
Me.Fr.InputSource = "PLC." + Me.NameTag + ".Fr";
Me.Fw.InputSource = "PLC." + Me.NameTag + ".Fw";
Me.En.InputSource = "PLC." + Me.NameTag + ".En";
Me.Ready = true;
endif;
I use Tagname field to remove the "underline" and then i use the name of object in NameTag, to use the same name that the PLC (ControlLogix5000).
What could I do for that the Archestra execute the script for the new objects?
I used the Archestra to create objects using a script to automatically assign object attribute I/O references based upon the object instance name.
It was working fine but in some point, when I needed to create new objects, the script stopped to work. The same script that worked for the older objects dont create the references anymore.
The objects indicate one Warning for each reference in script, in the objects properties I can check the warning messages:
"Warning - Script: Could not resolve reference Me.Script.ExecutionCnt in attribute - Script._ExternalReferences"
"Warning - Script: Could not resolve reference Me.Tagname in attribute - Script._ExternalReferences"
"Warning - Script: Could not resolve reference Me.At in attribute - Script._ExternalReferences"
...
This is the script:
Script Name: Script; ExecutionType: Execute;
Expression: Me.Script.ExecutionCnt <= 2 AND Me.Ready==false;
Trigger Type: While True;
if Me.Script.ExecutionCnt == 2 then
Dim sString as System.String;
sString = Me.Tagname;
Me.NameTag = sString.Remove(0,sString.IndexOf("_")+ 1);
Me.At.InputSource = "PLC." + Me.NameTag + ".At";
Me.St.InputSource = "PLC." + Me.NameTag + ".St";
Me.Alr.InputSource = "PLC." + Me.NameTag + ".Alr";
Me.Mnt.InputSource = "PLC." + Me.NameTag + ".Mnt";
Me.Sd.InputSource = "PLC." + Me.NameTag + ".Sd";
Me.Clr.InputSource = "PLC." + Me.NameTag + ".Clr";
Me.Fal.InputSource = "PLC." + Me.NameTag + ".Fal";
Me.Te.InputSource = "PLC." + Me.NameTag + ".Te";
Me.Fr.InputSource = "PLC." + Me.NameTag + ".Fr";
Me.Fw.InputSource = "PLC." + Me.NameTag + ".Fw";
Me.En.InputSource = "PLC." + Me.NameTag + ".En";
Me.Ready = true;
endif;
I use Tagname field to remove the "underline" and then i use the name of object in NameTag, to use the same name that the PLC (ControlLogix5000).
What could I do for that the Archestra execute the script for the new objects?