Specifications

112 Chapter 7
Sorting DUTs Based on Measurement Results
Sample Program
Sample Program
Example 7-1 shows a sample program that demonstrates the use of the bin sorting function.
You can find the source file of this program, named bin_sort.bas, on the sample program
disk.
The sample program first configures the bin sorting conditions as shown in Figure 7-3 and
then performs 50 measurement cycles; each time the instrument completes one
measurement cycle, the program retrieves and displays the bin sorting results. Finally, after
the instrument has completed the last measurement cycle, the program retrieves and
displays the number of DUTs sorted into each bin.
Figure 7-3 Configuring bin sorting conditions for Example 7-1 (where frequency at point 1 is set
to 10 MHz)
The program is described in detail below:
Line 60 Sets the GPIB address.
Lines 80 to 90 Stores the highest sorting condition number into the Max_cond
variable and the highest bin number into the Max_bin variable.
Line 100 Stores the highest good bin number, which serves as the boundary
between the good and bad bins, into the Ogbin variable.
Lines 120 to 210 Stores the settings for sorting conditions 1 and 2 that apply to all bins
into the corresponding arrays: Point_no(*) contains the measurement
points; Para$(*) contains the selected measurement parameters;
Lim_mode$(*) contains the modes of boundary definition;
Nominal(*) contains the reference values.
Lines 220 to 300 Stores the bin 1 specific settings for sorting conditions 1 and 2 into the
corresponding arrays: L_lim(1,*) contains the lower limits;
U_lim(1,*) contains the upper limits; L_type$(1,*) contains the modes