Agilent Technologies E4356A Operating & Programming Manual page 61

Telecommunications dc power supply
Table of Contents

Advertisement

3030
WHILE C< >O
3035
D$=MID$(OUTPUT$,I,C-I)
3040
OUTPUT(X)=VAL(D$)
3045
I=C+1
3050
C=INSTR(I,OUTPUT$,";")
3055
X=X+1
3060
WEND
3065
D$=RIGHT$(OUTPUT$,LEN(OUTPUT$)-(I-1))
3070
OUTPUT(X)=VAL(D$)
3076
OUTPUT$=SPACE$(40)
3080
RETURN
****************************************************************************************************
Controller Using Agilent BASIC
*****************************************************************************************************
1000
!Power supply at stand-alone address = 706
1005
OPTION BASE 1
1010
DIM Codes$[80],Response$[80],Mode$[32]
1015
!
1020
!Program power supply to CV mode with following voltage and current
1026
OUTPUT 706;"VOLTAGE 78;CURRENT 25"
1030
!
1035
!Query power supply outputs and print to screen
1040
OUTPUT 706;"MEASURE:VOLTAGE?;CURRENT?"
1045
ENTER 706;Vout, Iout
1050
PRINT "The output levels are ";Vout;" Volts and ";Iout" Amps"
1055
!
1060
!Program current triggered level to a value insufficient to maintain
1065
!unit within its CV operating characteristic
1070
OUTPUT 706;"CURR:TRIG 1"
1075
!
1080
!Set operation status mask to detect mode change from CV to CC
1085
OUTPUT 706;"STAT:OPER:ENAB 1280;PTR 1280"
1090
!
1095
!Enable Status Byte OPER summary bit
1100
OUTPUT 706;"*SRE 128"
1105
!
1110
!Arm trigger circuit and send trigger to power supply
1115
OUTPUT 706;"INITIATE;TRIGGER"
1130
!Poll for interrupt caused by change to CC mode and print to screen
1135
Response=SPOLL(706)
1140
IF NOT BIT (Response,7) THEN GOTO 1130
1145
OUTPUT 706;"STAT:OPER:EVEN?"
1160
ENTER 706;Oevent
1156
IF BIT(Oevent,10) THEN PRINT "Unit switched to CC mode."
1160
!
1165
!Clear status
1170
OUTPUT 706;"*CLS"
1176
!
1180
!Disable output and save present state in location 2
1185
OUTPUT 706;"OUTPUT OFF;*SAV 2"
1190
END
Programming Some Power supply Functions (continued)
'Get values
'Clear string
!Query output levels
!No OPER event to report
!Query status operation register
!Read back event bit
Remote Programming
61

Advertisement

Table of Contents
loading

Table of Contents