
12-60
12.5 Time Control
DELAY (Statement) [Conforms to SLIM]
Function
Suspends program processing for a designated period time.
Format
DELAY <Delay time>
Explanation
The program processing stops until the time designated by <Delay time>
elapses.
<Delay time> is expressed in ms, however, the actual delay time changes in
increments of 1/60. If multiple tasks are processed at the same time, the delay
time may possibly be longer than the designated value.
Related Terms
HOLD, WAIT
Example
DIM li1 As Integer
DELAY 100 'Waits until 100ms(0.1s) elapses.
DELAY li1 + 10 'Waits until time of (li1 + 10) elapses.
Notes
When using delay time, if an instantaneous stop during execution of an
instruction is executed and the system is restarted, the delay time will elapse
even during suspension.
Komentarze do niniejszej Instrukcji