TIMER program instruction TIMER program instruction Syntax TIMER timer_number = time_value Function Set the specified system timer to the given time value. Usage Considerations Times measured by eV+ are precise only to within 1 millisecond (0.001 seconds); shorter times cannot be measured. Timers with numbers Parameters timer_number Real-valued expression interpreted as the (integer) number of the timer to be set. The value must range from 1 to 15. time_value Real-valued expression interpreted as the time, in seconds, to which the timer is set. This parameter may specify fractions of a second and may be negative.
Details When used as described in the examples below, the timers can be used to measure an interval of 596 hours from when they were set by the TIMER instruction. Timers have a resolution of one millisecond and a maximum count of > 2.E+009. Use the TIMER real-valued function to read the instantaneous value of a system timer. Example The following examples show two ways to wait for a certain amount of time, using the TIMER instruction and real-valued function. Each example first sets the timer, and then waits until the timer value has changed by the delay period:
TIMER 1 = 0 ;Set timer to zero WAIT TIMER(1) > delay ;Wait until timer > delay TIMER 1 = -delay ;Set timer to -delay WAIT TIMER(1) > 0 ;Wait until timer > zero Related Keyword TIMER real-valued function eV+Language Reference Guide, v2.x, 18319-000 Rev A Page 536