Programming instructions
Table Of Contents
- Contents
- Title Page
- Chapter 1 Introduction to Programming
- Chapter 2 Programming Getting Started
- Chapter 3 Programming over HP-IB
- Chapter 4 Programming over RS-232-C
- Chapter 5 Programming and Documentation Conventions
- Chapter 6 Status Reporting
- Figure 6-1. Status Reporting Overview Block Diagram
- Table 6-1. Status Reporting Bit Definition
- Status Reporting Data Structures
- Status Byte Register (SBR)
- Service Request Enable Register (SRER)
- Trigger Event Register (TRG)
- Standard Event Status Register (SESR)
- Standard Event Status Enable Register (SESER)
- User Event Register (UER)
- Local Event Register (LCL)
- Operation Status Register (OPR)
- Limit Test Event Register (LTER)
- Mask Test Event Register (MTER)
- Histogram Event Register (HER)
- Arm Event Register (ARM)
- Error Queue
- Output Queue
- Message Queue
- Key Queue
- Clearing Registers and Queues
- Figure 6-3. Status Reporting Decision Chart
- Chapter 7 Installing and Using the Programmer's Reference
- Chapter 8 Programmer’s Quick Reference
- Warranty
- Index

Example The following example uses the *STB? query to read the contents of the
oscilloscopes 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?" !Turn headers off
20 ENTER 707;Result !Place result in a numeric variable
30 PRINT Result !Print the result
40 End
The next program prints 112 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.
Example The following example uses the HP BASIC serial poll (SPOLL) command to
read the contents of the oscilloscopes Status Byte Register.
10 Result = SPOLL(707)
20 PRINT Result
30 END
Use Serial Polling to Read 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.
Status Reporting
Status Byte Register (SBR)
6-10