Agilent Technologies 664xA Power Supply User Manual


 
22 Remote Programming
Programming Some Power Supply Functions (continued)
1220 CALL IOENTER (PS,OEVENT) 'Read back event bit
1225 IF PCIB.ERR < > NOERR THEN ERROR PCIB.BASERR
1230 IF (OEVENT AND 1024) = 1024 THEN PRINT "Supply switched to CC mode."
1240 'Clear the status circuit
1245 CODES$ = "*CLS" :GOSUB 2000
1260 FOR I = 1 TO 100 :NEXT I 'Wait for supply to clear
1265
1260 'Disable output and save present state in location 2
1265 CODES$ = "OUTPUT OFF;*SAV 2" :GOSUB 2000
1270 END
1275
2000 'Send command to power supply
2005 LENGTH = LEN(CODES$)
2010 CALL IOOUTPUTS (PS,CODES$,LENGTH) 'Send command to interface
2015 IF PCIB.ERR < > NOERR THEN ERROR PCIB.BASERR ISETUP.BAS error trap
2020 RETURN
2025
3000 'Get data from power supply
3005 CALL IOENTERA (PS,OUTPUTS(1),MAX.ELEMENTS,ACTUAL.ELEMENTS)
3010 IF PCIB.ERR < > NOERR THEN ERROR PCIB.BASERR
3015 RETURN
******************************************************************************************************
IBM Controller Using National Interface
******************************************************************************************************
990 ‘ --------------------- Merge DECL.BAS here ------------------------
1000 'Power Supply Variable = PS% ; Stand-Alone Address = 706
1005 CODES$=SPACE$(50):MODE$=SPACE$(5):OEVENT$=SPACE$(20)
1010 D$=SPACE$(60):OUTPUT$=SPACE$(40):BDNAME$=“PS%"
1015 DIM OUTPUT(2)
1020
1025 'Set up power supply interface for DOS driver
1030 CALL IBFIND(BDNAME$,PS%)
1035 IF PS%<O THEN PRINT "IBFIND Failed."
1040 CALL IBCLR(PS%)
1045
1050 'Program power supply to CV mode with following voltage and current
1055 CODES$ = "VOLTAGE 7.8;CURRENT 480” :GOSUB 2000
1060
1065 'Query power supply outputs and print to screen
1070 CODES$ = "MEASURE:VOLTAGE?;CURRENT?" :GOSUB 2000 :GOSUB 3000
1075 VOUT = OUTPUT(1)
1080 IOUT = OUTPUT(2)
1085 PRINT "The programmed levels are "VOUT" Volts and "IOUT" Amps"
1090
1095 'Program triggered current level to value insufficient to maintain
1100 'supply within its CV operating characteristic
1105 CODES$ = "CURR:TRIG 50" :GOSUB 200
1110
1115 'Set operation status mask to detect mode change from CV to CC
1120 CODES$ = "STAT:OPER:ENAB 1024;PTR 1024" :GOSUB 2000
1125