Chapter 3 133
Programming Examples
Saving ASCII Trace Data in an ASCII File
Saving ASCII Trace Data in an ASCII File
This C programming example (HPE4406TraceASCII.c):
• uses the VISA library for input/output, opens a session to a GP-IB
device at address 18 and presets the instrument.
• sets the input to the internal 50 MHz reference source and tunes the
instrument to the signal.
• sets the instrument to single measurement mode.
• initiates a spectrum measurement and waits for the operation to
complete.
• gets and saves the trace in a buffer.
• queries the spectrum trace data and gets the trace header (which is
6 bytes for ASCII data format).
• sets the instrument back to continuous measurement mode.
• saves the trace data to an ASCII file.