Using the *WAI Command
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 acquisition */
ACQUIRE:STATE OFF
SELECT:CH1 ON
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
/* Wait until the acquisition is complete before taking the measurement*/
*/
*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 in-
process OPC operations are complete. If the input buffer becomes full, the
controller will be unable to write commands to the buffer. This can cause a time-
out.
Using the BUSY Query
The BUSY? query allows you to find out whether the instrument is busy
processing a command that has an extended processing time such as single-
sequence acquisition.
The same command sequence, using the BUSY? query for synchronization, looks
like this:
/* Set up conditional acquisition */
ACQUIRE:STATE OFF
SELECT:CH1 ON
ACQUIRE:MODE SAMPLE
ACQUIRE:STOPAFTER SEQUENCE
Status and Events
284 TBS2000 Series Programmer