
3-106 Agilent B1500A/B1505A Programming Guide, Edition 11
Programming Examples
SPGU Pulse Output and Voltage Measurement
The following program controls a SPGU to output 2-level pulse from the channel 1
and 3-level pulse from the channel 2. This program can run without the project
template (Table 3-1).
Table 3-27 SPGU Pulse Output Example
Imports Ivi.visa.interop ’1
Module Module1
Sub Main()
Dim B1500 As IResourceManager ’6
Dim session As IMessage
B1500 = New ResourceManager
session = B1500.Open("GPIB0::17::INSTR")
session.WriteString("*RST" & vbLf) ’10
MsgBox("Click OK to start measurement.", vbOKOnly, "")
Console.WriteLine("SPGU setup." & Chr(10))
Dim sp_ch() As Integer = {101, 102} ’14
Dim duration As Double = 10
Dim loadz As Double = 1000000.0
Dim period As Double = 0.0001
Dim p1_del As Double = 0.00001
Dim p1_wid As Double = 0.00008
Dim p2_del1 As Double = 0.00001
Dim p2_del2 As Double = 0.00006
Dim p2_wid1 As Double = 0.00003
Dim p2_wid2 As Double = 0.00003
Dim p_lead As Double = 0.00000002
Dim p_trail As Double = 0.00000002
Dim p1_base As Double = 0
Dim p1_peak As Double = 3
Dim p2_base1 As Double = 0
Dim p2_base2 As Double = 0
Dim p2_peak1 As Double = 3
Dim p2_peak2 As Double = -3
Dim p_stat As Integer = 0 ’32
Line Description
1 This line is required to use the VISA COM library.
6 to 9 Establishes the connection with the Agilent B1500 of the GPIB address 17 on the
interface GPIB0. “GPIB0” is the VISA name. Confirm your GPIB settings, and set
them properly.
10 Resets the B1500.
14 to 32 Declares variables and sets the value. This program uses the SPGU installed in the slot
1 of the B1500.
Komentáře k této Příručce