Host Engineering Forum

General Category => Do-more CPUs and Do-more Designer Software => Topic started by: willpoll on September 15, 2014, 03:47:50 PM

Title: Limits of TMRA, TMRAG
Post by: willpoll on September 15, 2014, 03:47:50 PM
Hi all,

I'm guessing the limit on the preset for these timers is also the maximum value the timer can hold i.e. 2,147,483,647 milliseconds or 24.855 days.  Can anyone confirm whether this is correct?  I'm looking for a timer struct that I can use to monitor runtime on pump motors that would exceed this in a few months.

Thanks in advance,

Will
Title: Re: Limits of TMRA, TMRAG
Post by: BobO on September 15, 2014, 03:50:13 PM
That is correct.

If you don't need millisecond accuracy, look into the Time/Date structure (including $Now) and associated DTxxx instructions.
Title: Re: Limits of TMRA, TMRAG
Post by: willpoll on September 15, 2014, 03:52:45 PM
Thanks BobO, I'll give that a look.

Will
Title: Re: Limits of TMRA, TMRAG
Post by: BobO on September 15, 2014, 04:02:35 PM
If you are just wanting to integrate run time in seconds, it would be easier still to put $1Second on an edge contact in series with the pump enable driving an INC instruction.

STRPD $1Second
AND PumpEnable
INC RunTime
Title: Re: Limits of TMRA, TMRAG
Post by: franji1 on September 15, 2014, 09:21:27 PM
FYI, 2,147,483,647 seconds > 68 years  ;D

Note that there is also a "Seconds Time" data format in Data View to intelligently display "number of seconds" (not "number of milliseconds" like "Timer" format).  See the attached screen shot.
Title: Re: Limits of TMRA, TMRAG
Post by: willpoll on September 16, 2014, 12:27:41 PM
Thanks guys, I think I'll go with the $second edge contact AND pump run as input to a counter.  68 years should be plenty  ;)

The data view in seconds will be handy also for debugging.

-Will