TIMER real-valued function Details Timers -1 and -2 If you don't want to use timers 1 through 15, or need more than 15 timers, Timers -1 and -2 may be used as follows: AUTO DOUBLE start_time, interval, scale scale = 62.5 ;Set scale = 1000 for TIMER(-2) start_time = TIMER(-1) ... interval = ((TIMER(-1)-start_time) BAND ^HFFFFFF)/scale Note that timer -3 provides a better method for computing such intervals provided that a DOUBLE value can be used. The type of eV+ variable used in time computations affects the maximum interval that can be computed with full resolution: l Standard REAL variables have only 24 bits of resolution, which limits the time interval to 16,777,216 (2 24 ) counts.
This limit corresponds to about 4.6 hours for millisecond eV+Language Reference Guide, v2.x, 18319-000 Rev A Page 538 Value Description millisecond. It can be used to compute time intervals of up to 4.6 hours. For additional information, see the Details section below. -3 Returns the time in seconds since eV+ was started as a 52-bit double-precision value. This timer has a resolution of 1 millisecond and a maximum count of > 4.E+015. It can be used to compute intervals of > 100,000 years. It is used like timers -1 and -2 except that DOUBLE variables are required and no BAND operation or scale factors are used. AUTO DOUBLE start time, interval _ start time = TIMER(-3) _ ...
interval = TIMER(-3)-start time _ -4 Returns the double-precision time of the current robot-position or belt-encoder latch for this task. The timer resolution is 1 microsecond. This time will only be valid for 128 seconds.