Tektronix TDS 460A Sprinkler User Manual


 
Status and Events
TDS Family Oscilloscope Programmer Manual
3–9
/* 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 digitizing oscilloscope is slowed since it
is processing a single command at a time. This time could be spent doing other
tasks.
The controller can continue to write commands to the input buffer of the
digitizing oscilloscope, but the commands will not be processed by the digitizing
oscilloscope until all operations in process are complete. If the input buffer
becomes full, the controller will be unable to write more commands to the buffer.
This can cause a time-out.
The BUSY? query allows you to find out whether the digitizing oscilloscope 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 single-sequence acquisition */
SELECT:CH1 ON
HORIZONTAL:RECORDLENGTH 500
ACQUIRE:MODE NORMALSAMPLE
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 */
While BUSY? keep looping
/* Take amplitude measurement on acquired data */
MEASUREMENT:IMMED:VALUE?
This sequence lets you create your own wait loop rather than using the *WAI
command. The BUSY? query helps you avoid time-outs caused by writing too
many commands to the input buffer. The controller is still tied up, though, and
the repeated BUSY? query will result in more bus traffic.
If the corresponding status registers are enabled, the *OPC command sets the
OPC bit in the Standard Event Status Register (SESR) when an operation is
complete. You achieve synchronization by using this command with either a
serial poll or service request handler.
Using the BUSY Query
Using the *OPC Command