Agilent Technologies B2201A Switch User Manual


 
Agilent B2200 User’s Guide, Edition 2 4-9
Programming
Programming Examples
Table 4-3 Input-Output Connection Example
Imports Agilent.TMFramework '1
Imports Agilent.TMFramework.InstrumentIO
Module Module1
Sub Main()
Dim B2200 As New DirectIO("GPIB0::22::INSTR") '6
Dim channels As String = "(@10101,10202,10303,10404)"
B2200.WriteLine("*RST") '8
B2200.WriteLine(":ROUT:FUNC NCON")
B2200.WriteLine(":ROUT:CONN:RULE ALL,SROU")
B2200.WriteLine(":ROUT:CONN:SEQ ALL,BBM")
B2200.WriteLine(":SYST:DISP:STR 'Connecting MOSFET AG002201'")
B2200.WriteLine(":ROUT:CLOS " & channels) '13
MsgBox("Click OK to start measurement.", vbOKOnly, "")
Console.WriteLine("Measurement in progress. . ." & Chr(10))
'insert the code for measurement
B2200.WriteLine(":ROUT:OPEN:CARD ALL") '17
B2200.Close()
MsgBox("Click OK to stop the program.", vbOKOnly, "")
Console.WriteLine("Measurement completed." & Chr(10))
End Sub '21
End Module
Line Description
1 to 6 The above example is for the B2200 of the GPIB address 22 on the interface GPIB0.
“GPIB0” is the VISA name. Confirm your GPIB settings, and set them properly.
7 Defines the channel list in the channels variable (string).
8 to 12 Resets the Agilent B2200, sets the Normal configuration mode, the Single connection rule,
and the Break_Before_Make connection sequence. And displays the string on the LCD.
13 Closes switches to connect the input-output paths specified by channels.
14 to 16 Opens a message box to confirm the start of measurement. And clicking OK on the
message box displays a message on the console window.
Insert measurement control program code at the line 16.
17 Opens all relays on the all modules installed in the Agilent B2200.
18 to 22 Disables the software connection with the Agilent B2200, and opens a message box to
confirm the end of the program. Finally, clicking OK on the message box displays a
message on the console window.