Agilent Technologies 664xA User Manual

Page 24

Advertising
background image

24 Remote Programming

Programming Some Power Supply Functions (continued)

3030

WHILE C< >O

3035

D$=MID$(OUTPUT$,I,C-I)

3040

OUTPUT(X)=VAL(D$)

'Get values

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)

'Clear

string

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 7.8;CURRENT 480”

1030

!

1035

!Query power supply outputs and print to screen

1040

OUTPUT 706;"MEASURE:VOLTAGE?;CURRENT?"

!Query output levels

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

!supply within its CV operating characteristic

1070

OUTPUT 706;"CURR:TRIG 50"

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

!No OPER event to report

1145

OUTPUT 706;"STAT:OPER:EVEN?"

!Query status operation register

1160

ENTER 706;Oevent

!Read back event bit

1156

IF BIT(Oevent,10) THEN PRINT "Supply 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

Advertising
This manual is related to the following products: