Wonderware System Platform Scripts

Ones_Zeros

Member
Join Date
Feb 2014
Location
at work
Posts
367
Hello
I have a Scripting question on a Wonderware System Platform.
I was needing to know how to write a script to add two values together.
for example i have two flow meters and i what to write a script that basicly says take flow meter value #1 (+) flow meter value #2 = flow_total

I dont know if something like this would work (Flow_Total=Flow#1+flow#2)
I can do this fine in an expression when totaling values on a tag, but I need to do this for trending.
Trend wont let me use two tags

Thanks for the help
 
You should just be able to select the history extension for the tag Flow_Total under the extensions tab in Archestra. You could then go to that tag in the trend after deploying and view the historical values. Have you tried that?
 
I'm not sure...
The Flow_Total tag is the tag I'm trying to create

I have 2 flow meters on site and i want to take the total of these two flow meters and Trend this total.

How would be the best way to take
flow#1
flow#2
Total up these 2 values and trend the total value?


Thanks
 
OK i may be getting somewhere
i can create memory real tags to total the I/O real tags

For example: (Flow_1 & Flow_2 are Memory Real Tags) and (Flow1_Value & Flow2_Value are I/O Real Tags)

Flow_1=Flow1_Value;
Flow_2=Flow2_Value;
FlowTotal=Flow_1 + Flow_2;

Question:
I have created "Memory Real" tags on stand alone Intouch, but how do you create Memory Real Tags on a System Platform?


Thanks
 
Create a new instance of the User Defined Object
Add 3x UDA's, flow1, flow2, flowtotal

Make flow1/2 have input extensions of your io path.
Add a periodic script to the UDO, add flow1/2 to get total.


This is based on having SP knowledge, let me know if you need screen shots.
Or, send screen shot of what you have so far
 
I do have limited knowledge of System Platform...

I would greatly appreciate if you could send screenshots when
you have time to make them


Thanks!!!!
 
Thanks for the screenshots...

Question: The object that I have created has other field attributes that is reading from the PLC.
(actuating valve & Flow from Totalflow#1)
the other flow is coming from a different object that was created.
will any of this affect me from adding these two values?

When creating the UDA's these are basically memory tags..right?
I've not dealt with UDA's alot in System Platform
can these be named what ever you want to name these? or do they need to be named the same as the the field attribute tag?
Flow1- Input source (would i specify the input in the extensions or UDA Tab)
Flow2 Input source (would i specify the input in the extensions or UDA Tab)
FlowTotal- memory tag

I will try to make some screenshots of what I have and send them to you
if you have time to review them I would appreciate it?

Thanks for your help
 
Thanks for the screenshots...

Question: The object that I have created has other field attributes that is reading from the PLC.
(actuating valve & Flow from Totalflow#1)
the other flow is coming from a different object that was created.
will any of this affect me from adding these two values?
As long as they are unique, then no.

When creating the UDA's these are basically memory tags..right?
No, but they can be. They have more flexibility than field attributes.

I've not dealt with UDA's alot in System Platform
can these be named what ever you want to name these? or do they need to be named the same as the the field attribute tag?
Yes, can be whatever you want, but must be unique.

Flow1- Input source (would i specify the input in the extensions or UDA Tab)
Flow2 Input source (would i specify the input in the extensions or UDA Tab)
FlowTotal- memory tag
Extensions

I will try to make some screenshots of what I have and send them to you
if you have time to review them I would appreciate it?

Thanks for your help
No problem, if you want send me the Object via PM, that way I can understand you config a bit better.
 

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,633
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,027
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,383
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,936
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,061
Back
Top Bottom