Agilent Technologies A.18.00 Weather Radio User Manual


 
296
S:\agilent\8920\8920b\PRGGUIDE\BOOK\CHAPTERS\advoper.fb
Chapter 5, Advanced Operations
GPIB Service Requests
Reading the Service Request Enable Register
The Service Request Enable Register is read with the *SRE? Common Command.
The *SRE? query allows the programmer to determine the current contents (bit
pattern) of the Service Request Enable Register. The Test Set responds to the
*SRE? query by placing the binary-weighted decimal value of the Service
Request Enable Register bit pattern into the Output Queue. The decimal value of
the bit pattern will be a positive integer in the range 0 to 255. The response data is
obtained by reading the Output Queue into a numeric variable, integer or real.
Example program
10 INTEGER Srv_rqs_enab_rg
20 OUTPUT 714;"*SRE?"
30 ENTER 714;Srv_rqs_enab_rg
40 PRINT Srv_rqs_enab_rg
50 END
Example response
18
Writing the Service Request Enable Register
The Service Request Enable Register is written with the *SRE Common
Command. The *SRE command sets the bit pattern (bits 0-5 and 7) of the Service
Request Enable Register. The Service Request Enable Register allows the
programmer to select which condition(s), as defined by bits 0-5 and 7 of the Status
Byte Register, will generate a Service Request on the GPIB bus. The Test Set
always ignores bit 6 (binary weight 64) of the bit pattern set by the *SRE
command.
The bit pattern set by the *SRE command is determined by selecting the desired
condition(s) from the Status Byte Register, setting the value of the bit position(s)
to a logical one, setting the value of all non-selected bit positions to a logical zero,
and sending the binary-weighted decimal equivalent of bits 0-5 and 7 after the
*SRE command. For example, if the programmer wished to have the occurrence
of a message available in the Output Queue (bit position 4 in the Status Byte
Register) and the occurrence of a condition in the Hardware# 2 Status Register
(bit position 1 in the Status Byte Register) to generate a Service Request on the
GPIB bus, the binary-weighted decimal value of the bit pattern for the Service
Request Enable Register would be determined as shown in
Table 27.