Agilent Technologies X Series Programmer's Manual page 33

Signal analyzer
Hide thumbs Also See for X Series:
Table of Contents

Advertisement

What Are Status Register SCPI Commands
Most monitoring of the instrument conditions is done at the highest level using the IEEE
common commands indicated below. Complete command descriptions are available in the
IEEE commands section at the beginning of the language reference. Individual status
registers can be set and queried using the commands in the STATus subsystem of the
language reference.
• *CLS (clear status) clears the status byte by emptying the error queue and clearing all
the event registers.
• *ESE, *ESE? (event status enable) sets and queries the bits in the enable register part
of the standard event status register.
• *ESR? (event status register) queries and clears the event register part of the standard
event status register.
• *OPC, *OPC? (operation complete) sets the standard event status register to monitor
the completion of all commands. The query stops any new commands from being
processed until the current processing is complete, then returns a '1'.
• *PSC, *PSC? (power-on state clear) sets the power-on state so that it clears the service
request enable register and the event status enable register at power on.
• *SRE, *SRE? (service request enable) sets and queries the value of the service request
enable register.
• *STB? (status byte) queries the value of the status byte register without erasing its
contents.
How to Use the Status Registers
A program often needs to be able to detect and manage error conditions or changes in
instrument status. There are two methods you can use to programmatically access the
information in status registers:
• The polling method
• The service request (SRQ) method
In the polling method, the instrument has a passive role. It only tells the controller that
conditions have changed when the controller asks the right question. In the SRQ method,
the instrument takes a more active role. It tells the controller when there has been a
condition change without the controller asking. Either method allows you to monitor one
or more conditions.
The polling method works well if you do not need to know about changes the moment they
occur. The SRQ method should be used if you must know immediately when a condition
changes. To detect a change using the polling method, the program must repeatedly read
the registers.
Use the SRQ method when:
• you need time-critical notification of changes
• you are monitoring more than one device which supports SRQs
Chapter 1
Introduction to Programming X-Series Applications
STATus Subsystem (Remote Only Commands)
33

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Exa n9010aMxa n9020a

Table of Contents