Fluke 2635A Lawn Mower User Manual


 
Computer Operations
Computer Interface Commands and Operation
4
4-61
CheckResponse:
' CHECKRESPONSE Subroutine
' This subroutine checks the Hydra prompt after sending a command to
' Hydra, to see if an error occurred
' The possible responses are:
' "=>(CR)(LF)" (command successful)
' "?>(CR)(LF)" (command syntax error)
' "!>(CR)(LF)" (command execution error)
PROMPT$ = INPUT$(4, #1) ' Get prompt
IF INSTR(1, PROMPT$, "=>") <> 0 THEN RETURN 'Command successful
IF INSTR(1, PROMPT$, "?>") <> 0 THEN
PRINT "Command Syntax Error!"
ELSEIF INSTR(1, PROMPT$, "!>") <> 0 THEN
PRINT "Command Execution Error!"
END IF
PRINT "Program execution halted due to communications errors"
END
op52_3f.eps
Figure 4-6. Sample Program (QBASIC) (3 of 3)