Host Engineering Forum

General Category => Do-more CPUs and Do-more Designer Software => Topic started by: Garyhlucas on June 08, 2015, 11:29:44 AM

Title: Timer reuse
Post by: Garyhlucas 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.
Title: Re: Timer reuse
Post by: plcnut 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.
Title: Re: Timer reuse
Post by: Garyhlucas 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.
Title: Re: Timer reuse
Post by: PLCGuy 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.