Timer reset

f16bmathis

Member
Join Date
Sep 2013
Location
Wisconsin
Posts
131
I need to set a timer to start timing, and reset and continue timing if a PE is blocked before the timer times out. Sounds simple? Probably is, but I'm using the DN to keep it running, and as soon as its done, it resets and continues to run even with the PE no longer blocked.

Basic idea is as product passes by, a solenoid stays on. If product stops running by, after 5 or so seconds the solenoid shuts off. PLC runs 500.

Any help before I tear my hair out appreciated!
 
try using a TOF timer and see if that does it for you ...

use the DN bit (as before) to control the valve ...

NOTE: if this doesn't work, then explain your requirements again - and specifically tell us what you mean by the word "resets" ... more specifically, are you talking about the value in the ACCumulator - or the status bits - or something else? ...

TIP: if the TOF does work OK, then a quick trick toward understanding its operation, is to substitute the word "RUN" - instead of the word "DONE" - for the DN bit ...

CAUTION: if you end up using a TON - and you get it to work OK, then by all means - you should test the system's operation after switching the processor from PROGRAM mode - back to RUN mode ... in many cases, this will result in an UNEXPECTED operation of the solenoid valve ... OOPS! ... the same type of "gotcha" operation can happen if the power to the processor turns off - and then back on again ...
 
Last edited:
Probably is, but I'm using the DN to keep it running, and as soon as its done, it resets and continues to run even with the PE no longer blocked.

Then don't do that.

Just use the PE being on to run the timer.
If the timer is done (DN) turn off the solenoid. (Or more to the point, if the timer is not done, turn on the solenoid)

Edit:
You may have to invert your PE logic at the timer depending on if you are trying to determine a product being present every 5 seconds, or a product not taking longer than 5 seconds to clear the location of the PE. (Or maybe even both?) And whether it's a light operating or dark operating PE. It wasn't very clear what the case actually was.
 
Last edited:
CAUTION: if you end up using a TON - and you get it to work OK, then by all means - you should test the system's operation after switching the processor from PROGRAM mode - back to RUN mode ... in many cases, this will result in an UNEXPECTED operation of the solenoid valve ... OOPS! ... the same type of "gotcha" operation can happen if the power to the processor turns off - and then back on again ...

Ya. I normally use the TON as an additional "Timeout" of sorts, creating a Latch for the timeout condition. So it doesn't matter how many times the operator turns on/off that panel power trying to get the machine working. (I always wonder why people seem to think that cycling power will fix the problems...)
 
I just want the solenoid on while product is running. If product stops, I'd like the timer to time out and shut off the solenoid. Then when product starts running again, turn on the solenoid. It's for an air rinser, which is currently always on. I want to shut off the air when product is not running through, but turn on if it detects product again.

I've managed through some weird logic, to get the timer to go when product is there, but it counts up to the end and shuts off no matter if I have product flow or not. I need to reset the timer, but then it just stops right away.

Doing this all online...
 
I'm sorry - but obviously I'm not understanding what you're saying ... my best guess is that something like the following TOF timer arrangement is what you need ...

this is based on RSLogix500 software ... if you're using RSLogix5000/Studio5000 then you'll just need to adjust the timer's Preset value ...

good luck with it ...
.

tof_valve.PNG
 
Last edited:
Seems like you are using the Photoeye as a "Heartbeat" (or at least, what I would call a heartbeat). Letting you know the system is "alive" or active.

In the past I have used a combination of two TON timers to detect heartbeats changing state. One driven by the input ON, one driven by the input OFF. If either timer reaches it's DONE value, then I know the system is no longer active (due to fault or some other reason). If the inputs change state again, it is active again. I chose to do both ON and OFF inputs because I felt the input should always be toggling ON/OFF during a normal operation. And did not want it to assume activity if the input was left in either State. In this case no product, or even jammed product (at the PE).

I'm sure there are many ways to approach this though.
 
It's easily accomplished with a free running TON and a RES of that timer.

Your logic is:

TON T4:0 5.0 (always running)

XIC PE ONS B3:0/0 RES T4:0 (anytime a rising edge of photoeye is detected reset timer)

XIO T4:0.DN OTE SOL (as long as timer doesn't time out, IE photoeye being blocked, keep solenoid on).
 
It seems to me that Ron's solution is the best, it is essentially what a TOF timer is best suited to.... This timing diagram reinforces Ron's logic structure, explaining how the .DN bit remains on for the preset time after the input stops...

2016-12-21_203920.jpg
 
It seems to me that Ron's solution is the best, it is essentially what a TOF timer is best suited to.... This timing diagram reinforces Ron's logic structure, explaining how the .DN bit remains on for the preset time after the input stops...

Not sure I agree...what if the part stops in front of the photoeye?
 
If you pulsed the PE input (ONS) to the TOF it would then work.

I just find most people understand the TON better. So two TON (one for OFF one for ON) looks better in my mind. But, many solutions, personal preferences, etc.

Edit:
I just tested the ONS TOF solution, and if I "jam" the conveyor (PE stuck on) until the TOF times out, it will not resume once I clear the PE input. So a jammed product would not get air rinsed in this case. So it wouldn't quite work the same.
 
Last edited:
If you pulsed the PE input (ONS) to the TOF it would then work.

I just find most people understand the TON better. So two TON (one for OFF one for ON) looks better in my mind. But, many solutions, personal preferences, etc.

Agreed....I use a single TON in solution #8....It's a logic I use all the time to determine if something is running (usually a zero speed prox).
 
Ron, Thanks! That won't work. I need something that will turn on and stay on unless there is nothing passing the PE within say 5 seconds.
 
It's easily accomplished with a free running TON and a RES of that timer.

Your logic is:

TON T4:0 5.0 (always running)

XIC PE ONS B3:0/0 RES T4:0 (anytime a rising edge of photoeye is detected reset timer)

XIO T4:0.DN OTE SOL (as long as timer doesn't time out, IE photoeye being blocked, keep solenoid on).

I like this idea, simple but effective. I'll try it on my virtual RSLogix at home and see if it'll work, but looks like it would!
 

Similar Topics

Hi there I'm guessing this is a straightforward one but after much experimenting I've been unable to find an answer. The software is TIA V16...
Replies
5
Views
2,336
Processor: 1769-L30ER; Logix 5000: v32.02 I have an AOI that's been used in previous applications without issue, and have added a TON...
Replies
6
Views
2,755
Hello Folks, I am new to Direct Soft, but a customer has a program that need me to edit. It is a DL06. We have a TMR function (T4) that we want...
Replies
24
Views
5,604
I would like to use a numeric entry from a C-more HMI to change the preset in a timer in Do-More. How might I go about that? Thanks
Replies
1
Views
1,273
Hello everyone‚ Fairly new to PLC prog I seek your advise concerning what is said in my thread title; I program using workbench components; I...
Replies
1
Views
1,255
Back
Top Bottom