3

Programming

Xbpics

What You’ll Learn in This Chapter
This chapter contains the following advanced programming techniques and topics.
n An example of moving and saving trace data from the spectrum analyzer into the computer.
n An example of how spectrum analyzer states are saved with the computer, then returned to
the spectrum analyzer.
n An example of reading trace data from a computer disk.
n An example of saving and recalling instrument states.
n An example of returning the spectrum analyzer to its former state.
n
An example of remotely measuring harmonic distortion.
n A summary of using different formats for trace data transfers.
Many of the programming suggestions discussed in Chapter 2, “Writing a Program,” have been
incorporated into the programs in this chapter.
Note
Ail programming examples for the HP-IB interface in this chapter are written
in HP BASIC 4.0. For the RS-232 interface, examples are written in GW BASIC.
A general knowledge of the BASIC programming language is recommended before reading
this chapter. (Refer to your software documentation manuals.) Chapter 5 of this manual,
“Programming Commands,” defines spectrum analyzer commands alphabetically.
Programming Topics
3-l