News:

  • June 26, 2026, 10:28:58 AM

Login with username, password and session length

Author Topic: Limits of TMRA, TMRAG  (Read 11203 times)

willpoll

  • Sr. Member
  • ****
  • Posts: 56
Limits of TMRA, TMRAG
« 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

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6161
  • Yes Pinky, Do-more will control the world!
Re: Limits of TMRA, TMRAG
« Reply #1 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.
"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO

willpoll

  • Sr. Member
  • ****
  • Posts: 56
Re: Limits of TMRA, TMRAG
« Reply #2 on: September 15, 2014, 03:52:45 PM »
Thanks BobO, I'll give that a look.

Will

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6161
  • Yes Pinky, Do-more will control the world!
Re: Limits of TMRA, TMRAG
« Reply #3 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
"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO

franji1

  • Bit Weenie
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 3827
    • Host Engineering
Re: Limits of TMRA, TMRAG
« Reply #4 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.

willpoll

  • Sr. Member
  • ****
  • Posts: 56
Re: Limits of TMRA, TMRAG
« Reply #5 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