Using The *Opc Command - Tektronix TBS2000 Series Programmer's Manual

Digital oscilloscope
Hide thumbs Also See for TBS2000 Series:
Table of Contents

Advertisement

Status and Events
/* 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 */
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 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 achieve synchronization by using this command with either a
serial poll or service request handler.
Serial Poll Method: 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:
/* Set up conditional acquisition */
ACQUIRE:STATE OFF
SELECT:CH1 ON
ACQUIRE:MODE SAMPLE
ACQUIRE:STOPAFTER SEQUENCE
/* Enable the status registers */
DESE 1
*ESE 1
*SRE 0
/* Acquire waveform data */
TBS2000 Series Programmer
285

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the TBS2000 Series and is the answer not in the manual?

Table of Contents