|
V+ 12.4 Release Notes |
TIMER timer_number = time_value
Set the specified system timer to the given time value.
Times measured by V+ are precise only to within 1 millisecond (0.001 seconds); shorter times cannot be measured.
System timer number 0 is the system clock and cannot be set with this instruction.
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.
When used as described in the examples below, the timers can measure an interval of 596 hours with 1 millisecond resolution.
Use the TIMER real-valued function to read the instantaneous value of a system timer.
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 > zeroTIMER (timer_number) (real-valued function)
|
Please submit comments to: techpubs@adept.com |