
Waits and Timer Keywords
80
Axcess Programming Language
DEFINE_PROGRAM
PUSH[TP,8] (* POWER ON/OFF *)
{
IF ([RELAY,RACK_POWER])
{
CANCEL_WAIT 'AMPS ON'
OFF[RELAY,AMP_POWER]
WAIT 1Ø 'SYSTEM OFF'
OFF[RELAY, RACK_POWER]
}
ELSE
{
CANCEL_WAIT 'SYSTEM OFF'
ON[RELAY, RACK_POWER]
WAIT 1Ø 'AMPS ON'
ON[RELAY,AMP_POWER]
}
}
Notice the organization of the above set of statements. Here is a simplified outline of the structure
of this code:
PUSH[TP,8]
{
IF (device-channel)
compound statement
ELSE
compound statement
}
As shown in the outline, following the PUSH statement is a single IF...ELSE statement which has a
device-channel reference for its condition. In this case, Axcess checks that channel's status. If it is
on, Axcess evaluates the condition as true and executes the first compound statement. Otherwise
Axcess executes the compound statement following the ELSE.
The first compound statement, which is executed if the rack power is on, uses a WAIT to perform a
time-delayed power-down of the system. The first statement cancels the WAIT named AMPS ON
to stop any previous attempts to turn the amps on. The second statement inside the compound
statement turns off the amplifier relay. The next statement is a WAIT statement for 1 second,
followed by an OFF statement to the rack power relay. Axcess places this Wait, SYSTEM OFF, into
the wait list and continues with the program. Since these statements are part of an IF compound
statement, Axcess does not execute the ELSE's compound statement.
As Axcess continues to run, the WAIT is still in the wait list. After 1 second has elapsed, Axcess
will execute the statement immediately following the WAIT, which in this case turns off the rack
power. The corresponding WAIT is then taken out of the list.
The compound statement following the ELSE is similar to the one just described, but its functions
are slightly different. Axcess first turns on the rack power, waits 1 second, and then turns on the
amp power.
Содержание 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 ...