Sensoray 7429 User Manual
Page 23
Read Alarms
This command returns the status the channel alarms. Alarm flags will be returned from
either channels 0-7 or 8-15, depending on the command opcode used.
The first byte returned contains the status of the eight high alarms, and the second byte
contains the status of the low alarms. Execution of this command will reset the status
register alarm bit and clear the host processor alarm interrupt request.
Bit 7 (most significant bit) of each status byte corresponds to channel 7 or 15, bit 6 cor-
responds to channel 6 or 14, and so on for all other channels. If the bit corresponding
to a channel is set (logic 1) then an alarm condition exists on that channel. If the bit is
reset (logic 0) then the corresponding channel sensor is on the "safe" side of that chan-
nel's alarm limit.
COMMAND:
(48)
RESPONSE:
(CHANNEL 0-7 HIGH ALARMS),(CHANNEL 0-7 LOW ALARMS)
COMMAND:
(49)
RESPONSE:
(CHANNEL 8-15 HIGH ALARMS),(CHANNEL 8-15 LOW ALARMS)
Example: This code segment will display the channel alarm status on the system
CRT:
PRINT "CHAN HIGH LOW"'print heading
CALL DisplayAlarms (48)'display channel 0-7 alarms
CALL DisplayAlarms (49)'display channel 8-15 alarms
. . . . . . . . . . . .
SUB DisplayAlarms (opcode%)
CALL SendByte (opcode%)'opcode
HiFlags% = ReadByte%'fetch high flag byte
LoFlags% = ReadByte%'fetch low flag byte
FOR channel% = 0 TO 7'print alarm list
mask% = 2 ^ channel%
PRINT channel% + 8 * (opcode% AND 1);
IF (mask% AND HiFlags%) THEN PRINT "*"; ELSE PRINT "";
IF (mask% AND LoFlags%) THEN PRINT "*"
NEXT channel%
END SUB