Other topics about Making Measurement
Using *OPC? is the common method to wait the end of measurement. When you trigger the instrument by issuing the :TRIG:SING command, *OPC? command waits until the measurement cycle is completed.
Once it is completed, "1" is returned.
*OPC? command does not wait the measurement end by the trigger with :TRIG.
The status of the E5063A can be detected through the status registers. This section explains how to detect the end of measurement by using the status registers.
Measurement status is reported by the operation status condition register. An SRQ (service request) is useful when creating a program that uses the information reported by this register to detect the end of measurement.
To detect the end of measurement via an SRQ, use one of the following commands:
*SRE
:STAT:OPER:ENAB
:STAT:OPER:PTR
:STAT:OPER:NTR
Follow these steps to utilize an SRQ:
Configure the E5063A so that it generates an SRQ when the operation status condition register's bit 4 (a bit that is set to 1 during measurement) is changed from 1 to 0.
Trigger the instrument to start a measurement cycle.
When an SRQ is generated, the program interrupts the measurement cycle.
See Waiting for Measurement End (SRQ).
Before creating your program, actually measure the time between the start and end of the measurement cycle. Then code your program so that the controller waits for the actual measured time by using the appropriate command. This is a straightforward method, but care must be taken: an incorrect wait time could result in an unexpected error.