Status and Events
3-10
TDS3000, TDS3000B, and TDS3000C Series Programmer Manual
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. Use the *OPC command to guarantee all
previous commands have been processed and are applied to all dependent
waveform operations.
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) will be enabled and the Event Status
Bit (ESB) in the Status Byte Register will be enabled.
The same command sequence using the *OPC command for synchronization
with serial polling looks like this:
REM “Set up single-sequence acquisition”
SELECT:CH1 ON
HORIZONTAL:RECORDLENGTH 500
ACQUIRE:MODE SAMPLE
ACQUIRE:STOPAFTER SEQUENCE
REM “Enable the status registers”
DESE 1
*ESE 1
*SRE 0
REM “Acquire waveform data”
ACQUIRE:STATE ON
REM “Set up the measurement parameters”
MEASUREMENT:IMMED:TYPE AMPLITUDE
MEASUREMENT:IMMED:SOURCE CH1
REM “Wait until the acquisition is complete before taking the measurement”
*OPC
While serial poll = 0, keep looping
REM “Take amplitude measurement on acquired data”
MEASUREMENT:IMMED:VALUE?
This technique requires less bus traffic than did looping on BUSY?.
Service Request Method ( GPIB only). Enable the OPC bit in the Device Event
Status Enable Register (DESER) and the Event Status Enable R egister (ESER)
using the DESE and *ESE commands. You can also enable service requests by
setting the ESB bit in the Service Request Enable Register (SRER) using the
*SRE command. When the operation is complete, a Service Request will be
generated.
Using the *OPC Command