Status and Events
3−14
TDS200/1000/2000 Series Oscilloscope Programmer Manual
Using the *OPC Set 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 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 command 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 */