Status and Events
The acquisitio
n of the waveform requires extended processing time. It may
not finish before the instrument executes the CURVe? query (see the following
figure). T his can result in incorrect curve values.
To ensure that the instrument completes waveform acquisition before attempting
to execute the CURVe? query, you can synchronize the program. The figure
below shows the desired processing sequence.
You can use four commands to synchronize the operation of the instrument with
your application program: *WAI, BUSY?, *OPC, and *OPC?
*WAI
You can force commands to execute sequentially by using the *WAI command.
This command forces completion of the previous commands before processing
new ones.
The same command sequence using the *WAI command for synchronization
looks like this:
/** Set s up condit ional acquisition **/
ACQUIRE:STATE OFF
SELECT:CH1 ON
HORIZONTAL:RECORDLENGTH 500
ACQUIRE:MODE SAMPLE
ACQUIRE:STOPAFTER COUNT 1
ACQUIRE:STOPAFTER:MODE CONDITION
/** Set s up the data preamble **/
DATA:START 1
DATA:STOP 500
DATA:ENCDG RIBINARY
/** Cle ar data and then acquir e waveforms until
conditional stop occur s**/
ACQUIRE:DATA:CLEAR
ACQUIRE:STATE ON
/** Wai t until the acquisition is complete before
querying the curve data**/
*WAI
/** Get the curve data **/
DSA/CSA/TDS8X00/B Series Programmer Manual 3-7