Host Engineering Forum

General Category => General Discussion => Topic started by: Henryp on April 27, 2015, 02:43:24 PM

Title: Timer present value
Post by: Henryp on April 27, 2015, 02:43:24 PM
Is it possible in a Do-More to read a timers preset value if it is hard coded?

Thanks
Title: Re: Timer present value
Post by: Controls Guy on April 27, 2015, 02:47:28 PM
Doesn't look like it.  Back in the old TI days, there was T1.Pre, but if you put T1 in a DMD data view, it looks like it's just Acc and flags.
Title: Re: Timer present value
Post by: Henryp on April 27, 2015, 03:00:05 PM
Long live the 5TI and PM550.
Title: Re: Timer present value
Post by: BobO on April 27, 2015, 03:06:54 PM
Is it possible in a Do-More to read a timers preset value if it is hard coded?

Thanks

Sorry, no.
Title: Re: Timer present value
Post by: Garyhlucas on April 27, 2015, 06:43:28 PM
What would you do with it if you could?  Look at the value and say "I'm screwed!"?
Title: Re: Timer present value
Post by: BobO on April 27, 2015, 07:25:19 PM
It's useful from an HMI. Beyond that, yeah, not much you can do with it.
Title: Re: Timer present value
Post by: franji1 on April 27, 2015, 08:59:20 PM
What would you do with it if you could?
Calculate time remaining XOR time passed based on whether it was timing up or down.
Title: Re: Timer present value
Post by: Mike Nash on April 27, 2015, 09:56:22 PM
I tried to set it as a variable a couple weeks ago, thinking it would simplify that little brain teaser someone posed on ADC's forum (that I used the Drum instruction on instead (that was acting quirky due to my not clearing the simulator memory.))

Anyway, I posit that it would be cool to skip the memory location for a timer's variable preset and simply be able to write (or read) T0.PRE because it would be cleaner.

Well, it would, but I realize it is probably one of those "all you gotta do" type requests.
Title: Re: Timer present value
Post by: Controls Guy on April 28, 2015, 12:35:38 AM
Calculate time remaining XOR time passed based on whether it was timing up or down.

Or if you're using a single timer as a sequencer, you could do stuff at various percentages of timer completion if you know the Pre.  Then, you can speed up or slow down the entire sequence by changing that one number.  Easy enough to do even now just by using a variable as the setpoint.
Title: Re: Timer present value
Post by: Controls Guy on April 28, 2015, 12:37:13 AM
Long live the 5TI and PM550.

...and the 5x0/5x5!  Nice PLC's both.   :)