Status and Events
3-14
TDS200, TDS1000/2000, TDS1000B/2000B, TPS2000 Programmer
Using the *OPC Set Command
If the corresponding status registers are enabl ed, 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 and USB 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 comma nds.
When the opera tion is complete, 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.
The same command sequence using the *OPC comma nd for
synchronization with serial polling looks like this:
/* Set up single-sequence acquisition */
SELECT:CH1 ON
ACQUIRE:MODE SAMPLE
ACQUIRE:STOPAFTER SEQUENCE
/* Enable the status registers */
DESE 1
*ESE 1
*SRE 0
/* Acquire waveform data */
ACQUIRE:STATE ON
/* Set up the measurement parameters */
MEASUREMENT:IMMED:TYPE PK2PK
MEASUREMENT:IMMED:SOURCE CH1
/* Wait until the acquisition is complete before
taking the measurement */
*OPC
While serial poll = 0, keep looping
/* Take peak-to-peak measurement on acquired data */