R3131 Spectrum Analyzer Operation Manual
4.1 GPIB Remote Programming
4-31Aug 28/98
4.1.10 Basic Programming
N88BASIC is used in PC9801 series and HP-BASIC is used in HP200 and 300 series.
(1) Sample Programs for PC9801 series (GPIB address = 8).
Example PC-1: Master reset the device and set center frequency to 30 MHz.
Example PC-2: Set reference level to 87 dBmV, 5 dB/div and RBW to 100 kHz.
Example PC-3: Assign numeric value to variable.
Example PC-4: Save set data to or recall it from register 5.
10 ISET IFC:ISET REN ’ Execute interface clear and remote enable.
20 PRINT @8;”IP” ’ Execute interface master reset.
30 PRINT @8;”CF30MHZ” ’ Set center frequency to 30 MHz
40 STOP
50 END
10 ISET IFC:ISET REN ’
20 PRINT @8;”UU RL87DB” ’ Set REF level to 87 dBµV
30 PRINT @8;”DD5DB” ’ Set 5 dB/div
40 PRINT @8;”RB100KZ” ’ Set RBW to 100 kHz
50 STOP
60 END
10 ISET IFC:ISET REN ’
20 SPA=8:A=10:B=2:C=20 ’ Assign a set value to each variable.
30 PRINT @SPA;”CF”,A,”MZ” ’ Set center frequency to 10 MHz
40 PRINT @SPA;”SP”,B,”MZ” ’ Set frequency span to 2 MHz
50 PRINT @SPA;”AT”,C,”DB” ’ Set ATT to 20 dB.
60 STOP
70 END
10 ISET IFC:ISET REN ’
20 TITLE$=”R3131 SPECTRUM ANALYZER” ’ Define a label.
30 PRINT @8;”CF30MZ SP1MZ DTP” ’ Set each data.
40 PRINT @8;”LON/” +TITLE$ +”/” ’ Label ON
50 PRINT @8;”SV5” ’ Save values in register 5.
60 PRINT @8;”CF1GZ SP200MZ” ’ Change center frequency and
frequency span.
70 PRINT @8;”RC5” ’ Recall values from register 5.
80 STOP
90 END