Agilent Technologies Infiniium 8000A Programmer's Reference Manual page 67

Table of Contents

Advertisement

Example 1
Example 2
This HP BASIC example uses the *STB? query to read the contents of the
oscilloscope's Status Byte Register when none of the register's summary bits
are enabled to generate an SRQ interrupt.
10
OUTPUT 707;":SYSTEM:HEADER OFF;*STB?"
20
ENTER 707;Result
30
PRINT Result
40
End
The next program prints 132 and clears bit 6 (RQS) of the Status Byte Register.
The difference in the decimal value between this example and the previous one
is the value of bit 6 (weight = 64). Bit 6 is set when the first enabled summary
bit is set, and is cleared when the Status Byte Register is read by the serial poll
command.
This example uses the HP BASIC serial poll (SPOLL) command to read the
contents of the oscilloscope's Status Byte Register.
10
Result = SPOLL(707)
20
PRINT Result
30
END
Use Serial Polling to Read the Status Byte Register
Serial polling is the preferred method to read the contents of the Status Byte Register
because it resets bit 6 and allows the next enabled event that occurs to generate a
new SRQ interrupt.
!Place result in a numeric variable
!Print the result
Status Reporting
Status Byte Register
!Turn headers off
4-9

Advertisement

Table of Contents
loading

Table of Contents