Tutorial

Waiting for Operation Complete

The *OPC command has a capability to wait for an operation to complete. Operation complete means that there is no pending operation that is still in progress.

When the *OPC command is sent, the KPM1000 enters the Operation Complete Command Active State (OCAS). When the measurement is completed and there is no other operation pending, the KPM1000 returns to Operation Complete Command Idle State (OCIS) and sets the OPC bit (bit 0) to TRUE (1) in the Standard Event Status Register. This information can be confirmed with the *ESR? query command by checking the OPC bit (bit 0).

The following example makes a new measurement and sends the *OPC. When the measurement is completed, an SRQ (Service Request) is generated, as the Standard Event Status Enable Register and the Service Request Enable Register are unmasked so that an SRQ can be signaled by the Operation Complete event. When using the RS232 interface, the SRQ feature cannot be used.

*ESE 1;*SRE 32;*CLS;:INITiate;*OPC

<Wait for the SRQ to be generated.>

Using the *OPC? query command instead of the *OPC command makes the KPM1000 enter the Operation Complete Query Active State (OQAS). When the measurement is completed and there is no other operation pending, the KPM1000 returns to the Operation Complete Query Idle State (OQIS) and sets the response data to "1" (in NR1 format ) in the output queue.

INITiate;*OPC?

<Read the response>

At power-on or after the IEEE488 sdc/dcl, *RST command is sent, the KPM1000 is in the OCIS and OQIS state

Overview

Setup

Overview of Messages

Command (function search)

Command (ABC search)

Command (Sub-system search)

Appendix

Tutorial