Tektronix TDS 310 Sprinkler User Manual


 
Status and Events
Status and Events
3Ć8
The acquisition of the waveform must be completed before the measurement
can be taken on the acquired data. This is achieved by synchronizing the
program so that the measurement command is not processed by the oscilloĆ
scope until the acquisition is complete. Figure 3Ć8 shows the desired procesĆ
sing sequence.
MEASUREMENT:IMMED:VALUE?
Processing Time
Acquiring Waveform Data
ACQUIRE:STATE ON
Figure 3Ć8:ăProcessing Sequence With Synchronization
Four commands can be used to synchronize the operation of the oscilloĆ
scope with your application program: *WAI, BUSY?, *OPC, and *OPC?.
Using the *WAI Command
You can force commands to execute sequentially by using the *WAI comĆ
mand. 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 up singleĆsequence acquisition */
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 on acquired data */
MEASUREMENT:IMMED:VALUE?
Though *WAI is one of the easiest ways to achieve synchronization, it is also
the most costly. The processing time of the oscilloscope is slowed, since it is
processing a single command at a time. This time could be spent doing other
tasks.