Example 2. Ibm Controller Using National Interface - 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 2. IBM Controller Using National Interface

990
'---------------------- Merge DECL.BAS here ------------------------
1000
'DC Source 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 dc source interface for DOS driver
1030
CALL IBFIND(BDNAME$,PS%)
1035
IF PS%
1040
CALL IBCLR(PS%)
1045
'
1050
'Program dc source to CV mode with following voltage and current
1055
CODES$ = "VOLTAGE MAX;CURRENT MAX"
1060
'
1065
'Query dc source outputs and print to screen
1070
CODES$ = "MEASURE:VOLTAGE?;CURRENT?"
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 MIN"
1110
'
1115
'Set operation status mask to detect mode change from CV to CC
1120
CODES$ = "STAT:OPER:ENAB 1024;PTR 1024"
1125
'
1130
'Enable Status Byte OPER summary bit
1135
CODES$ = "*SRE 128"
1140
'
1145
'Arm trigger circuit and send trigger to dc source
1150
CODES$ = "INITIATE:SEQUENCE1;TRIGGER"
1160
'Wait for supply to respond to trigger
1165
FOR I= 1 to 100
1170
'
1175
'Poll for interrupt caused by change to CC mode and print to screen
1180
SPOL%=0
1185
CALL IBRSP(PS%,SPOL%)
1190
IF (SPOL% AND 128) = 128 THEN POLL = 1
OPER bit
1195
IF POLL <> 1 THEN GOTO 1230
service
1200
"CODES$ = "STAT:OPER:EVEN?"
register
1205
CALL IBRD(PS%,OEVENT$)
1210
IF IBSTA%
1215
OEVENT=VAL(OEVENT$)
1220
IF (OEVENT AND 1024) = 1024 THEN PRINT "Supply switched to CC mode."
96
:GOSUB 2000
:GOSUB 2000
:NEXT I
:GOSUB 2000
:GOSUB 2000
:GOSUB 2000
:GOSUB 3000
:GOSUB 2000
:GOSUB 2000
'Set interrupt flag on
'No interrupt to
'Query status oper
'Read back event bit

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

6631b6632b66332a6633b6634b6611c ... Show all

Table of Contents