Status and Events
Serial Poll Met
hod: 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 ac quisition */
ACQUIRE:STATE OFF
DISPLAY:WAVEVIEW1:CH1:STA TE 1
HORIZONTAL:RECORDLENGTH 1000
ACQUIRE:MODE SAMPLE
ACQUIRE:STOPAFTER SEQUENCE
/* Enab le the s tatus registers */
DESE 1
*ESE 1
*SRE 0
/* Acqu ire waveform data */
ACQUIRE:STATE ON
/* Set up the measurement parameters on the ch
annel we ’re
about t o sequence */
MEASUREMENT:MEAS1:TYPE AMPLITUDE
MEASUREMENT:MEAS1:SOURCE CH1
/* Wait until the acquis ition is complete before taking the
measurement. */
*OPC
While s erial poll = 0, keep loopi ng
/* Take amplitude measurement */
MEASUREMENT:MEAS1:RESUlts :CURRentacq:MEAN?
This technique requires less bus trafficthandidloopingonBUSY.
Service Request 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.
You can also enable service requests by setting the ESB bit in the Service R
equest
Enable Register (SRER) using the *SRE command. When the operation is
complete, the oscilloscope will generate a Service Request.
The same command sequence using the *OPC command for synchronization
looks like this
/* Set up conditional ac quisition */
ACQUIRE:STATE OFF
DISPLAY:WAVEVIEW1:CH1:STA TE 1
HORIZONTAL:RECORDLENGTH 1000
3-10 MSO54, MSO56, MSO58, MSO58LP Programmer