The answer is dependent upon the needed resolution and/or duration.
The TMR instructions in Do-more have millisecond resolution (this is the finest POSSIBLE). However, your PLC scan time resolution will ultimately define the granularity, e.g. you can't get millisecond resolution with a scan time of 2ms. The maximum duration of Do-more TMR instructions is 24 days, 20 hours, 31 minutes, 23.647 seconds (0x7FFFFFFF milliseconds, the largest positive signed 2's complement DWORD integer).
If you need duration but not resolution, use DST22 ($LocalTime) as the "start" time-stamp. Just save DST22 into a D DWORD register at the "start" event, then every scan, take the difference of DST22 and that D "start" time to get the accumulated time and stick that in another D DWORD register. Although its resolution is 1 second, it can time up to over 68
years! (0x7FFFFFFF seconds).
If you need both resolution and long duration (beyond the TMR duration of 24 days...), set up a day timer with a preset of 24 hours 0m 0.000s that auto resets, but when it resets, increment a D register to count the number of days. The D register day counter can count up to 0x7FFFFFFF days (2+ billion days), and the auto-resetting TMR will give you the millisecond resolution within that day.
