News:

  • July 02, 2026, 04:27:46 AM

Login with username, password and session length

Author Topic: Timer reuse  (Read 7897 times)

Garyhlucas

  • Hero Member
  • *****
  • Posts: 421
Timer reuse
« on: June 08, 2015, 11:29:44 AM »
I have a number of stages where a timer is used to control the filling of a tank.  When the timer finishes the program jumps to another stage.  This tank gets filled repeatedly, always with the same amount of time. Can the timer be reused in other stages when only one stage is active at a time and the timer done bit is only used in the same stage that contains the timer? Otherwise I needs lots of timers and lots of setpoints for the timers.

plcnut

  • Hero Member
  • *****
  • Posts: 814
    • premiersi.com
Re: Timer reuse
« Reply #1 on: June 08, 2015, 02:56:43 PM »
You can reuse the timer as long as you are aware of the resetting that will happen upon JMP.
Circumstances don't determine who we are, they only reveal it.

~Jason Wolthuis
Premier Systems Integration, LLC
http://premiersi.com

Garyhlucas

  • Hero Member
  • *****
  • Posts: 421
Re: Timer reuse
« Reply #2 on: June 10, 2015, 09:27:57 PM »
Thanks,
I knew the timer would reset on a jmp but that's fine as the timer timing out is what executes the jump.

PLCGuy

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 677
Re: Timer reuse
« Reply #3 on: June 16, 2015, 12:00:35 AM »
Just one thought. On something like that timer filling the tank. I would normally put that in a stage such as "Filling Tank" that is always set or active. then use a stage bit to the timer to turn it on and off. you would just have parallel stage bits turning the timer on and off or some variation. You can control the setting of that state at startup or reset it at the e-stop condition or what ever. Not sure how you do your safety things. Anyhow you would have it all in one spot so who ever reads the program does not have to look all over the place for bits turning on/off the tank filling.