
Chapter 6 Application Programs
Using the Low-Level Commands
130
QuickBASIC / GPIB (Program 2)
REM $INCLUDE: 'QBSETUP'
'
' This program uses low-level SCPI commands to program the power
' supply to output 3 volts/0.5 amps for +6V output, 20 volts/0.9 amps
' for +25V output, and 10 volts/0.5 amps for -25V output. This program
' also shows the use of a trigger received over the GPIB interface to
' initiate a single trigger. The program is written in QuickBASIC and
' uses Agilent 82335 GPIB card and GPIB command library.
'
ISC& = 7
' GPIB select code is "7"
Dev& = 705
' Assign I/O path to address 705
Timeout = 5
' Configure device library for a 5 second timeout
CALL IOTIMEOUT(ISC&, Timeout)
IF PCIB.ERR <> NOERR THEN ERROR PCIB.BASERR
CALL IORESET(ISC&)
' Reset the Agilent 82335 GPIB card
IF PCIB.ERR <> NOERR THEN ERROR PCIB.BASERR
CALL IOCLEAR(Dev&)
' Send a device clear to the power supply
IF PCIB.ERR <> NOERR THEN ERROR PCIB.BASERR
CALL IOREMOTE(Dev&)
' Place the power supply in the remote mode
IF PCIB.ERR <> NOERR THEN ERROR PCIB.BASERR
Info1$ = "*RST"
' Reset the power supply
Length1% = LEN(Info1$)
CALL IOOUTPUTS(Dev&, Info1$, Length1%)
IF PCIB.ERR <> NOERR THEN ERROR PCIB.BASERR
Info1$ = "INST:COUP:TRIG ALL"
' Couple three outputs
Length1% = LEN(Info1$)
CALL IOOUTPUTS(Dev&, Info1$, Length1%)
IF PCIB.ERR <> NOERR THEN ERROR PCIB.BASERR
Info1$ = "TRIG:SOUR BUS"
' Trigger source is "bus"
Length1% = LEN(Info1$)
CALL IOOUTPUTS(Dev&, Info1$, Length1%)
IF PCIB.ERR <> NOERR THEN ERROR PCIB.BASERR
Info1$ = "TRIG:DEL 30"
' Set 30 seconds of time time delay
Length1% = LEN(Info1$)
CALL IOOUTPUTS(Dev&, Info1$, Length1%)
IF PCIB.ERR <> NOERR THEN ERROR PCIB.BASERR
Summary of Contents for E3631-90002
Page 9: ...8...
Page 14: ...1 1 General Information...
Page 25: ...24...
Page 26: ...2 2 Initial Operation...
Page 34: ...3 3 Front Panel Operation...
Page 64: ...4 4 Remote Interface Reference...
Page 113: ...112...
Page 114: ...5 5 Error Messages...
Page 124: ...6 6 Application Programs...
Page 137: ...136...
Page 138: ...7 7 Tutorial...
Page 153: ...152...
Page 154: ...8 8 Specifications...
Page 161: ...160...