Stb; Sub - Agilent Technologies 3458A User Manual

Hide thumbs Also See for 3458A:
Table of Contents

Advertisement

Example

STB?

Syntax
Status Register
Conditions
Remarks
Example
found the desired state, press the Enter key to recall that state.
Related Commands: MSIZE, PURGE, RSTATE, SCRATCH
OUTPUT 722;"SSTATE B2 "
Status Byte Query. The status register contains seven bits that monitor various
multimeter conditions. When a condition occurs, the corresponding bit is set in
the status register. The STB? (status byte?) command returns a number
representing the set bits. The returned number is the weighted sum of all set bits.

STB?

The status register conditions and their weights are:
Decimal
Bit
Weight
Number
1
0
2
1
4
2
8
3
16
4
32
5
64
6
128
7
When you execute the STB? Command, the ready bit (bit 4) is always clear (not
ready) because the multimeter is processing the STB? command.
The CSB command clears the status register (bits 4, 5, and 6 are not cleared if
the condition(s) that set the bit(s) still exist). The RQS command designates
which status register conditions will assert SRQ on the GPIB bus.
Related Commands: CSB, EXTOUT, RQS, SPOLL (GPIB command)
10 OUTPUT 722;"STB?"
20 ENTER 722
30 PRINT A
40 END
Assume the above program returns the weighted sum 24. This means the bits with
weighted values 8 (power-on) and 16 (ready for instructions) are set.
!STORES PRESENT STATE WITH NAME B2
Status Register Condition
Subprogram Execution Completed
Hi or Lo Limit Exceeded
SRQ Command Executed
Power On
Ready for Instructions
Error (Consult Error Register)
Service Requested (you cannot disable this bit)
Data Available
!RETURNS THE WEIGHTED SUM OF ALL SET BITS
!ENTERS RESPONSE INTO COMPUTER'S A VARIABLE
!PRINTS RESPONSE
Chapter 6 Command Reference
STB?
245

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents