Language Reference

STB

Return value of status-byte register.

Example Monitor spectrum-analyzer operation without using service-request methods.

10

CLEAR 723

Preset spectrum

analyzer.

 

20

OUTPUT

723;"IP;CLRDSP;"

 

 

 

 

 

30

OUTPUT

723;"SNGLS;"

Activate single-sweep mode.

 

40

OUTPUT

723;"CLS;"

Clear status-byte register.

 

50

OUTPUT

723;"TS;"

Sweep spectrum

analyzer.

 

60

OUTPUT

723;"STB?;"

Query

status

of

status byte, then clear it.

The

 

 

 

value

queried

is the sum of 16 (command

com-

 

 

 

plete),

4 (end

of

sweep), and 1 (trigger armed),

 

 

 

which equals

21.

 

 

70

ENTER

723;N

Assign value to computer .

 

80

OUTPUT 723;"STB?;"

Query status

of status byte. Value queried is 16

 

 

 

(command complete), since this is the only task

 

 

 

the spectrum

analyzer has performed since the

 

 

 

status byte was cleared in line 60.

 

90ENTER 723;M

100DISP N,M

Description Use the STB command to monitor spectrum analyzer operation. Certain multiple-tasked computer systems, such as UNIX-based computers, monitor

spectrum-analyzer operation more e￿ciently with the STB command than with the service-request command, RQS.

Use STB to monitor spectrum-analyzer operation randomly at any time. Executing STB is similar to conducting a serial poll of the status-byte register. When STB is executed, the status-byte register is cleared (all bits set to zero). The STB command gives the decimal equivalent of the status-byte register. For example, the COMMAND-COMPLETE and ERROR-PRESENT bits are set when 48 (16 + 32) is returned.

7-460