Download Control of Stand-Alone Instruments

Transcript
Chapter 13
Control of Stand-Alone Instruments
In the preceding example, we found that with a detailed knowledge of the measurement process being implemented, it was possible to troubleshoot a malfunctioning
VISA-based VI. Please note that lack of communication (in particular, the GPIB device
not correctly knowing when the instrument’s data will be available) is the root problem
that led to the malfunction.
Fortunately, powerful tools exist that allow one to monitor the status of tasks being
performed by a programmable instrument. For IEEE 488.2 compliant instruments,
these tools are the Standard Event Status Register (SESR) and Status Byte Register
(SBR) that were discussed at the beginning of this chapter. With proper use of the
SESR and SBR, many potential data-taking glitches, such as the one just experienced,
can be avoided.
The status reporting capabilities of the SESR and SBR can be employed in several
ways. We will explore two commonly used techniques—the Serial Poll and Service
Request Methods. The core operation for both of these methods is the same––the completion of an assigned task triggers the Operation Complete (OPC) bit in the Standard
Event Status Register to be set, which in turn sets the Event Status Bit (ESB) of the
Status Byte Register.
In the Serial Poll Method, the setting of ESB is detected by directly checking the
Status Byte Register, whose state is obtained by serial polling the instrument. The complete step-by-step process of this method is shown in the following diagram.
458
13-Essick-Chap13.indd 458
9/9/2008 9:03:37 PM