User manual
Program Fragment
GOSUB Read Register 'Clear register by reading it
PRINT #1, "output 16; :init 'Place 2000 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 2000 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
Register
PRINT #1, "enter 16" 'Get response message from 2000
LINE INPUT #2, a$ 'Read decimal value of register
PRINT a$
RETURN
2000-900 (J - Aug 2010) BOOK.fm Page 45 Wednesday, October 12, 2011 12:29 PM