Agilent Technologies B2201A Switch User Manual


 
4-28 Agilent B2200 User’s Guide, Edition 2
Programming
Capacitance Compensation
Table 4-13 Capacitance Compensation Program Example
Imports Agilent.TMFramework
Imports Agilent.TMFramework.DataAnalysis
Imports Agilent.TMFramework.DataVisualization
Imports Agilent.TMFramework.InstrumentIO
Imports Agilent.TMFramework.InstrumentDriverInterop
Imports Agilent.TMFramework.InstrumentDriverInterop.Design
Imports Agilent.TMFramework.InstrumentDriverInterop.VxipnpWrappers
Module Module1
Sub Main() ’9
Dim Agb2200 As Agb220xa = New Agb220xa("GPIB0::22::INSTR", True, True)
Agb2200.Reset()
Dim f_com as String = "C:\temp\my_env_1.txt" ’12
Agb2200.SelectCompenFile(f_com)
Dim freq As Double = 1000000 ’measurement frequency: 1 (MHz) 15
Dim data_c As Double = 0.0000000001 ’C measured by 4284A: 100 (pF)
Dim data_g As Double = 0.0005 ’G measured by 4284A: 0.5 (mS)
Dim res_c As Double
Dim res_g As Double
Agb2200.CompenC(freq, data_c, data_g, res_c, res_g) ’20
Dim result As String = "C = " & res_c * 1000000000000.0 & " (pF)" ’22
result = result & Chr(10) & "G = " & res_g * 1000 & " (mS)" & Chr(10)
Console.WriteLine(result)
Agb2200.Close()
End Sub
End Module
Line Description
1 to 11 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.
12 to 13 The lines specify the compensation data file. The file name must specify your
compensation data file.
15 to 20 Compensates the data measured by the Agilent 4284A. In this example, the measurement
frequency is 1 MHz, the capacitance data is 100 pF, and the conductance data is 0.5 mS.
Change freq, data_c, data_g values for your measurement results.
22 to 24 Displays the compensation result data on the console window. Record the values as C1r and
G1r, or C2r and G2r.