wonderware scripting help

Daymond

Member
Join Date
Aug 2004
Posts
4
Hello. I am a electrician who has been to a wonderware programming traning course about 9 months ago and has not used any of training since. Our wonderware programmer has since retired and I have been asked to make a wonderware program to control a process on one of our machines. I have built the screen and everything seems to be going pretty good. I am have a little trouble with some of the scripting though. I am needing to write a script that will be a simple timing loop. I have a user input that allow the user to input a varible to controll the off and on time of a valve. I have user input tags that will allow them to set either value on the timer. I have a enable tag that while true I would like for a control valve to be off for 15 sec. then on for 10 sec. I have been able to get it to do this once but am haveing trouble getting it to sit there and continue to toggle back and forth. I was hoping that someone could give me a simple script the will allow me to use the tags for the on time and off time to sit there and cycle back and forth between on and off while the enable is true.
Thanks in advance
Daymond
 
Hello Daymond,

A couple of things you can do here. Remember though - Wonderware by itself is NOT good at timers (if you check their documentation they will tell you to put the timer in the PLC . . .).

What I would do is to have "analog input" values writing to "Integer" tags in Wondeware that are mapped to the timer "Presets" in your PLC. Without knowing your process, it sounds like you either have two or four timers, so you'll need two or four "analog inputs". In this case, just put some limits on your "analog input" data entry range, then people can type in the time delay they want, and you are all set!

If you need to adjust the On time and the Off time at the same time, you can do a "Data Change" script (one for each analog input) to change the other preset at the same time. (You could also handle that in the PLC which would probably be better).



If you want some "preset" time setups, you can put these into the script on a button, or a data change event. Again, the key is to have your PLC doing the timing, and map the "PLC timer preset" to an "Integer tag" in Wonderware. Then writing the script to change the "Integer" becomes easy.


Write more if this doesn't make sense.

Marc
 
I thought that would be the best way to go but I am using a AB slc 500/03 and will have to take the plc off line to set it up. That will be a bit of a problem because it is controlling a oven with a firing time of around 20 days. I will have to wait until it goes off line before I can do that. I will probably take that route though because it sounds like it is the way to go. I just wasn't sure if maybe I was missing something and there was an easy way to do it in wonderware that I wasn't seeing. Thanks alot for your input it sounds like good advice.
Daymond
 

Similar Topics

I am looking for a way to capture keyboard input data and store it in a tag. Something like ‘MessageTag = System.In.NextLine();” From there I can...
Replies
2
Views
2,256
Hello folks, Another newbie question so I hope this is a relatively easy question for someone with a bit of experience. I have a few selectable...
Replies
0
Views
1,423
I would like to learn how to write scripts for Wonderware HMI. I have the the InTouch HMI Scripting and Logic Guide but I am way too green to get...
Replies
1
Views
1,681
I was wonder if anybody has a Archestra script that would allow me to "Show" or "Hide" a window in a custom graphic that I am creating. Any help...
Replies
7
Views
7,718
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
128
Back
Top Bottom