Tutorial > Measurement using the concurrent measurement function > Detecting the measurement completion

Using multiple measurement functions
Multipoint measurement with specified trigger count | Detecting the measurement completion

Measurement using the concurrent measurement function

Detecting the measurement completion

An *OPC? query or *OPC command was used to detect the measurement completion. Though these methods allow you to find out if all measurements in standby have been completed, they are inadequate if you wish to check the progress of the measurement action when triggers are set in detail or to detect the trigger-wait status. In addition, they are inadequate for detecting independently the measurement status or trigger-wait status of sequence 1 (impedance) and sequence 2 (voltage and current), which operate asynchronously. This section explains how to detect the measurement operation status including the use of *OPC and *OPC?.

The *OPC? query sets an ASCII character 1 when all standby procedures are completed. During this period, response data cannot be retrieved. If another command is used without retrieving the response data, the query is considered to have been aborted and OQAS (Operation Complete Query Active State) is reset. If this happens, an ASCII character 1 will not be set unless the *OPC? query is sent again.

The *OPC command sets the OPC bit (bit 0) of the standard event status register to true when all operations in standby are complete. If the standard event status enable register or the service request enable register is set, this event can be transmitted to the service request (SRQ). If the *CLS command is sent before the OPC bit is set, OCAS (Operation Complete Command Active State) is reset by the *CLS command. If this happens, the OPC bit is not set unless the *OPC command is sent again.

For example, if a command sequence such as

INIT;*OPC;*CLS

is sent, the last *CLS command cancels the *OPC command. The *CLS command does not abort measurement actions that have been initiated. It does not have the functionality of aborting measurements.

Both the MEAS:<meter_fn>? and READ[:<meter_fn>]? queries start measurements and query the measured data. The response data in response to these queries are generated when the measurement is complete. This characteristic can be used to detect the standby process by carrying out receive operation of the response data. The FETC[:<meter_fn>]? query after using the INITiate command also has the same effect, but it is recommended that *OPC?/*OPC or the status register be used to detect the measurement completion.

The *WAI command stops the processing of all subsequent commands until all procedures in standby are completed. This means that once this command is sent, the measurement cannot be aborted with the ABOR, *RST, or *RCL command. The only exception is the IEEE488.1 sdc and dcl messages. These messages can abort procedures in standby by interrupting the *WAI command. (The sdc and dcl messages (device clear messages) can only be used on the GPIB and USB. A corresponding function is not available on the RS232C, but the KFM2005/KFM2030 operates in the same manner when it receives a break signal.)

The STATU:OPER:MEAS register indicates whether measurement operation is currently in progress. If the impedance measurement (sequence 1 group) is in progress, the SEQ1 bit (bit 1) is set to true. Likewise, if the voltage and current measurements (sequence 2 group) are in progress, the SEQ2 bit (bit 2) is set to true. The summary of this register is linked to the MEASuring bit of the STAT:OPER register.

The STATU:OPER:TRIG register indicates whether a measurement function is in trigger-wait status. If the trigger source is set to BUS, the INIT:SEQ1 command is sent, and the impedance measurement (sequence 1 group) is in trigger-wait status, the SEQ1 bit of the register (bit 1 ) is set to true. Likewise, if the voltage and current measurements (sequence 2 group) are in trigger-wait status, the SEQ2 bit (bit 2) is set to true. However, if the trigger source of the corresponding sequence group is set to IMM, the corresponding bit of this register is not set, because trigger-wait status never occurs. The summary of this register is linked to the Waiting for TRIG bit of the STAT:OPER register.