List Programming Example - Agilent Technologies N6751A User Manual

Modular power system
Table of Contents

Advertisement

7 Programming Examples

List Programming Example

Sub list_programming_example()
Dim IDN As String
Dim GPIBaddress As String
Dim ErrString As String
Dim channel As String
'These variable are necessary to initialize the VISA COM.
Dim ioMgr As AgilentRMLib.SRMCls
Dim Instrument As VisaComLib.FormattedIO488
' The following command line provides the program with the VISA name of the
' interface that it will communicate with. It is currently set to use GPIB.
GPIBaddress = "GPIB1::5::INSTR"
' Use the following line instead for LAN communication
' TCPIPaddress="TCPIP0::141.25.36.214"
' Use the following line instead for USB communication
' USBaddress = "USB0::2391::1799::US00000002"
' Initialize the VISA COM communication
Set ioMgr = New AgilentRMLib.SRMCls
Set Instrument = New VisaComLib.FormattedIO488
Set Instrument.IO = ioMgr.Open(GPIBaddress)
' These next three strings are the points in the list.
' All three strings are the same length.
' The first one controls voltage, the second current, and the third dwell time
Const voltPoints = "1,2,3,4,5,6,7,8,9,10"
Const currPoints = "0.5,1,1.5,2,2.5,3,3.5,4,4.5,5"
Const dwellPoints = "1,2,0.5,1,0.25,1.5,0.1,1,0.75,1.2"
' This variable can be changed to program any channel in the mainframe
channel = "(@1)"
With Instrument
' Send a power reset to the instrument
.WriteString "*RST"
' Query the instrument for the IDN string
.WriteString "*IDN?"
IDN = .ReadString
' Set the voltage mode to list
.WriteString "VOLT:MODE LIST," & channel
' Set the current mode to list
.WriteString "CURR:MODE LIST," & channel
' Send the voltage list points
.WriteString "LIST:VOLT " & voltPoints & "," & channel
' Send the Current list points
.WriteString "LIST:CURR " & currPoints & "," & channel
112
This program executes a 10 point current and voltage list. It also
specifies 10 different dwell times. When done, the program checks for
instrument error and gives a message if there is an error.
' channel 1
Series N6700 User's Guide

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents