View Full Version : logic assistance
jcraft
December 4th, 2006, 11:23 AM
Okay, I need some assistance because I am new to this stuff. I have a small program built and working. What I would like to do but unsure how to do it is this. I am using GE plc and versapro. I would like to take a %Q output coil and tie it to a function so it will increment a count every time it goes on, Then, after it goes on say 3 times it will initiate another function and I will also reset at this time. I tried the counter but the problem is it keeps counting as long as the output is on. I need it to count 1 when the output is on, then it will go off, then when it goes on again, it increments to two and then when it gets to three it will energize another output coil. In other words when the output is energized three times another output will turn onand/off, I will reset the function and then after the output goes on again three times it will fire another output and so on. Any thoughts how to do this. Thanks
panic mode
December 4th, 2006, 11:40 AM
i'm not familiar with that brand but did you try using one shot?
Steve Bailey
December 4th, 2006, 11:53 AM
Are you using a counter or and ADD function?
If you are using an ADD function, you need to use a one-shot as Panic Mode suggested. A counter (UPCTR) function has a built-in one shot so it only increments on the off-to-on transition.
jcraft
December 4th, 2006, 12:00 PM
basically what I did was tie an output coil contact to an upctr and set the pv value to 3. However when I monitor when the output is energized for the first time the upctr counts up to two and turns on however, it just keeps counting up. That is where am getting confused
nswu1
December 4th, 2006, 12:11 PM
Show us what logic you have so far so when can better give direction.
Steve Bailey
December 4th, 2006, 12:39 PM
The most common error when using timers and counters in a Series 90 PLC is to forget that each timer or counter uses three consecutive %R registers. If the counter that is acting funny is addressed at %R00001 and either %R00002 or %R00003 are used anywhere else in your program (such as in the next timer or counter function), you could see erratic results.
Make a backup of your program and attach the file to a post. I'll take a look at it.
.