Setting And Querying The Status Register - Agilent Technologies ESA Series User's/Programmer's Reference

Core spectrum analyzer functions
Hide thumbs Also See for ESA Series:
Table of Contents

Advertisement

Status Registers
Use Status Registers to Determine the State of Analyzer Events and Conditions
When you read the analyzer status byte register with a serial poll, the RQS bit is
NOTE
reset to 0. Other bits in the register are not affected.
Restarting a measurement with the :INITiate command can cause the measuring bit to pulse low. A
low pulse causes an SRQ if the status register is configured to SRQ upon end-of-measurement. To avoid
this, perform the following steps:
1. Set :INITiate:CONTinuous off.
2. Set/enable the status registers.
3. Restart the measurement (send :INITiate).
Example of Monitoring Conditions Using the :STATus Command
Use the following steps to monitor a specific condition:
1. Determine which register contains the bit that reports the condition.
2. Send the unique SCPI query that reads that register.
3. Examine the bit to see if the condition has changed.
4. Act upon the cause of the condition and the SRQ to re-enable the method.
The examples below show how to use the :STATus command to perform the following tasks:
• Check the analyzer hardware and firmware status.
Do this by querying the condition registers which continuously monitor status. These registers
represent the current state of the analyzer. Bits in a condition register are updated in real time. When
the condition monitored by a particular bit becomes true, the bit is set to 1. When the condition
becomes false, the bit is reset to 0.
• Monitor a particular bit (condition), or bits.
Once you have enabled a bit using the event enable register, the analyzer will monitor that particular
bit. If the bit becomes true in the event register it will stay set until the event register is cleared.
Querying the event register allows you to detect that this condition occurred even if the condition no
longer exists. The event register can only be cleared by querying it or sending the *CLS command,
which clears all event registers.
• Monitor a change in the condition of a particular bit, or bits.
Once you have enabled a bit, the analyzer will monitor it for a change in its condition. The transition
registers are preset to respond to the condition of going from 0 to 1 (positive transitions). This can be
changed so that the selected bit is detected if it goes from 1 to 0 (negative transition), or if either
transition occurs. Query the event register to determine whether or not a change has been made to
how the transition registers respond. The event register can only be cleared by querying it or sending
the *CLS command, which clears all event registers.

Setting and Querying the Status Register

See
Figure
4-3. Each bit in a register is represented by a numerical value based on its location. This
number is sent with the command to enable a particular bit. To enable more than one bit, send the sum of
all of the bits involved.
For example, to enable bit 0 and bit 6 of the standard event status register, you would send the command
*ESE 65 (1 + 64).
The results of a query are evaluated in a similar way. If the *STB? command returns a decimal value of
140, (140 = 128 + 8 + 4) then bit 7 is true, bit 3 is true, and bit 2 is true.
204
Chapter 4

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents