Tektronix TDS 320 Sprinkler User Manual


 
Status and Events
TDS 310, TDS 320 & TDS 350 Programmer Manual
3Ć9
The controller can continue to write commands to the input buffer, but the
commands are not processed by the oscilloscope until all operations in
process are complete. If the input buffer becomes full, the controller will be
unable to write any more commands to the buffer and will result in a timeĆout.
Using the BUSY Query
BUSY? allows you to find out whether the oscilloscope is busy processing a
command that has an extended processing time, such as singleĆsequence
acquisition.
The same command sequence using BUSY? 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 */
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. An advantage to using BUSY? is that you eliminate the possibility
of a timeĆout caused by writing too many commands to the input buffer. The
controller is still tied up, though, and the repeated BUSY? results in more bus
traffic.
Using the *OPC Command
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 can use this command in conjunction with either a serial poll
or service request handler to achieve synchronization.
Serial Poll Method (GPIB Only) Ċ Enable the OPC bit in the Device
Event Status Enable Register (DESER) and the Event Status Enable Register
(ESER) using the DESE and *ESE commands. When the operation is comĆ
plete, the OPC bit in the Standard Event Status Register (SESR) is enabled,
and the Event Status Bit (ESB) in the Status Byte Register is enabled.