User Manual

’ Page 2.9
’**************** Acknowledge subroutine ******************
’Use this subroutine after each command or query sent to the
’instrument. This routine inputs the acknowledge
’response from the instrument. If the response is non-zero,
’the previous command was not correct or was not correctly
’received by the instrument. Then an error message is
’displayed and the program is aborted.
Acknowledge:
INPUT #1, ACK ’Reads acknowledge from instrument.
IF ACK <> 0 THEN
PRINT "Error "; ACK; ": ";
SELECT CASE ACK
CASE 1
PRINT "Syntax Error"
CASE 2
PRINT "Execution Error"
CASE 3
PRINT "Synchronization Error"
CASE 4
PRINT "Communication Error"
CASE IS < 1
PRINT "Unknown Acknowledge"
CASE IS > 4
PRINT "Unknown Acknowledge"
END SELECT
PRINT "Program aborted."
END
END IF
RETURN
’****************** End example program *****************