Specifications
Chapter 16 267
Application Programs
Basic Measurement
16. Application Program
variable Standard and waits for the completion of measurement.
Lines 2350 - 2400 If measurement of the fixture compensation data is not completed
because of some kind of error, displays a message indicating
interruption of measurement and returns the function program return
value as -1. When measurement of the fixture compensation data is
completed, returns the function program return value as 0.
Below is an explanation of the function program Message for displaying messages.
Lines 2510 - 2570 Displays a message specified by the variable Mes and waits for either
the
Yes button or the No button to be clicked. When the Yes button is
clicked, returns the function program return value as 0; when the
No
button is clicked, returns the function program return value as -1.
Example 16-2 Measuring the self-resonant point of an inductor (bsc_meas.bas)
10|
20| Sub Main()
30| ' Preparation for Using Event Procedure
40|
50| Dim Err As New clsErr
60| Set Err.Evnt = New E4991ALib.Application
70|
80| ' STEP1: Preparation for a Measurement
90|
100| Dim buff As String
110| Dim Swp_type As String
120| Dim Para_a As String, Para_b As String, Para_c As String
130| Dim Fmt_a As String, Fmt_b As String, Fmt_c As String,
Display As String
140| Dim Cal_type As String, Fixture As String, Mkr_src As
String
150| Dim Curr_lev As Double, Swp_start As Double, Swp_stop
As Double
160| Dim Freq_val As Double, Imp_val As Double
170| Dim swp_count As Integer, Corr As Integer, i As Integer,
nop As Integer, Reply As Integer, Result As Integer
180| Dim Answer As Long
190|
200| nop = 201 ' Number of Points: 201
210| Swp_type = "LOG" ' Sweep Type(X-axis):
LOGARITHMIC
220| Swp_start = 1000000# ' Start Frequency: 1.0
MHz
230| Swp_stop = 3000000000# ' Stop Frequency: 3.0
GHz
240| Curr_lev = 0.001 ' Source Current Level: 1 mA
250| Para_a = "Z" ' Measurement/ Trace1: |Z|
260| Para_b = "LS" ' Parameters Trace2: Ls
270| Para_c = "Q" ' Trace3: Q
280| Fmt_a = "LOG" ' Display/ Trace1:
LOGARITHMIC
290| Fmt_b = "LIN" ' Format(Y-axis) Trace2:
LINEAR
300| Fmt_c = "LIN" ' Trace3: LINEAR
310| swp_count = 3 ' Sweep Averaging Count: 3
320| Display = "OVER" ' Display Split/Overlay:
OVERLAY