Specifications
164 Chapter 7
Measurement Result Processing
Using Marker Function
Example 7-4 Execution of the limit test using a marker (macro)
10 Sub Main()
20 Dim mkr1_stim(8) As Double, mkr1_upp(8) As Double,
mkr1_low(8) As Double
30 Dim mkr1_meas(8) As Double
40 Dim ref_stim As Double, ref_upp As Double, ref_low As
Double, ref_meas As Double
50 Dim ref_judge As String, mkr1_judge(8) As String,
all_judge As String
60 Dim trc1 As Integer, trc2 As Integer, mkr As Integer
70 Dim swp_bool As Integer, bool As Integer
80 Dim file As String
90
100 trc1 = 1
110 trc2 = 2
120
130 ref_stim = 1000000#
140 mkr1_stim(1) = 5000000#
150 mkr1_stim(2) = 10000000#
160 mkr1_stim(3) = 50000000#
170 mkr1_stim(4) = 100000000#
180 mkr1_stim(5) = 500000000#
190 mkr1_stim(6) = 1000000000#
200 mkr1_stim(7) = 2000000000#
210 mkr1_stim(8) = 3000000000#
220
230 ref_upp = 80
240 mkr1_upp(1) = 80
250 mkr1_upp(2) = 70
260 mkr1_upp(3) = 70
270 mkr1_upp(4) = 70
280 mkr1_upp(5) = 70
290 mkr1_upp(6) = 80
300 mkr1_upp(7) = 80
310 mkr1_upp(8) = 80
320
330 ref_low = 20
340 mkr1_low(1) = 20
350 mkr1_low(2) = 30
360 mkr1_low(3) = 30
370 mkr1_low(4) = 30
380 mkr1_low(5) = 30
390 mkr1_low(6) = 20
400 mkr1_low(7) = 20
410 mkr1_low(8) = 20
420
430 ' E4991A settings
440
450 SCPI.Output "SYST:PRES"
460 '
470 SCPI.Output "DISP:TRAC" & CStr(trc1) & " ON"
480 SCPI.Output "DISP:TRAC" & CStr(trc2) & " OFF"
490 SCPI.Output "CALC" & CStr(trc1) & ":FORM Z"
500
510 SCPI.Output "SWE:TYPE LOG"
520