Language Elements
38
NetLinx Programming Language Reference Guide
WAIT_UNTIL <condition 1> 'FIRST WAIT'
{
(* FIRST WAIT statements *)
WAIT_UNTIL <condition 2> 'SECOND WAIT'
{
(* SECOND WAIT statements *)
}
}
Pausing and restarting Waits
The following commands relate to pausing and restarting waits.
Canceling Waits
Using Waits - Limitations
 References to STACK_VAR variables are not allowed within waits (STACK_VAR are temporary
variables that cease to exist when the block in which they are declared is exited).
 Variable copies are made of functions and subroutine parameters. This can have speed/
execution penalties.
 A RETURN is not allowed within a WAIT within functions and subroutines.
 A BREAK or CONTINUE cannot appear within a WAIT if it takes execution out of the scope of
the
WAIT.
 The code within a WAIT cannot reference a function or subroutine array parameter whose
bounds are unspecified.
Pausing and Restarting Waits
PAUSE_WAIT PAUSE_WAIT puts a scheduled wait on hold. The wait being paused is identi-
fied by the parameter name. The wait timer stops counting down until it is
resumed with a RESTART_WAIT command. Here's a syntax sample:
PAUSE_WAIT '<name>'
RESTART_WAIT RESTART_WAIT resumes the countdown for a wait suspended with
PAUSE_WAIT. The wait to be restarted is identified by the parameter name.
RESTART_WAIT '<name>'
PAUSE_ALL_WAIT &
RESTART_ALL_WAIT
PAUSE_ALL_WAIT and RESTART_ALL_WAIT commands are used to pause or
restart all scheduled waits, regardless of whether or not they are named. They
have no parameters.
PAUSE_ALL_WAIT
RESTART_ALL_WAIT
Canceling Waits
CANCEL_WAIT /
CANCEL_WAIT_UNTIL
CANCEL_WAIT and CANCEL_WAIT_UNTIL removes the wait specified by
name from the appropriate wait list. The syntax:
CANCEL_WAIT '<name>
CANCEL_WAIT_UNTIL '<name>'
CANCEL_ALL_WAIT /
CANCEL_ALL_WAIT_UNTIL
CANCEL_ALL_WAIT and CANCEL_ALL_WAIT_UNTIL cancels all waits
(named or unnamed) from the appropriate wait list. The syntax:
CANCEL_ALL_WAIT
CANCEL_ALL_WAIT_UNTIL