Agilent Technologies 664xA Power Supply User Manual


 
Remote Programming 21
Programming Some Power Supply Functions
SAMPLE FOR POWER SUPPLY AT STAND-ALONE ADDRESS 6. SEQUENCE SETS UP CV MODE OPERATION,
FORCES SUPPLY TO SWITCH TO CC MODE, AND DETECTS AND REPORTS MODE CHANGE.
**************************************************************************
Controller Using Agilent 82335A Interface
**************************************************************************
5 ‘ < --------------- Merge SETUP.BAS here -------------------- >
1000 MAX.ELEMENTS=2 : ACTUAL.ELEMENTS=O :MAX.LENGTH=80 :ACT.LENGTH=O
1005 DIM OUTPUTS(2) :CDDES$=SPACE$(40)
1010 ISC=7 :PS=706
1015
1020 'Set up the Power Supply Interface for DOS driver
1025 CALL IORESET (ISC) 'Reset the interface
1030 IF PCIB.ERR < > NOERR THEN ERROR PCIB.BASERR
1035 TIMEOUT=3
1040 CALL IOTIMEOUT (ISC, TIMEOUT) 'Set timeout to 3 seconds
1045 IF PCIB.ERR < > NOERR THEN ERROR PCIB.BASERR
1050 CALL IOCLEAR (ISC) 'Clear the interface
1055 IF PCIB.ERR <> NOERR THEN ERROR PCIB.BASERR
1060 CALL IOREMOTE (ISC) 'Set Power Supply to remote mode
1065 IF PCIB.ERR <> NOERR THEN ERROR PCIB.BASERR
1070
1075 'Program power supply to CV mode with following voltage and current
1080 CODES$ = "VOLTAGE 7.8;CURRENT 480" :GOSUB 2000
1085
1090 'Query power supply outputs & print to screen
1095 CODES$ = "MEASURE:VOLTAGE?;CURRENT?" :GOSUB 2000 :GOSUB 3000
1100 VOUT = OUTPUTS(I)
1105 IOUT = OUTPUTS(2)
1110 PRINT "The output levels are "VOUT" Volts and "IOUT" Amps"
1115
1120 'Program triggered current level to value insufficient to maintain
1125 'supply within its CV operating characteristic
1130 CODES$ = "CURR:TRIG 50" :GOSUB 2000
1135
1140 'Set operation status mask to detect mode change from CV to CC
1145 CODES$ = "STAT:OPER:ENAB 1024;PTR 1024" :GOSUB 2000
1150
1155 'Enable Status Byte OPER summary bit
1160 CODES$ = "*SRE 128" :GOSUB 2000
1165
1170 'Arm trigger circuit and send trigger to power supply
1175 CODES$ = "INITIATE;TRIGGER" :GOSUB 2000
1180
1185 'Wait for supply to respond to trigger
1190 FOR I= 1 to 100 :NEXT I
1195
1200 'Poll for interrupt caused by change to CC mode and print to screen
1205 CALL IOSPOLL (PS,RESPONSE)
1210 IF (RESPONSE AND 128)< >128 THEN GOTO 1240 'No OPER event to report
1215 CODES$ = "STATUS:OPER:EVEN?" :GOSUB 2000 'Query status oper register