33
S:\HP8924C\USRGUIDE\BOOK\chapters\getstart.fb
Chapter 1, Getting Started
Obtaining Measurement Results
Basic Programming Examples
The following examples illustrate the basic approach to controlling the Test Set
through the HP-IB. The punctuation and command syntax used for these
examples is given in
"Command Punctuation" on page 38.
The bus address 714 used in the following BASIC language examples uses an HP-
IB interface at select code 7, and a Test Set HP-IB address of 14. All examples use
an external controller.
To Change a Field’s Setting
1. Access the screen containing the field whose setting is to be changed by using the DISP
command.
2. Make the desired setting using the proper command syntax (refer to
“HP-IB Command Syntax” chapter in the HP 8924C Condensed Programming
Reference Guide for proper syntax).
The following example makes several instrument setting changes:
OUTPUT 714;”DISP CCNT”!Displays the CDMA CALL CONTROL screen.
OUTPUT 714;”CDMA:CELL:ASEC -100”!Sets Sector A Power to -100 dBm/BW.
OUTPUT 714;”RFG:OUTP ’DUPL’”!Sets the Output Port to Duplex.
To Read a Field’s Setting
1. Access the screen containing the field whose setting is to be read using the DISPlay
command.
2. Use the query form of the syntax for that field to place the setting’s value into the Test
Set’s output buffer.
3. Enter the value into the correct variable type within the program’s context.
The following example reads the current power measurement selection (Average
Power or Channel Power).
10 OUTPUT 714;”DISP CTXT” !Displays the CDMA CELLULAR MOBILE TRANSMITTER TEST screen.
20 OUTPUT 714;”CDMA:TX:POW:MEAS?” !Queries the Average Power/Channel Power field.
30 ENTER 714;Pow$ !Enters the returned value into a string variable
40 PRINT “The power measurement currently selected is “,Pow$
50 END