Program Fragment
GOSUB Read Register 'Clear register by reading it
PRINT #1, "output 16; :init 'Place 2010 in idle
:cont off; :abort"
PRINT #1, "output 16; :init;*opc" 'Start measurements and send *OPC
SLEEP 2 'Wait two seconds
GOSUB ReadRegister 'Read register to show that OPC is
'not set
PRINT #1, "output 16; :abort" 'Place 2010 back in idle
GOSUB ReadRegister 'Read register to show that OPC is
'now set
END
ReadRegister:
PRINT #1, "output 16; *esr?" 'Query Standard Event Status Reg-
'ister
PRINT #1, "enter 16" 'Get response message from 2010
LINE INPUT #2, a$ 'Read decimal value of register
PRINT a$
RETURN
Remote Operation 4-39