Example 3. Controller Using Basic - Agilent Technologies 66312A Programming Manual

Dynamic measurement dc source; system dc power supply
Hide thumbs Also See for 66312A:
Table of Contents

Advertisement

D - Example Programs

Example 3. Controller Using BASIC

1000
!Dc source at stand-alone address = 706
1005
OPTION BASE 1
1010
DIM Codes$[80],Response$[80],Mode$[32]
1015
!
1020
!Program dc source to CV mode with following voltage and current
1025
OUTPUT 706;"VOLTAGE MAX;CURRENT MAX"
1030
!
1035
!Query dc source outputs and print to screen
1040
OUTPUT 706;"MEASURE:VOLTAGE?;CURRENT?"
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 MIN"
1075
!
1080
!Set operation status mask to detect mode change from CV to CC
1085
OUTPUT 706;"STAT:OPER:ENAB 1024;PTR 1024"
1090
!
1095
!Enable Status Byte OPER summary bit
1100
OUTPUT 706;"*SRE 128"
1105
!
1110
!Arm trigger circuit and send trigger to dc source
1115
OUTPUT 706;"INITIATE:SEQUENCE1;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
report
1145
OUTPUT 706;"STAT:OPER:EVEN?"
register
1150
ENTER 706;Oevent
bit
1155
IF BIT(Oevent,10) THEN PRINT "Supply switched to CC mode."
1160
!
1165
!Clear status
1170
OUTPUT 706;"*CLS"
1175
!
1180
!Disable output and save present state in location 2
1185
OUTPUT 706;"OUTPUT OFF;*SAV 2"
1190
END
98
!Query output
!No OPER event to
!Query status operation
!Read back event

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

6631b6632b66332a6633b6634b6611c ... Show all

Table of Contents