Status and Events
/* Acqu ire wave
form da ta */
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
measuremen
t*/
*OPC?
Wait for re
ad from Output Queue.
/* Take amplitude measurement */
MEASUREMENT:IMMED:VALUE?
This is the simplest approach. It requires no status handling or loops. However,
you must set the controller time-out for longer than the acquisition operation.
Example of Using the *WA I
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
HORIZONTAL:RECORDLENGTH 1000
ACQUIRE:MODE SAMPLE
ACQ
UIRE:STOPAFTER SEQUENCE
/* Acquir e 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 measu rement*/
*/
*WAI
/* Take amplitude measurement */
MEASUREMENT:IMMED:VALUE?
The controller can continue to write commands to the input buffer of the
oscilloscope, but the commands will not be processed by the oscilloscope 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 causea
time-out.
3-12 MDO4000/B/C, MSO/DPO4000B and MDO3000 Series Oscilloscopes Programmer Manual