86
S:\agilent\8920\8920b\PRGGUIDE\BOOK\CHAPTERS\guidelin.fb
Chapter 3, GPIB Command Guidelines
Guidelines for Operation
Reading-back Attribute Units.
Use the AUNits? command to read back the Attribute Units setting for the selected measurement. For example, the following BASIC language program statements show how the AUNits? command can be used to read-back a Distortion REFerence SET level: !Query the REFerence SET value for the Distortion measurement
OUTPUT 714;"MEAS:AFR:DIST:REF:VAL?"
!Read the REFerence SET value into variable Ref_set_val
ENTER 714;Ref_set_val
!Query the Attribute Units setting for the Distortion measurement
OUTPUT 714;"MEAS:AFR:DIST:AUN?"
!Read the Attribute Units setting into string variable Atribute_set$
ENTER 714;Atribute_set$
!Print out the variables in the form <VALUE><UNITS>
PRINT Ref_set_val;Atribute_set$
If a reference of 25% is set, 25 PCT would be printed. Guidelines for Attribute Units
• When setting the value of measurement functions REFerence, METer, HLIMit and
LLIMit through GPIB, a non–Attribute Unit unit-of-measure must be specified in the
command string, otherwise the current Attribute Unit is assumed by the Test Set.
For example, if the Test Set is in a RESET condition and the command
MEAS:AFR:DIST:REF:VAL 10 is sent through GPIB, the Test Set will interpret the
data as 10 %, since % is the RESET Attribute Unit for the Distortion measurement.
Sending the command, MEAS:AFR:DIST:REF:VAL 10 DBM, would set the
REFerence SET value to 10 dB.
• When querying measurement functions REFerence, METer, HLIMit and LLIMit
through GPIB, the Test Set always returns numeric values in Attribute Units, regardless
of the current Display Units or GPIB Units settings. Numeric values are expressed in
scientific notation.
For example, if the REF SET measurement function is displayed as 25% on the Test
Set, the value returned through GPIB is +2.50000000E+001 (2.5×101). Converting the
returned value to a format other than scientific notation must be done
programmatically.
• Before changing the Attribute Units for a selected measurement, the Test Set verifies
that all Data Function values can be properly converted from the current unit-of-
measure to the new unit-of-measure. If it is not possible to properly convert all the
values to the new unit-of-measure, the Attribute Units are not changed and the
following error is generated: HP-IB Error: HP-IB Units cause invalid
conversion of attr.