END IF
IF esr% AND 8 THEN
PRINT "*** Instrument Dependent Error Reported by AC Source ***"
END IF
IF esr% AND 16 THEN
PRINT "*** Command Execution Error Reported by AC Source ***"
END IF
IF esr% AND 32 THEN
PRINT "*** Command Syntax Error Reported by AC Source ***"
END IF
'Clear ERR. -XXX Message from front panel if any error occurred
IF esr% <> 0 THEN
PRINT #1, "*CLS" + CHR$(10);
END IF
END IF
LOOP UNTIL cmd$ = "QUIT" OR cmd$ = "quit"
'Close COM port on exit
CLOSE #1
END
'================================================================
FUNCTION retstring$
'This function returns a response string from the P/RP Series
'AC power source. The QBasic statement LINE INPUT cannot be used
'as the P/RP Series does not return a CR <13> after a response
'message. The LINE INPUT function waits for a CR before
'returning a string. The P Series returns a LF <10> instead
'so we need to poll each returned character for a LF to
'assemble the response string. The COM port needs to be
'opened AS random with a record length of 1 for it to support
'this function. Also, the device number is assumed to be #1
'Optionally, this value could be passed as a parameter to
'make this program more generic.
DIM char AS STRING * 1
DIM resp AS STRING
char = ""
resp = ""
DO
char = INPUT$(1, #1)
resp = resp + char
LOOP UNTIL char = CHR$(10)
'Return result
retstring = LEFT$(resp, LEN(resp) - 1)
END FUNCTION
Summary of Contents for 2003RP
Page 2: ......
Page 4: ...ii This page intentionally left blank...
Page 46: ......
Page 58: ...Figure 6 3 Internal Adjustments...
Page 64: ...Figure 7 1 Assembly Location...
Page 69: ...Figure 8 1 Rear Panel View...