Status and Events
Example of Acquiring
and Measuring a
Single-Sequence
Waveform
For example, a t
ypical application m ight involve acquiring a single-sequence
waveform and then taking a measurement on the acquired waveform. You could
use the following command sequence to d o this:
/** Set up conditional a cquisition **/
ACQUIRE:STATE OFF
DISPLAY:WAVEVIEW1:CH1:STA TE 1
HORIZONTAL:RECORDLENGTH 1000
ACQUIRE:MODE SAMPLE
ACQUIRE:S
TOPAFTER SEQUENCE
/** Acq uire waveform data **/
ACQUIRE:STATE ON
/** Set up the measurement parameters **/
MEASUREMENT:MEAS1:TYPE AMPLITUDE
MEASUREMENT:MEAS1:SOURCE CH
1
/** Tak e
amplitude measurement **/
MEASUREMENT:MEAS1:RESUlts :CURRentacq:MEAN?
The acq
uisition o f the waveform requires extended processing time. It may not
finish before the oscilloscope takes an amplitude measurement (see the following
figure). This can result in an incorrect amplitude value.
Figure 3-7: Command Processing Without Using Synchronization
To ensure the o scilloscope completes waveform acquisition before taking the
measurement on the acquired data, you can synchronize the program using *WAI,
BUSY, *OPC, and *OPC?.
Figure 3-8: Processing Sequence With Synchronization
Example of Using the *OPC
Command
If the corresponding status registers are enabled, the *OPC command sets the
OPC bit in the Standard Event Status Register (SESR) when an operation is
complete. You achieve synchronization by using this command with either a
serial poll or service request handler.
MSO54, MSO56, MSO58, MSO58LP Programmer 3-9