User Manual
104
KDC Series II DC Power Supplies
IF cmd$ <> "QUIT" AND cmd$ <> "quit" THEN
IF cmd$ <> "" THEN
PRINT #1, cmd$ + CHR$(10);
END IF
IF INSTR(cmd$, "?") THEN
PRINT "Power supply query response = "; retstring$
END IF
'Check for Errors after each command is issued
PRINT "Sending non-query syntax check *ESR?"
'On fast PC's we may have to hold off between commands
FOR t = 0 TO 1000: NEXT t
PRINT #1, "*ESR?" + CHR$(10);
esr% = 0 'Clear last error
'Mask off bits 5,4,3,2 only. Other bits are not used.
esr% = VAL(retstring$) AND 60
'Process esr% value for error bits
IF esr% AND 4 THEN
PRINT "*** Query Error Reported by power supply ***"
END IF
IF esr% AND 8 THEN
PRINT "*** Instrument Dependent Error Reported by power supply ***"
END IF
IF esr% AND 16 THEN
PRINT "*** Command Execution Error Reported by power supply ***"
END IF
IF esr% AND 32 THEN
PRINT "*** Command Syntax Error Reported by power supply ***"
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 KDC Series
'power supply. The QBasic statement LINE INPUT cannot be used
'as the KDC 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
Содержание KDC 100-100
Страница 2: ......
Страница 10: ......
Страница 26: ...User Manual 16 KDC Series II DC Power Supplies Figure 3 1 Location of rear panel connectors ...
Страница 33: ...User Manual KDC Series II DC Power Supplies 23 Figure 4 3 Front panel layout ...
Страница 82: ......
Страница 83: ...User Manual KDC Series II DC Power Supplies 73 Figure 6 1 DC Power Supply Block Diagram ...
Страница 84: ...User Manual 74 KDC Series II DC Power Supplies Figure 6 2 DC Power Supply Block Diagram with IF option ...
Страница 111: ...User Manual KDC Series II DC Power Supplies 101 Figure 8 2 Replaceable Fuse Locations ...