
Waits and Timer Keywords
82
Axcess Programming Language
Naming Waits
When a WAIT is given a unique name, it can be either canceled, paused, or restarted. To name a
WAIT, place a name in single quotes after the WAIT statement. For example:
WAIT 3Ø 'DELAY'
There are certain considerations in naming WAITs:
!
They should not be previously defined constants or variables.
!
They cannot be names that have already been assigned to buffers or subroutines. For
detailed information on buffers refer to Using Buffers. For detailed information on
subroutines refer to the next section, Using Subroutines.
!
They can contain spaces, unlike other Axcess identifiers.
Canceling, Pausing, and Restarting Waits
Once a WAIT is named, it can be manipulated in the program with several keywords.
!
PAUSE_WAIT places a WAIT on hold. The WAIT does not continue counting down until
it is resumed with RESTART_WAIT. The WAIT then continues from where it was
paused.
!
CANCEL_WAIT completely nullifies a WAIT, removing it from the wait list.
!
CANCEL_ALL_WAIT nullifies every WAIT currently in the list.
!
The keywords PAUSE_ALL_WAIT and RESTART_ALL_WAIT act the same as
PAUSE_WAIT and RESTART_WAIT, except they affect all WAITs in the wait list,
named and unnamed.
You could use a named WAIT in your System Power Push routine, as shown in the example above.
For example, if the user just turned off the power, Axcess now has a 2-minute WAIT in the wait list
for the lights to go off. If the user turns the power back on before this WAIT executes, the power-on
sequence will start, but the events of the LIGHTS_OFF WAIT will still happen. In this case, the
lights will turn off even after the user has just turned them on. In this case, it would be advantageous
to name that WAIT and cancel it in the power-on section of the PUSH. To do this, add the WAIT
name to the WAIT in the power-off section.
WAITs can appear inside other WAITs. This is called nesting WAITs. It is not necessary to nest
WAITs in your program here, but here is how it is done:
DEFINE_PROGRAM
PUSH[TP,6] (* DELAYED SCREEN UP *)
{
WAIT 2ØØ 'SCREEN UP'
{
ON[RELAY,SCREEN_UP]
WAIT 2ØØ 'SCREEN UP TIMEOUT'
OFF[RELAY,SCREEN_UP]
}
}
Содержание Axcess
Страница 1: ...instruction manual Software Axcess Programming Language ...
Страница 8: ...vi Axcess Programming Language Table of Contents ...
Страница 12: ...Introduction 4 Axcess Programming Language ...
Страница 22: ...Axcess Basics 14 Axcess Programming Language ...
Страница 38: ...Channel Characteristics 30 Axcess Programming Language ...
Страница 54: ...Levels 46 Axcess Programming Language ...
Страница 62: ...Operators 54 Axcess Programming Language ...
Страница 66: ...Variable Types and Conversions 58 Axcess Programming Language ...
Страница 70: ...Two Dimensional Arrays 62 Axcess Programming Language ...
Страница 80: ...While Keywords 72 Axcess Programming Language ...
Страница 86: ...Using Buffers 78 Axcess Programming Language ...
Страница 94: ...Waits and Timer Keywords 86 Axcess Programming Language ...
Страница 102: ...Using Subroutines 94 Axcess Programming Language ...
Страница 108: ...Include Files and System_Calls 100 Axcess Programming Language ...
Страница 120: ...Compiler Error Messages 112 Axcess Programming Language ...
Страница 124: ...The External_Control Protocol 116 Axcess Programming Language ...
Страница 143: ...Index 135 Axcess Programming Language ...