Nesting Waits - AMX NETLINX PROGRAMMING LANGUAGE Manual

Programming language
Table of Contents

Advertisement

Types of Waits (Cont.)
Conditional Waits
Timed Conditional Waits

Nesting Waits

The wait time for a nested wait is the sum of it's own wait time, plus that of the enclosing waits. In the
example below,
FIRST WAIT
WAIT 10 'FIRST WAIT'
{
}
To execute the inner wait of a nested conditional wait, the conditions must be met in the order specified
(condition 1, then condition 2) but not necessarily at the same time.
NetLinx Programming Language Reference Guide
WAIT_UNTIL is a conditional Wait request.
Syntax:
WAIT_UNTIL <condition> ['<name>']
{
(* wait statements *)
}
Parameters:
• <condition>: Any single or compound expression that can be evaluated as
a logical expression. The Wait statements are executed if and when the wait
condition becomes True.
• <name>: The name to assign to the Wait. This name must be a literal string.
The Wait name is optional, although unless a Wait is named it cannot be
individually cancelled, paused, or restarted.
TIMED_WAIT_UNTIL is a Timed Conditional Wait request.
Syntax:
TIMED_WAIT_UNTIL <condition> timeout ['<name>']
{
(* wait statements *)
}
Parameters:
• <condition>: Any single or compound expression that can be evaluated as
a logical expression. The Wait statements are executed if and when the Wait
condition becomes true.
• timeout: A constant or variable indicating the timeout value in 1/10th
seconds. If the Wait condition is not met within the time indicated by this
parameter, the Wait is cancelled, in which case no wait statements are
executed.
• <name>: The name to assign to the Wait. This name must be a literal string.
The Wait name is optional, although unless a Wait is named it cannot be
individually cancelled, paused, or restarted.
occurs 0.5 seconds after
SECOND WAIT
is added to the wait list.
(* FIRST WAIT statements *)
WAIT 5 'SECOND WAIT'
{
(* SECOND WAIT statements *)
}
Language Elements
is executed, or 1.5 seconds after
FIRST WAIT
37

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Netlinx studio 2

Table of Contents