R3131 Spectrum Analyzer Operation Manual
4.1 GPIB Remote Programming
4-41Aug 28/98
(2) Sample Programs for HP200, HP300 series (GPIB address = 1)
Example HP-11: Output data from memory A in ASCII format.
Example HP-12: Output data from memory B in binary format.
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 EOI as the delimiter.
Example HP-13: Output data from memory A in ASCII format.
NOTE: It is necessary to set the spectrum analyzer to VIEW mode before executing the program. After the
program 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.
NOTE:
1. It is necessary to set the spectrum analyzer to VIEW mode before executing the program. After the program
has been executed, pressing the VIEW key enables the user to check the input result.
2. 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 EOI as the delimiter.
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
10 DIM Tr(500) ! Reserve 501 variables.
20 OUTPUT 701;”DL2” ! Set delimiter to EOI
30 OUTPUT 701;”TBB?” ! Specify binary output from memory B.
40 ENTER 701 USING”%,W”;Tr(*) ! Read the data repeating word type conversion till
EOI is encountered.
50 END
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
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