Wonderware System Platform - BindTo() & IOSetReferences()

tranh2

Member
Join Date
Jul 2009
Location
Ontario
Posts
40
Hey guys,

I'm just starting out learning about System Platform. I've managed to pickup the the plant model and deployment model concepts quickly. I understand the scripting pretty well other than some things listed below. I hope someone experts here can help. I'm running System Application 3.1 and Wonderware 10.1. If you feel an upgrade is necessary to make my programming life easier let me know.

1. The BindTo() function. What is the purpose of this? Is this the same thing as assigning tags to Indirect Tags in Wonderware 9.5? I've read the documentation and I'm having trouble getting this to work. I'm trying to create one popup window and dynamically reference tags/attributs to the indirect tags. The tags/attributes can be located in different $Areas and subareas. But all items are within the same $AppEngine. Example below. This script is just a script located in an "WhileShowing" of the symbol. LocalTag is a Custom Property Tag. When I similate me.Tagname.Auto.InAlarm to alarm, nothing happens:

Dim x AS Indirect;
Dim y AS String;

y = me.tagname + ".Auto.InAlarm";

x.Bindto(y);

LocalTag = x;

The above code doesn't seem to work. I read some technotes that say SetCustomPropertyValue function but I can't find anything about that. I also found another reference saying use the IOSetReferences function (see: Creating and Managing ArchestrA Graphics User’s Guide, Revision B
Last Revision: 11/3/08, page:247). But I can't find info for that function also also.

2. Second, what is the best practice for creating windows/navigation banners. Is it create windows in InTouch and embed objects and animate using the Show("Xxxx")/Hide("xxx") functions in InTouch? Or should all windows just be created in Application Server using scripts and symbol editor and use ShowSymbol, ShowGraphic & HideGraphic functions?

I'm excited to finally get the opportunity to learn this package since I've spent alot of time developing in Wonderware 9.5. Learning this software has been on my list for a long time. But I feel like wonderware did a great job in some areas and went backwards in already existing functionality. As mentioned above, maybe upgrading to the latest version will make my programming life easier?

Thanks all!
 
Hi everyone.
I'm answering this until now, but it can be still useful for someone.
I think that the problem "1." can be solved if the following code is used:

Dim timeout;
Dim x AS Indirect;
Dim y AS String;

y = me.tagname + ".Auto.InAlarm";

x.Bindto(y);

while (IsGood(x)==0); {if quality not good}
timeout=timeout+1; {increase the timer}
if timeout>10000 then {if timer reaches threshold}
exit while; {continue script execution}
endif;
endwhile; {otherwise just loop for a while}

LocalTag = x;

-----------------------------------------------------------------
Reasons:
"...an ArchestrA Symbol can be embedded into an InTouch window and run anonymously, the time it takes to connect to the reference can be longer than one scan cycle."
"The while loop provides additional time for the symbol to connect to the reference."

Source: Wonderware Creating and Managing ArchestrA Graphics User’s Guide (10/15/13). Page: 283.
 
Hello Tranh or anyone who is expertise in system platform.

Could any of you upload a galaxy in order to see how is the approach of using objects ?? I am using systemplatform and deploying.

But the only thing I deploy is the winplatform, winviewr , and the intouch app

So basically im still working with intouch tags but just having the possibility to deploty de app to different computers.

I would like to see how is the approach with the objects, and stop using intouch tags..

So if anyone can upload a galaxy it would be great !!

Thanks.
 
Using SetCustomPropertyValue() is the most common option for scripting in graphics, in your case:

SetCustomPropertyValue("LocalTag",me.tagname + ".Auto.InAlarm",false);

Where LocalTag is a Custom Property of an ArchestrA Graphic. Note the use of the quotation marks.
 
Using SetCustomPropertyValue() is the most common option for scripting in graphics, in your case:

SetCustomPropertyValue("LocalTag",me.tagname + ".Auto.InAlarm",false);

Where LocalTag is a Custom Property of an ArchestrA Graphic. Note the use of the quotation marks.

So the SetCustomPropertyValue can only be used in the object that has the Custom Property?

If I have a pump with a Custom Property called running I can change its value with:
SetCustomPropertyValue("Running",me.tagname + ".Auto.InAlarm",false);
but not?
SetCustomPropertyValue("Pump1.Running",me.tagname + ".Auto.InAlarm",false);
 

Similar Topics

Seems odd that you can make a symbol and place many of them but if the text on a button and or elsewhere in the symbol comes from a Custom...
Replies
0
Views
1,622
I was given some example code but I can not get the function to show up in the System Platform script. The dll import is successful but I'm...
Replies
1
Views
2,000
Hello Everyone! Need help with this... I have a controllogix plc 5571 which has just a USB port on it. I wish to read the data from this plc...
Replies
2
Views
2,376
Need your Advice. Scenario: I have got two SCADA computers at different locations which are having independent working plants at each site (But...
Replies
7
Views
2,921
Hi all, This is my first System Platform 2017 install. Have done plenty of mods to existing 2014 R2 installs and know what I'm doing in terms of...
Replies
3
Views
5,024
Back
Top Bottom