R3131 Spectrum Analyzer Operation Manual
4.1 GPIB Remote Programming
(2) Sample Programs for HP200, HP300 series (GPIB address = 1)
Example HP-11: Output data from memory A in ASCII format.
10 DIM Tr(500) ! Reserve 501 variables.
20 OUTPUT 701;"DL3" Set delimiter to CR LF.
30 OUTPUT 701;"TAA?" Specify ASCII output from memory A.
40 FOR I=0 TO 500 Repeat data fetching 501 times.
50 ENTER 701;Tr(I)
60 NEXT I
70 END
Example HP-12: Output data from memory B in binary format.
10 DIM Tr(500)
20 OUTPUT 701;"DL2"
30 OUTPUT 701;"TBB?"
40 ENTER 701 USING"%,W";Tr(*)
50 END
Reserve 501 variables.
Set delimiter to EOI
Specify binary output from memory B.
Read the data repeating word type conversion till
EOI is encountered.
NOTE: For ASCII data, make sure the number of I/O operations is set to 501. For binary data, reserve data for
501 points, and use E01 as the delimiter.
Example HP-13: Output data from memory A in ASCII format.
10 INTEGER Tr(500)
20 OUTPUT 701;"TAA" Specify ASCII input to memory A.
30 FOR I=0 TO 500 Repeat inputting variable Tr (501 variables reserved)
501 times
40 OUTPUT 701;Tr(I)
50 NEXT I
60 END
NOTE: It is necessary to set the spectrum analyzer to VIEW mode before executing the program. After the pro-
gram has been executed, pressing the VIEW key allows you to check the input result.
Example HP-14: Output data from memory B in binary format.
10 INTEGER Tr(500)
20 OUTPUT 701;"TBB" Specify binary input to memory B.
30 OUTPUT 701 USING"#,W";Tr(*),END Input 501 pieces of word size data and attach
EOI following the last data.
40 END
4-41