Status and Events
For example, a typical application might involve acquiring a single-sequence
waveform and then taking a measurement on the acquired waveform. You could
use the following command sequence to do this:
/** Set up conditional acquisition **/
ACQUIRE:STATE OFF
SELECT:CH1 ON
HORIZONTAL:RECORDLENGTH 1000
ACQUIRE:MODE SAMPLE
ACQUIRE:STOPAFTER SEQUENCE
/** Acquire waveform data **/
ACQUIRE:STATE ON
/** Set up the measurement parameters **/
MEASUREMENT:IMMED:TYPE AMPLITUDE
MEASUREMENT: IMMED:SOURCE CH1
/** Take amplitude measurement **/
MEASUREMENT: MEAS1:VALUE
The acquisition of the waveform requires extended processing time. It may not
nish before the oscilloscope takes an amplitude measurement (see the following
gure). This can result in an incorrect amplitude value.
Figure 3-7: Command Processing Without Using Synchronization
To ensure the oscilloscope completes waveform acquisition before taking the
measurement on the acquired data, you can synchronize the program.
Figure 3-8: Processing Sequence With Synchronization
Youcan use four commands to synchronize the operation of the oscilloscope with
your application program: *WAI, BUSY
, *OPC, and *OPC
Using the *WAI Command The *WAIcommand forces completion of previous commands that generate
an OPC message. No commands after the *WAI are processed before the OPC
message(s) are generated
3-8 MSO4000 and DPO4000 Series Programmer Manual