![background image](http://html1.mh-extra.com/html/rands/osp/osp_operating-manual_3076499161.webp)
R&S OSP
Remote Control
Operating Manual 1505.3896.12 - 14
146
6.4.3.1 Query of an Instrument Status
●
Each part of the instruments status registers can be read by means of queries
with common commands *STB? and *ESR?.
All queries return a decimal number which represents the bit pattern of the status
register. This number is evaluated by the controller program.
Decimal representation of a bit pattern
The STB and ESR registers contain 8 bits. The contents of a status register is keyed
and transferred as a single decimal number. To make this possible, each bit is
assigned a weighted value. The decimal number is calculated as the sum of the
weighted values of all bits in the register that are set to 1.
Bits
0
1
2
3
4
5
6
7
...
Weight
1
2
4
8
16
32
64
128
...
Example: The decimal value 40 = 32 + 8 indicates that bits no. 3 and 5 in the status
register (e.g. the QUEStionable status summary bit and the ESB bit in the Status Byte)
are set.
6.4.3.2 Error Queue
Each error state in the instrument leads to an entry in the error queue. The entries of
the error queue are detailed plain text error messages that can be queried via
remote control using SYSTem:ERRor[:NEXT]? or SYSTem:ERRor:ALL?. Each call of
SYSTem:ERRor[:NEXT]? provides one entry from the error queue. If no error
messages are stored there any more, the instrument responds with 0, "No error".
Especially in the test phase of a controller program the error queue should be queried
regularly since faulty commands from the controller to the instrument are recorded
there as well.