File name Agilent-54621a-programmers-guide.pdf
Publication Number 54622-97027 November 2001
For Safety information, Warranties, and Regulatory information, see the pages behind the Index.
Copyright Agilent Technologies 2000-2001 All Rights Reserved
54621A/22A/24A Oscilloscopes and 54621D/22D Mixed-Signal Oscilloscopes
Programming the Oscilloscope
When you attach an interface module to the rear of the oscilloscope, it becomes programmable. That is, you can hook a controller (such as a PC or workstation) to it, and write programs on that controller to automate oscilloscope setup and data capture. The following figure shows the basic structure of every program you will write for the oscilloscope.
To ensure consistent, repeatable performance, you need to start the program, controller, and oscilloscope in a known state. Without correct initialization, your program may run correctly in one instance and not in another. This might be due to changes made in configuration by previous program runs or from the front panel of the oscilloscope. ∑ Program initialization defines and initializes variables, allocates memory, or tests system configuration. ∑ Controller initialization ensures that the interface to the oscilloscope (either GPIB or RS-232) is properly set up and ready for data transfer. ∑ Oscilloscope initialization sets the channel configuration and labels, threshold voltages, trigger specification and mode, timebase, and acquisition type.
Once you initialize the oscilloscope, you can begin capturing data for analysis. Remember that while the oscilloscope is responding to commands from the controller, it is not performing acquisitions. Also, when you change the oscilloscope configuration, any data already captured will most likely be rendered. To collect data, you use the :DIGitize command. This command clears the waveform buffers and starts the acquisition process. Acquisition continues until acquisition memory is full, then stops. The acquired data is displayed by the oscilloscope, and the captured data can be measured, stored in trace memory in the oscilloscope, or transferred to the controller for further analysis. Any additional commands sent while :DIGitize is working are buffered until :DIGitize is complete. You could also put the oscilloscope into run mode, then use a wait loop in your program to ensure that the oscilloscope has completed at least one acquisition before you make a measurement. HP does not recommend this because the needed length of the wait loop may vary, causing your program to fail. :DIGitize, on the other hand, ensures that data capture is complete. Also, :DIGitize, when complete, stops the acquisition process so that all measurements are on displayed data, not on a constantly changing data set.
After the oscilloscope has completed an acquisition, you can find out more about the data, either by using the oscilloscope measurements or by transferring the data to the controller for manipulation by your program.