Wonderware Simple Script

geniusintraining

Lifetime Supporting Member + Moderator
Join Date
Jun 2005
Location
SC
Posts
8,272
Is there a one shot command in script?

The code I would like to write is indexing a system value by one when the input goes from false to true one time, I have tried several different things

Code:
IF NOT Discrete_Tag 
THEN
	System_Tag = (1 + System_Tag);
ENDIF;

This works but continues to count because, the input stays true for a longer period of time, I would like for the number just to index one, I know that I can do the logix in the PLC but…I would like to learn more script programming

Anyone know of any good reading material for the basics?, I am reading Wonderware’s manuals and RSView but would like more.


Many Thanks
 
You could use a condition script (On True or On False) and I believe you will get the proper result.

You put your "NOT Discrete_Tag" in the condition and your counter in the body of the script and select the On False condition.

Let me know if this works for you.
 
What about

IF Discrete_Tag AND NOT OS ( OS = internal tag )

THEN
SYSTEM_TAG = SYSTEM_TAG + 1;

OS = Discrete_Tag;

EndIf;

Not sure about wondareware script, but this works in ST. Peter N gave me this example a while back.
 
Use a condition script where the condition would be YourDiscreteTag and then increment your counter on the ON TRUE script page. The ON TRUE will only run once when the condition goes from false to true.

You could also do it in a Data Change script where you watch YourDiscreteTag, then in the body of the script write

IF YourDiscreteTag THEN
counter = counter +1
ENDIF

Note that if you simply use the tagname without an ==1, Intouch assumes you mean TRUE or =1

I'd use the condition script.
 
Last edited:
webhead said:
Let me know if this works for you

Thanks for the help, I used Data Change and it worked :D, I tried condition but could not get it...I think it was me, not the program

Also like Scott's/Peter's out of the box...

Thanks to all
 

Similar Topics

Hi again. I have a question about wanderware. Althought, I am not working directly with it. I am making some modifications in an AB SCL5...
Replies
14
Views
9,497
DaMan
D
Hi guys, I have experience with PLC to Excel etc...just starting on using intouch scada screens. I have an Excel sheet that uses mainly...
Replies
1
Views
127
Hello everyone, Recently, my Archestra IDE shut down while I was editing. After restarting the IDE, I noticed warning symbols under my opened...
Replies
1
Views
96
Good morning all. I'm working on a rehab where they had a standalone InTouch 2014 HMI that they called a SCADA, but it's really basic stuff. The...
Replies
4
Views
170
Hi, We are setting up an Aveva Plant SCADA node with the intention to connect it to a Wonderware Historian node. Everywhere I look online I see...
Replies
1
Views
162
Back
Top Bottom