Status and Events
To ensure that the instrument completes waveform acquisition before taking the
measurement on the acquired data, you can synchronize the program.
You can use four commands to synchronize the operation of the instrument with
your application program: *WAI, BUSY, *OPC, and *OPC
*WAI
The *WAI command forces completion of previous commands that generate
an OPC message. No commands after the *WAI are processed before the OPC
message(s) are generated
The same command sequence using the *WAI command for synchronization
looks like this:
/* Set up conditional acquis ition */
ACQUIRE:STATE OFF
SELECT:CH1 ON
HORIZONTAL:MODE:RECORDLEN GTH 1000
ACQUIRE:MODE SAMPLE
ACQUIRE:STOPAFTER SEQUENCE
/* Acqu ire waveform data */
ACQUIRE:STATE ON
/* Set up the measurement parameters */
MEASUREMENT:IMMED:TYPE AMPLITUDE
MEASUREMENT:IMMED:SOURCE CH1
/* Wait until the acquisition is complete before taking
the mea surement*/
*/
*WAI
/* Take amplitude measurement */
MEASUREMENT:IMMED:VALUE
The controller can continue to write commands to the input buffer of the
instrument, but the commands will not be processed by the instrument until all
OPC operations in process are complete. If the input buffer becomes full, the
DPO7000, DPO70000/B and DSA7000/B Series Programmer Manual 3-7