Trigger Programming Example - Agilent Technologies N5700 Series User Manual

System dc power supply
Hide thumbs Also See for N5700 Series:
Table of Contents

Advertisement

6 Programming Examples

Trigger Programming Example

Sub main_Trig()
Dim IDN As String
Dim IOaddress As String
Dim ErrString As String
Dim msg1 As String
' This variable is used to monitor the status
Dim stat As Long
' This variable controls the voltage
Dim VoltSetting As Double
' This variable measures the voltage
Dim MeasureVolt As Double
' This variable controls the current
Dim CurrSetting As Double
' This variable represents the trigger current setting
Dim trigCurrSetting As Double
' This variable controls the triggered voltage setting
Dim trigVoltSetting As Double
' This constant represents the register value for Waiting for Trigger
Const WTG = 32
' These variables are necessary to initialize the VISA COM
Dim ioMgr As AgilentRMLib.SRMCls
Dim Instrument As VisaComLib.FormattedIO488
' The following line provides the VISA name of the GPIB interface
IOaddress = "GPIB0::5::INSTR"
' Use the following line instead for LAN communication
' IOaddress="TCPIP0::141.25.36.214"
' Use the following line instead for USB communication
' IOaddress = "USB0::2391::1799::US00000002"
' Initialize the VISA COM communication
Set ioMgr = New AgilentRMLib.SRMCls
Set Instrument = New VisaComLib.FormattedIO488
Set Instrument.IO = ioMgr.Open(IOaddress)
VoltSetting = 3
CurrSetting = 2
trigVoltSetting = 5
trigCurrSetting = 3
With Instrument
' Send a power reset to the instrument
.WriteString "*RST"
' Query the instrument for the IDN string
.WriteString "*IDN?"
IDN = .ReadString
84
This example illustrates how to set up and trigger a voltage and
current change. The voltage is measured before and after the trigger.
' volts
' amps
' volts
' amps
Series N5700 User's Guide

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents