![Agilent Technologies Series N6700 User Manual Download Page 104](http://html1.mh-extra.com/html/agilent-technologies/series-n6700/series-n6700_user-manual_2868448104.webp)
Digitizer Programming Example
104
Series N6700 User’s Guide
Digitizer Programming Example
This program uses the voltage in step mode and also demonstrates
how to set up and use the digitizer.
Sub main_List()
Dim IDN As String
Dim GPIBaddress As String
Dim ErrString As String
Dim channel As String
Dim measPoints As Long
Dim measOffset As Long
Dim Voltage As Double
Dim finalVoltage As Double
Dim timeInterval As Double
Dim VoltPoints() As Variant
Dim i As Long
'These variable are neccessary to initialize the VISA COM.
Dim ioMgr As AgilentRMLib.SRMCls
Dim Instrument As VisaComLib.FormattedIO488
' disable button
Command1.Enabled = False
' The following command line provides the program with the VISA name of the
' interface that it will be communication with.
' It is currently set to use GPIB to communicate
GPIBaddress = "GPIB0::5::INSTR"
' This controls the number of points the measurement system measures
measPoints = 100
' This controls the number of points to offset the measurement (positive for
' forward, negative for reverse)
measOffset = 0
' this sets the time between points
timeInterval = 0.0025
' this variable controls the voltage
' it can be hard coded into the viPrintf command as well
Voltage = 5
' This is the final voltage that will be triggered
finalVoltage = 10
' This variable can be changed to program any channel in the mainframe
channel = "(@1)" ' channel 1
' Initialize the VISA COM communication
Set ioMgr = New AgilentRMLib.SRMCls
Set Instrument = New VisaComLib.FormattedIO488
Set Instrument.IO = ioMgr.Open(GPIBaddress)
With Instrument
' Send a power reset to the instrument
.WriteString "*RST"
' Query the instrument for the IDN string
.WriteString "*IDN?"