
74
Chapter 2
Programming Fundamentals
Using the Instrument Status Registers
Using a Status Register
Each bit in a register is represented by a numerical value based on its
location. See
below. This number is sent with the command,
to enable a particular bit. If you want to enable more than one bit, you
would send the sum of all the bits that you are interested in.
For example, to enable bit 0 and bit 6 of standard event status register,
you would send the command
*ESE 65
(1 + 64 = 65).
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 the
bit 7 is true, bit 3 is true and bit 2 is true.
Figure 2-1
Status Register Bit Values
NOTE
Bit 15 is not used to report status.
Using the Service Request (SRQ) Method
Your language, bus and programming environment must be able to
support SRQ interrupts. (For example, BASIC used with the GPIB.)
When you monitor a condition with the SRQ method, you must:
1. Determine which bit monitors the condition.
2. Determine how that bit reports to the request service (RQS) bit of
the status byte.
3. Send GPIB commands to enable the bit that monitors the condition
and to enable the summary bits that report the condition to the RQS
bit.
4. Enable the controller to respond to service requests.
When the condition changes, the instrument sets its RQS bit and the
GPIB SRQ line. The controller is informed of the change as soon as it
occurs. The time the controller would otherwise have used to monitor
the condition can now be used to perform other tasks. Your program
determines how the controller responds to the SRQ.
Summary of Contents for E4406A VSA Series
Page 4: ...4 ...
Page 59: ...59 2 Programming Fundamentals ...
Page 124: ...124 Chapter2 Programming Fundamentals Using the LAN to Control the Analyzer ...
Page 125: ...125 3 Programming Examples ...
Page 164: ...164 Chapter3 Programming Examples Using Java Programming Over Socket LAN ...
Page 165: ...165 4 Programming Command Cross References ...
Page 379: ...379 6 Error Messages ...
Page 412: ...412 Chapter6 Error Messages Error Message Descriptions ...