MDO3000 Programmer Manual.pdf - 第1011页

Status and Events The oscilloscope provides a status and e vent reporting system for the Ethe rnet, GPIB (with the TEK-USB-488 Adapte r), and U SB interfaces. This system informs you o f c ertain significant events that o…

100%1 / 1158
Status and Events
The oscilloscope provides a status and event reporting system for the Ethernet,
GPIB (with the TEK-USB-488 Adapter), and USB interfaces. This system
informs you o
f certain significant events that occur within the oscilloscope.
The oscilloscope status handling system consists of five 8-bit registers and two
queues for e
ach interface. The remaining Status subtopics describe these registers
and components. They also explain how the event handling system operates.
Registers
Overview
The registers in the event handling system fall into two functional groups:
Status R
egisters contain information about the status of the oscilloscope.
They include the Standard Event Status Register (SESR).
Enable
Registers determine whether selected types of events are reported to
the Status Registers and the Event Queue. They include the Device Event
Status Enable Register (DESER), the Event Status Enable Register (ESER),
and the Service Request Enable Register (SRER).
Status Registers
The Standard Event Status Register (SESR) and the Status Byte Register (SBR)
record certain types of events that may occur while the oscilloscope is in use.
IEEE Std 488.2-1987 defines these registers.
Each bit in a Status Register records a particular type of event, such as an execution
error or message available. When an event of a given type occurs, the oscilloscope
sets the bit that represents that type of event to a value of one. (You can disable
bits so that they ignore events and remain at zero. See Enable Registers). Reading
th
e status registers tells you what types of events have occurred.
The Standard Event Status Register (SESR). The SESR records eight types of
events that can occur within the oscilloscope. Use the *ESR? query to read the
SESR register. Reading the register clears the bits of the register so that the
register can accumulate information about new events.
NOTE. TekVISA applications use SESR bit 6 to respond to any of several events,
including some front panel actions.
Figure 3-1: The Standard Event Status Register (SESR)
MDO4000/B/C, MSO/DPO4000B and MDO3000 Series Oscilloscopes Programmer Manual 3-1
Status and Events
Table 3-1: SESR
Bit Functions
Bit Function
7 (MSB) PON Power On. Show
s that the oscilloscope was powered on.
On completion, the diagnostic s elf tests also set this bit.
6
URQ
User Request
.
Indicates that an application event has
occurred. *See note.
5
CME
Command Error. Shows that an error o ccurred while
the oscilloscope was parsing a c ommand or query.
4 EXE
Execution Error. Shows that an error executing a
command or
query.
3DDE
Device Err
or. Shows that a device error occurred.
2
QYE
Query Error. Either an attempt was made to read the
Output Qu
eue when no data was present or pending, or that
data in the Output Queue was lost.
1
RQC
Request C
ontrol.
This is not used.
0 (LSB) OPC Operation Complete. Shows that the operation
is complete. This bit is set when all pending operations
comple
te following an *OPC command.
The Status Byte Register (SBR). Records whether output is available in the Output
Queue, whether the oscilloscope requests service, and whether the SESR has
recorded any events.
Use a Serial Poll or the *STB? query to read the contents of the SBR. The bits in
the SBR are set and cleared depending on the contents of the SESR, the Event
Status Enable Register (ESER), and the Output Queue. When you use a Serial
Poll to obtain the SBR, bit 6 is the RQS bit. When you use the *STB? query to
obtain the SBR, bit 6 is the MSS bit. Reading th
e SBR does not clear the bits.
Figure 3-2: The Status Byte Register (SBR)
Table 3-2: SBR Bit Functions
Bit Function
7(MSB)
————
Not used.
6
RQS
Request Service. Obtained from a serial poll. Shows
that the oscilloscope requests service from the GPIB
controller.
6
MSS
Master Status Summary. Obtained from *STB?
query. Summarizes the ESB and MAV bits in the SBR.
5
ESB
Event Status Bit. Shows that status is enabled and
present in the SESR.
3-2 MDO4000/B/C, MSO/DPO4000B and MDO3000 Series Oscilloscopes Programmer Manual