Specifications
Chapter 3 71
Setting Measurement Conditions
Example program for setting the segment sweep conditions
3. Setting Measurement
Conditions
70 Dim osc_unit As String, dcbias_unit As String
80
90 no_of_segment = 3
100 osc_unit = "VOLT"
110 dcbias_unit = "CURR"
120
130 start_f(1) = 1000000#
140 stop_f(1) = 100000000#
150 nop(1) = 101
160 point_avg(1) = 32
170 osc(1) = 0.1
180 dcbias(1) = 10
190 dcbias_lim(1) = 0.01
200 start_f(2) = 100000000#
210 stop_f(2) = 1000000000#
220 nop(2) = 101
230 point_avg(2) = 4
240 osc(2) = 0.1
250 dcbias(2) = 10
260 dcbias_lim(2) = 0.01
270 start_f(3) = 1000000000#
280 stop_f(3) = 3000000000#
290 nop(3) = 51
300 point_avg(3) = 4
310 osc(3) = 0.1
320 dcbias(3) = 10
330 dcbias_lim(3) = 0.01
340
350 ' Initial Setting
360
370 SCPI.Output "SYST:PRES"
380 SCPI.Output "SEGM:COUN " & CStr(no_of_segment)
390 SCPI.Output "DISP:TEXT:STAT ON"
400 SCPI.Output "SEGM:" & osc_unit & ":STAT ON"
410
420 If dcbias_unit = "VOLT" Or dcbias_unit = "CURR" Then
430 SCPI.Output "SEGM:" & dcbias_unit & ":OFFS:STAT ON"
440 For segm_no = 1 To no_of_segment
450 Call segm_tbl_bias(segm_no, start_f(segm_no),
stop_f(segm_no), nop(segm_no), point_avg(segm_no), osc_unit,
osc(segm_no), dcbias_unit, dcbias(segm_no), dcbias_lim(segm_no))
460 Next segm_no
470 ElseIf dcbias_unit = "OFF" Then
480 For segm_no = 1 To no_of_segment
490 Call segm_tbl(segm_no, start_f(segm_no),
stop_f(segm_no), nop(segm_no), point_avg(segm_no), osc_unit,
osc(segm_no))
500 Next segm_no
510 End If
520
530 segm_coun = SCPI.Query("SEGM:COUN?")
540 SCPI.Output "DISP:TEXT1:SET"
550 MsgBox ("Preparation of Segment Table Finished. (No. of
Segment: " & CStr(segm_coun)) & ")"
560
570 End
580
590 End Sub