*OPC
Operation Complete
The Operation Complete command causes the device to set the operation complete bit in the Standard Event Status Register when all pending selected device operations have been finished.
*OPC
and *OPC?
commands can be used with overlapping commands, i.e., commands which take long time to finish. In GSG such commands are starting/arming scenario execution (SOUR:SCEN:CONT START
), and starting/arming of the signal generator (SOUR:ONECHN:CONT START
).
Example
Enable OPC-bit
SEND:
*ESE 1
Start scenario. *OPC will set the operation complete bit in the status register when the start of scenario is done and it is running.
SEND:
SOURce:SCENario:CONTrol start;*OPC
Wait 5s for the scenario to start. Then read the event status register.
SEND:
*ESR?
Check the Operation complete bit (0) in the result. If it is true, the start of scenario is completed and you can ask for example the current position.
SEND:
SOURce:SCENario:LOG?
Then read the event status register to reset it:
SEND:
*ESR?