Declare Sub QVBlock_Excel Declare Sub QVBlock_crFolder Declare Sub QVBlock_31 Declare Sub WkzgRPro BasicLib "C:\Wafer-Measuremachine\PCS\WerkzeugRichtprogramm.qvx"(SollAnz as Integer, DelElm as Integer) 'xxxcounting-toolxxx Declare Sub Rheihe1 Declare Sub BilderAufnehmen Declare Sub QVBlock_30 Declare Sub QVBlock_29 Declare Sub QVBlock_28 Declare Sub QVBlock_27 Declare Sub QVBlock_26 Declare Sub QVBlock_25 Declare Sub QVBlock_24 Declare Sub QVBlock_23 Declare Sub QVBlock_22 Declare Sub QVBlock_21 Declare Sub QVBlock_20 Declare Sub QVBlock_19 Declare Sub QVBlock_18 Declare Sub QVBlock_17 Declare Sub QVBlock_16 Declare Sub QVBlock_15 Declare Sub QVBlock_14 Declare Sub QVBlock_13 Declare Sub QVBlock_12 Declare Sub QVBlock_11 Declare Sub QVBlock_10 Declare Sub QVBlock_9 Declare Sub QVBlock_8 Declare Sub QVBlock_7 Declare Sub QVBlock_6 Declare Sub QVBlock_5 Declare Sub QVBlock_4 Declare Sub QVBlock_3 Declare Sub QVBlock_2 Declare Sub QVBlock_1 Dim PassRate as Double Dim PosOut as Integer Dim DiaOut as Integer Dim PosMC as Integer Dim Wname as String Dim opname as String Dim pname as String Dim bname as String Dim rname as String Dim wfname as String Dim stname as String Dim OTcount as Integer Dim OTDcount as Integer Dim OTAcount as Integer Dim OTLcount as Integer Dim OTLBLcount as Integer Dim OTLBOcount as Integer Dim Anfang Dim Messzeit Dim Zaehler10 as Integer 'xxxcounting-toolxxx Dim SollAnz as Integer Dim SchrittW as double Dim Stepp as double Dim Zaehler as Integer Dim Count as Integer Dim FehlerAnz as Integer Dim FehlerID() as Integer Dim Fehlerhochzaehlen as Integer Dim DGFehler as Integer Dim XWert as double Dim YWert as double Dim DMWert as double Dim XSoll as double Dim YSoll as double Dim XAbw as double Dim YAbw as double Dim DAbw as double Dim OBXTol as double Dim UNXTol as double Dim OBYTol as double Dim UNYTol as double Dim OBDTol as double Dim UNDTol as double Dim PassCount as double Dim MissCount as Double Dim FResult as String Dim SXDev as Double Dim SYDev as Double Dim XZero as double Dim YZero as double Dim Abw as double Dim SAbw as double Dim TCount as Integer Dim Soll as double Dim SSoll as double Dim SAngle as double Dim CXNom as double Dim CYNom as double Dim Xpc as Integer Dim Ypc as Integer Dim XYpc as Integer Dim Dpc as Integer Dim XYDpc as Integer Dim XDpc as Integer Dim YDpc as Integer Dim CRpc as Integer Dim CoA as Integer Dim LCoax as double Dim LStage as double Dim StreamCoax as double Dim StreamStage as double Dim XPOS as double Dim YPOS as double Dim S3_acq as Long Dim S3 as Long Option Explicit sub startup ' *** Restore MCS *** BreakOnErrors = FALSE PCS.RestoreMCS QV.CylUsesRefPlane = true end sub 'startup sub Main 'start of main subroutine Anfang = Time call startup SXDev = 0 SYDev = 0 LCoax=0.00 LStage=0.42 StreamCoax=0.00 StreamStage=0.55 OTcount = 0 OTDcount = 0 OTAcount = 0 OTLcount = 0 OTLBLcount = 0 OTLBOcount = 0 Call QVBlock_1 On Error Resume Next Wname=InputBox("Enter a Work Order No.:") If Wname="" then MsgBox "Did not enter the Work Order No.. Re-run program." Exit Sub Else bname=InputBox("Enter a Lot No.:") If bname="" then MsgBox "Did not enter the Lot No.. Re-run program." Exit Sub Else rname=InputBox("Enter a Run No.:") If rname="" then MsgBox "Did not enter the Run No.. Re-run program." Exit Sub Else stname=InputBox("Enter a Sonotrod No.:") If stname="" then MsgBox "Did not enter the Sonotrod No.. Re-run program." Exit Sub Else wfname=InputBox("Enter a Wafer No.:") If wfname="" then MsgBox "Did not enter the Wafer No.. Re-run program." Exit Sub Else opname=InputBox("Enter a Operator No.:") If opname="" then MsgBox "Did not enter the Operator No.. Re-run program." Exit Sub End If End If End If End If End If End If Call QVBlock_2 Call QVBlock_3 Call QVBlock_4 Call QVBlock_5 Call QVBlock_6 'Call QVBlock_8 'Call QVBlock_10 'Call QVBlock_12 'Call QVBlock_14 'Call QVBlock_15 Call QVBlock_16 Call QVBlock_17 'Call QVBlock_19 'Call QVBlock_21 'Call QVBlock_23 'Call QVBlock_25 Call QVBlock_27 Call QVBlock_30 Call QVBlock_28 Call QVBlock_29 FeatureDB.DeleteAll Count = 1 Stepp = 0.875 SchrittW = 1.75 XPOS = Stepp*-1*17 YPOS = Stepp*47 Zaehler = 18 Call BilderAufnehmen Call Rheihe1 SchrittW = SchrittW XPOS = Stepp*-1*21 YPOS = Stepp*45 Zaehler = 22 Call BilderAufnehmen Call Rheihe1 SchrittW = SchrittW XPOS = Stepp*-1*25 YPOS = Stepp*43 Zaehler = 26 Call BilderAufnehmen Call Rheihe1 SchrittW = SchrittW XPOS = Stepp*-1*27 YPOS = Stepp*41 Zaehler = 28 Call BilderAufnehmen Call Rheihe1 SchrittW = SchrittW XPOS = Stepp*-1*31 YPOS = Stepp*39 Zaehler = 32 Call BilderAufnehmen Call Rheihe1 SchrittW = SchrittW XPOS = Stepp*-1*33 YPOS = Stepp*37 Zaehler = 34 Call BilderAufnehmen Call Rheihe1 SchrittW = SchrittW XPOS = Stepp*-1*35 YPOS = Stepp*35 Zaehler = 36 Call BilderAufnehmen Call Rheihe1 SchrittW = SchrittW XPOS = Stepp*-1*37 YPOS = Stepp*33 Zaehler = 38 Call BilderAufnehmen Call Rheihe1 SchrittW = SchrittW XPOS = Stepp*-1*39 YPOS = Stepp*31 Zaehler = 40 Call BilderAufnehmen Call Rheihe1 SchrittW = SchrittW XPOS = Stepp*-1*39 YPOS = Stepp*29 Zaehler = 40 Call BilderAufnehmen Call Rheihe1 SchrittW = SchrittW XPOS = Stepp*-1*41 YPOS = Stepp*27 Zaehler = 42 Call BilderAufnehmen Call Rheihe1 SchrittW = SchrittW XPOS = Stepp*-1*43 YPOS = Stepp*25 Zaehler = 44 Call BilderAufnehmen Call Rheihe1 SchrittW = SchrittW XPOS = Stepp*-1*43 YPOS = Stepp*23 Zaehler = 44 Call BilderAufnehmen Call Rheihe1 SchrittW = SchrittW XPOS = Stepp*-1*45 YPOS = Stepp*21 Zaehler = 46 Call BilderAufnehmen Call Rheihe1 SchrittW = SchrittW XPOS = Stepp*-1*45 YPOS = Stepp*19 Zaehler = 46 Call BilderAufnehmen Call Rheihe1 SchrittW = SchrittW XPOS = Stepp*-1*47 YPOS = Stepp*17 Zaehler = 48 Call BilderAufnehmen Call Rheihe1 SchrittW = SchrittW XPOS = Stepp*-1*47 YPOS = Stepp*15 Zaehler = 48 Call BilderAufnehmen Call Rheihe1 SchrittW = SchrittW XPOS = Stepp*-1*47 YPOS = Stepp*13 Zaehler = 48 Call BilderAufnehmen Call Rheihe1 SchrittW = SchrittW XPOS = Stepp*-1*47 YPOS = Stepp*11 Zaehler = 48 Call BilderAufnehmen Call Rheihe1 SchrittW = SchrittW XPOS = Stepp*-1*49 YPOS = Stepp*9 Zaehler = 50 Call BilderAufnehmen Call Rheihe1 SchrittW = SchrittW XPOS = Stepp*-1*49 YPOS = Stepp*7 Zaehler = 50 Call BilderAufnehmen Call Rheihe1 SchrittW = SchrittW XPOS = Stepp*-1*49 YPOS = Stepp*5 Zaehler = 50 Call BilderAufnehmen Call Rheihe1 SchrittW = SchrittW XPOS = Stepp*-1*49 YPOS = Stepp*3 Zaehler = 50 Call BilderAufnehmen Call Rheihe1 SchrittW = SchrittW XPOS = Stepp*-1*49 YPOS = Stepp*1 Zaehler = 50 Call BilderAufnehmen Call Rheihe1 SchrittW = SchrittW XPOS = Stepp*-1*49 YPOS = Stepp*-1 Zaehler = 50 Call BilderAufnehmen Call Rheihe1 SchrittW = SchrittW XPOS = Stepp*-1*49 YPOS = Stepp*-3 Zaehler = 50 Call BilderAufnehmen Call Rheihe1 SchrittW = SchrittW XPOS = Stepp*-1*49 YPOS = Stepp*-5 Zaehler = 50 Call BilderAufnehmen Call Rheihe1 SchrittW = SchrittW XPOS = Stepp*-1*49 YPOS = Stepp*-7 Zaehler = 50 Call BilderAufnehmen Call Rheihe1 SchrittW = SchrittW XPOS = Stepp*-1*49 YPOS = Stepp*-9 Zaehler = 50 Call BilderAufnehmen Call Rheihe1 SchrittW = SchrittW XPOS = Stepp*-1*47 YPOS = Stepp*-11 Zaehler = 48 Call BilderAufnehmen Call Rheihe1 SchrittW = SchrittW XPOS = Stepp*-1*47 YPOS = Stepp*-13 Zaehler = 48 Call BilderAufnehmen Call Rheihe1 SchrittW = SchrittW XPOS = Stepp*-1*47 YPOS = Stepp*-15 Zaehler = 48 Call BilderAufnehmen Call Rheihe1 SchrittW = SchrittW XPOS = Stepp*-1*47 YPOS = Stepp*-17 Zaehler = 48 Call BilderAufnehmen Call Rheihe1 SchrittW = SchrittW XPOS = Stepp*-1*45 YPOS = Stepp*-19 Zaehler = 46 Call BilderAufnehmen Call Rheihe1 SchrittW = SchrittW XPOS = Stepp*-1*45 YPOS = Stepp*-21 Zaehler = 46 Call BilderAufnehmen Call Rheihe1 SchrittW = SchrittW XPOS = Stepp*-1*43 YPOS = Stepp*-23 Zaehler = 44 Call BilderAufnehmen Call Rheihe1 SchrittW = SchrittW XPOS = Stepp*-1*43 YPOS = Stepp*-25 Zaehler = 44 Call BilderAufnehmen Call Rheihe1 SchrittW = SchrittW XPOS = Stepp*-1*41 YPOS = Stepp*-27 Zaehler = 42 Call BilderAufnehmen Call Rheihe1 SchrittW = SchrittW XPOS = Stepp*-1*39 YPOS = Stepp*-29 Zaehler = 40 Call BilderAufnehmen Call Rheihe1 SchrittW = SchrittW XPOS = Stepp*-1*39 YPOS = Stepp*-31 Zaehler = 40 Call BilderAufnehmen Call Rheihe1 SchrittW = SchrittW XPOS = Stepp*-1*37 YPOS = Stepp*-33 Zaehler = 38 Call BilderAufnehmen Call Rheihe1 SchrittW = SchrittW XPOS = Stepp*-1*35 YPOS = Stepp*-35 Zaehler = 36 Call BilderAufnehmen Call Rheihe1 SchrittW = SchrittW XPOS = Stepp*-1*33 YPOS = Stepp*-37 Zaehler = 34 Call BilderAufnehmen Call Rheihe1 SchrittW = SchrittW XPOS = Stepp*-1*31 YPOS = Stepp*-39 Zaehler = 32 Call BilderAufnehmen Call Rheihe1 SchrittW = SchrittW XPOS = Stepp*-1*27 YPOS = Stepp*-41 Zaehler = 28 Call BilderAufnehmen Call Rheihe1 SchrittW = SchrittW XPOS = Stepp*-1*25 YPOS = Stepp*-43 Zaehler = 26 Call BilderAufnehmen Call Rheihe1 SchrittW = SchrittW XPOS = Stepp*-1*21 YPOS = Stepp*-45 Zaehler = 22 Call BilderAufnehmen Call Rheihe1 SchrittW = SchrittW XPOS = Stepp*-1*17 YPOS = Stepp*-47 Zaehler = 18 Call BilderAufnehmen Call Rheihe1 SchrittW = SchrittW XPOS = Stepp*-1*9 YPOS = Stepp*-49 Zaehler = 10 Call BilderAufnehmen Call Rheihe1 Call QVBlock_31 pname="FR" Call QVBlock_crFolder 'Call QVBlock_Excel 'Messzeit = Time - Anfang 'Print "Messzeit:=" & Messzeit Video.ChangeToImageContext Coax:=LCoax, Stage:=LStage, Back:=0.00, Front:=0.00, Right:=0.00, Left:=0.00, Angle:=0.00, Color:= qvWhite Call WkzgRPro(1966, Zaehler10)'xxxcounting-toolxxx end sub 'Main Private Sub QVBlock_1 PCS.Import "C:\Wafer-Measuremachine\PCS\BG08R32B_WAFER.pcs" TolDB.CreateUpLoTol Up:=0.5000000, Lo:=-0.5000000, Label:="T1" TolDB.CreateUpLoTol Up:=0.5000000, Lo:=-0.5000000, Label:="T2" 'Outer Diameter TolDB.CreateUpLoTol Up:=2.50000000, Lo:=-2.50000000, Label:="T3" 'Flat line spec TolDB.CreateUpLoTol Up:=0.051000000, Lo:=-0.051000000, Label:="T4" 'X- and Y-position of holes TolDB.CreateUpLoTol Up:=0.05100000, Lo:=-0.05100000, Label:="T5" 'Diameter of holes TolDB.CreateUpLoTol Up:=0.400000, Lo:=-0.400000, Label:="T6" 'Position hole-matrix to outer diameter TolDB.CreateFormTol Zone:=0.050000000, Label:="T7" 'Circularity TolDB.CreateAngleUpLoTol Up:=1.0000000, Lo:=-1.0000000, Label:="TA" 'Angle End Sub 'QVBlock_1 Private Sub QVBlock_2 Measure.Point Label:="", ProjPlane:=NO_PLANE Video.ChangeToImageContext X:=0.000000068, Y:=0.000159693, Z:=0.000600000, Coax:=LCoax, Stage:=LStage, Back:=0.00, Front:=0.00, Right:=0.00, Left:=0.00, Angle:=0.00, Color:= qvWhite, NomMag:=2.000000 ManualTool.Run X:=0.0001941, Y:=0.0000597, Z:=0.0005000, Prompt:="Click into 5th left alignment hole!" Measure.EndMeas PCS.AlignOrigin Axes:=ALL_AXES, Tag:=0 End Sub 'QVBlock_2 Private Sub QVBlock_3 Measure.Circle Label:="", ProjPlane:=NO_PLANE Video.ChangeToImageContext X:=0.000002875, Y:=0.000197083, Z:=0.000500000, Coax:=LCoax, Stage:=LStage, Back:=0.00, Front:=0.00, Right:=0.00, Left:=0.00, Angle:=0.00, Color:= qvWhite FocusTool.SetMode FocusType:=SURFACE_ROTATE, Speed:=SLOW, Range:=1.412329638, Target:=FOCUS_MAX FocusTool.Run X:=0.000002875, Y:=0.000197083, Z:=0.0007000, W:=0.9756173, H:=0.9158472 CircleTool.ScanInt = 2 CircleTool.SamplingDirection = CW CircleTool.SetFilter Alg:=DYNAMIC_THRESH, EdgeSlope:=FALLING, EdgeQuality:=STRONG, Outlier:=0.000000, TH:=185, THR:=0.43, THS:=65 CircleTool.Run X:=-0.009751337, Y:=0.000342810, Z:=0.000900000, R1:=0.019910557, R2:=0.842372890 Measure.EndMeas PCS.AlignOrigin Axes:=ALL_AXES, Tag:=0 End Sub 'QVBlock_3 Private Sub QVBlock_4 Measure.Point Label:="", ProjPlane:=NO_PLANE Video.ChangeToImageContext X:=85.7500000, Y:=0.000000000, Z:=0.000000000 ManualTool.Run X:=85.7500000, Y:=0.000000000, Z:=0.000000000, Prompt:="Click into the 5th right alignment hole!" Measure.EndMeas PCS.AlignAxis AlignmentAxis:=X_AXIS, RotationAxis:=Z_AXIS, Offset:=0.0000000, Direction:=POS, Tag:=0 End Sub 'QVBlock_4 Private Sub QVBlock_5 Measure.Circle Label:="", ProjPlane:=NO_PLANE Video.ChangeToImageContext X:=85.7500000, Y:=0.000000000, Z:=0.000000000, Coax:=LCoax, Stage:=LStage, Back:=0.00, Front:=0.00, Right:=0.00, Left:=0.00, Angle:=0.00, Color:= qvWhite CircleTool.ScanInt = 2 CircleTool.SamplingDirection = CW CircleTool.SetFilter Alg:=DYNAMIC_THRESH, EdgeSlope:=FALLING, EdgeQuality:=STRONG, Outlier:=0.000000, TH:=185, THR:=0.43, THS:=65 CircleTool.Run X:=85.7500000, Y:=0.000000000, Z:=0.000000000, R1:=0.019910557, R2:=0.842372890 Measure.EndMeas PCS.AlignAxis AlignmentAxis:=X_AXIS, RotationAxis:=Z_AXIS, Offset:=0.0000000, Direction:=POS, Tag:=0 PCS.Export "C:\Wafer-Measuremachine\PCS\BG08R32B_WAFER.pcs" End Sub 'QVBlock_5 Private Sub QVBlock_6 ' open a cartesian step loop to step between features (ie within a PCS) Dim s6 as Long StepLoop.OpenCart DX:=-10.50000, DY:=0.0000000, DZ:=0.0000000, BetweenParts:=false For s6 = 1 to 8 Call QVBlock_7 StepLoop.Next Next s6 StepLoop.Close End Sub 'QVBlock_6 Private Sub QVBlock_7 Measure.Circle Label:=StepLoop.AutoLabel("xa_") Lens.NomMag = 2.000000 Stage.MoveTo X:=80.5, Y:=-0.0000263, Z:=0.0004000 Light.SetAll Coax:=LCoax, Stage:=LStage, Ring:=0.00 CircleTool.ScanInt = 5 CircleTool.SetFilter Alg:=DYNAMIC_THRESH, EdgeSlope:=FALLING, EdgeQuality:=STRONG, Outlier:=3, TH:=185, THR:=0.43, THS:=65 CircleTool.Run X:=80.5, Y:=0.0045390, Z:=0.0005999, R1:=0.0197490, R2:=0.8021139 Measure.EndMeas End Sub 'QVBlock_7 Private Sub QVBlock_8 ' open a cartesian step loop to step between features (ie within a PCS) Dim s8 as Long StepLoop.OpenCart DX:=-10.50000, DY:=0.0000000, DZ:=0.0000000, BetweenParts:=false For s8 = 1 to 8 Call QVBlock_9 StepLoop.Next Next s8 StepLoop.Close End Sub 'QVBlock_8 Private Sub QVBlock_9 Measure.Circle Label:=StepLoop.AutoLabel("xb_") Lens.NomMag = 2.000000 Stage.MoveTo X:=80.5, Y:=3.5000063, Z:=0.0004000 Light.SetAll Coax:=LCoax, Stage:=LStage, Ring:=0.00 CircleTool.ScanInt = 5 CircleTool.SetFilter Alg:=DYNAMIC_THRESH, EdgeSlope:=FALLING, EdgeQuality:=STRONG, Outlier:=3, TH:=185, THR:=0.43, THS:=65 CircleTool.Run X:=80.5, Y:=3.5000063, Z:=0.0005999, R1:=0.0197490, R2:=0.8021139 Measure.EndMeas End Sub 'QVBlock_9 Private Sub QVBlock_10 ' open a cartesian step loop to step between features (ie within a PCS) Dim s10 as Long StepLoop.OpenCart DX:=-10.50000, DY:=0.0000000, DZ:=0.0000000, BetweenParts:=false For s10 = 1 to 8 Call QVBlock_11 StepLoop.Next Next s10 StepLoop.Close End Sub 'QVBlock_10 Private Sub QVBlock_11 Measure.Circle Label:=StepLoop.AutoLabel("xc_") Lens.NomMag = 2.000000 Stage.MoveTo X:=80.5, Y:=7.0000063, Z:=0.0004000 Light.SetAll Coax:=LCoax, Stage:=LStage, Ring:=0.00 CircleTool.ScanInt = 5 CircleTool.SetFilter Alg:=DYNAMIC_THRESH, EdgeSlope:=FALLING, EdgeQuality:=STRONG, Outlier:=3, TH:=185, THR:=0.43, THS:=65 CircleTool.Run X:=80.5, Y:=7.0000063, Z:=0.0005999, R1:=0.0197490, R2:=0.8021139 Measure.EndMeas End Sub 'QVBlock_11 Private Sub QVBlock_12 ' open a cartesian step loop to step between features (ie within a PCS) Dim s12 as Long StepLoop.OpenCart DX:=-10.50000, DY:=0.0000000, DZ:=0.0000000, BetweenParts:=false For s12 = 1 to 8 Call QVBlock_13 StepLoop.Next Next s12 StepLoop.Close End Sub 'QVBlock_12 Private Sub QVBlock_13 Measure.Circle Label:=StepLoop.AutoLabel("xd_") Lens.NomMag = 2.000000 Stage.MoveTo X:=80.5, Y:=-7.0000063, Z:=0.0004000 Light.SetAll Coax:=LCoax, Stage:=LStage, Ring:=0.00 CircleTool.ScanInt = 5 CircleTool.SetFilter Alg:=DYNAMIC_THRESH, EdgeSlope:=FALLING, EdgeQuality:=STRONG, Outlier:=3, TH:=185, THR:=0.43, THS:=65 CircleTool.Run X:=80.5, Y:=-7.0000063, Z:=0.0005999, R1:=0.0197490, R2:=0.8021139 Measure.EndMeas End Sub 'QVBlock_13 Private Sub QVBlock_14 ' open a cartesian step loop to step between features (ie within a PCS) Dim s14 as Long StepLoop.OpenCart DX:=-10.50000, DY:=0.0000000, DZ:=0.0000000, BetweenParts:=false For s14 = 1 to 8 Call QVBlock_15 StepLoop.Next Next s14 StepLoop.Close End Sub 'QVBlock_14 Private Sub QVBlock_15 Measure.Circle Label:=StepLoop.AutoLabel("xe_") Lens.NomMag = 2.000000 Stage.MoveTo X:=80.5, Y:=-3.5000063, Z:=0.0004000 Light.SetAll Coax:=LCoax, Stage:=LStage, Ring:=0.00 CircleTool.ScanInt = 5 CircleTool.SetFilter Alg:=DYNAMIC_THRESH, EdgeSlope:=FALLING, EdgeQuality:=STRONG, Outlier:=3, TH:=185, THR:=0.43, THS:=65 CircleTool.Run X:=80.5, Y:=-3.5000063, Z:=0.0005999, R1:=0.0197490, R2:=0.8021139 Measure.EndMeas End Sub 'QVBlock_15 Private Sub QVBlock_16 Measure.Line Label:="XAchse" 'Measure.RecallFeature Tag:="xe__8" 'Measure.RecallFeature Tag:="xe__7" 'Measure.RecallFeature Tag:="xe__6" 'Measure.RecallFeature Tag:="xe__5" 'Measure.RecallFeature Tag:="xe__4" 'Measure.RecallFeature Tag:="xe__3" 'Measure.RecallFeature Tag:="xe__2" 'Measure.RecallFeature Tag:="xe__1" 'Measure.RecallFeature Tag:="xd__8" 'Measure.RecallFeature Tag:="xd__7" 'Measure.RecallFeature Tag:="xd__6" 'Measure.RecallFeature Tag:="xd__5" 'Measure.RecallFeature Tag:="xd__4" 'Measure.RecallFeature Tag:="xd__3" 'Measure.RecallFeature Tag:="xd__2" 'Measure.RecallFeature Tag:="xd__1" 'Measure.RecallFeature Tag:="xc__8" 'Measure.RecallFeature Tag:="xc__7" 'Measure.RecallFeature Tag:="xc__6" 'Measure.RecallFeature Tag:="xc__5" 'Measure.RecallFeature Tag:="xc__4" 'Measure.RecallFeature Tag:="xc__3" 'Measure.RecallFeature Tag:="xc__2" 'Measure.RecallFeature Tag:="xc__1" 'Measure.RecallFeature Tag:="xb__8" 'Measure.RecallFeature Tag:="xb__7" 'Measure.RecallFeature Tag:="xb__6" 'Measure.RecallFeature Tag:="xb__5" 'Measure.RecallFeature Tag:="xb__4" 'Measure.RecallFeature Tag:="xb__3" 'Measure.RecallFeature Tag:="xb__2" 'Measure.RecallFeature Tag:="xb__1" Measure.RecallFeature Tag:="xa__8" Measure.RecallFeature Tag:="xa__7" Measure.RecallFeature Tag:="xa__6" Measure.RecallFeature Tag:="xa__5" Measure.RecallFeature Tag:="xa__4" Measure.RecallFeature Tag:="xa__3" Measure.RecallFeature Tag:="xa__2" Measure.RecallFeature Tag:="xa__1" Measure.EndMeas Results.ReportFeature Show:=ST_, Tag:="XAchse" PCS.AlignAxis AlignmentAxis:=X_AXIS, RotationAxis:=Z_AXIS, Offset:=0.0000000, Direction:=POS, Tag:="XAchse" End Sub 'QVBlock_16 Private Sub QVBlock_17 ' open a cartesian step loop to step between features (ie within a PCS) Dim s17 as Long StepLoop.OpenCart DX:=0.0000000, DY:=10.5000000, DZ:=0.0000000, BetweenParts:=false For s17 = 1 to 9 Call QVBlock_18 StepLoop.Next Next s17 StepLoop.Close End Sub 'QVBlock_17 Private Sub QVBlock_18 Measure.Circle Label:=StepLoop.AutoLabel("ya_") Lens.NomMag = 2.000000 Stage.MoveTo X:=41.9878896, Y:=-43.75, Z:=0.0005999 Light.SetAll Coax:=LCoax, Stage:=LStage, Ring:=0.00 CircleTool.ScanInt = 5 CircleTool.SetFilter Alg:=DYNAMIC_THRESH, EdgeSlope:=FALLING, EdgeQuality:=STRONG, Outlier:=3, TH:=185, THR:=0.43, THS:=65 CircleTool.Run X:=42.0080533, Y:=-43.75, Z:=0.0006999, R1:=0.0197490, R2:=0.9922892 Measure.EndMeas End Sub 'QVBlock_18 Private Sub QVBlock_19 ' open a cartesian step loop to step between features (ie within a PCS) Dim s19 as Long StepLoop.OpenCart DX:=0.0000000, DY:=10.5000000, DZ:=0.0000000, BetweenParts:=false For s19 = 1 to 9 Call QVBlock_20 StepLoop.Next Next s19 StepLoop.Close End Sub 'QVBlock_19 Private Sub QVBlock_20 Measure.Circle Label:=StepLoop.AutoLabel("yb_") Lens.NomMag = 2.000000 Stage.MoveTo X:=45.5000096, Y:=-43.75, Z:=0.0005999 Light.SetAll Coax:=LCoax, Stage:=LStage, Ring:=0.00 CircleTool.ScanInt = 5 CircleTool.SetFilter Alg:=DYNAMIC_THRESH, EdgeSlope:=FALLING, EdgeQuality:=STRONG, Outlier:=3, TH:=185, THR:=0.43, THS:=65 CircleTool.Run X:=45.5000033, Y:=-43.75, Z:=0.0006999, R1:=0.0197490, R2:=0.9922892 Measure.EndMeas End Sub 'QVBlock_20 Private Sub QVBlock_21 ' open a cartesian step loop to step between features (ie within a PCS) Dim s21 as Long StepLoop.OpenCart DX:=0.0000000, DY:=10.5000000, DZ:=0.0000000, BetweenParts:=false For s21 = 1 to 9 Call QVBlock_22 StepLoop.Next Next s21 StepLoop.Close End Sub 'QVBlock_21 Private Sub QVBlock_22 Measure.Circle Label:=StepLoop.AutoLabel("yc_") Lens.NomMag = 2.000000 Stage.MoveTo X:=49.0000096, Y:=-43.75, Z:=0.0005999 Light.SetAll Coax:=LCoax, Stage:=LStage, Ring:=0.00 CircleTool.ScanInt = 5 CircleTool.SetFilter Alg:=DYNAMIC_THRESH, EdgeSlope:=FALLING, EdgeQuality:=STRONG, Outlier:=3, TH:=185, THR:=0.43, THS:=65 CircleTool.Run X:=49.0000033, Y:=-43.75, Z:=0.0006999, R1:=0.0197490, R2:=0.9922892 Measure.EndMeas End Sub 'QVBlock_22 Private Sub QVBlock_23 ' open a cartesian step loop to step between features (ie within a PCS) Dim s23 as Long StepLoop.OpenCart DX:=0.0000000, DY:=10.5000000, DZ:=0.0000000, BetweenParts:=false For s23 = 1 to 9 Call QVBlock_24 StepLoop.Next Next s23 StepLoop.Close End Sub 'QVBlock_23 Private Sub QVBlock_24 Measure.Circle Label:=StepLoop.AutoLabel("yd_") Lens.NomMag = 2.000000 Stage.MoveTo X:=38.5000096, Y:=-43.75, Z:=0.0005999 Light.SetAll Coax:=LCoax, Stage:=LStage, Ring:=0.00 CircleTool.ScanInt = 5 CircleTool.SetFilter Alg:=DYNAMIC_THRESH, EdgeSlope:=FALLING, EdgeQuality:=STRONG, Outlier:=3, TH:=185, THR:=0.43, THS:=65 CircleTool.Run X:=38.5000033, Y:=-43.75, Z:=0.0006999, R1:=0.0197490, R2:=0.9922892 Measure.EndMeas End Sub 'QVBlock_24 Private Sub QVBlock_25 ' open a cartesian step loop to step between features (ie within a PCS) Dim s25 as Long StepLoop.OpenCart DX:=0.0000000, DY:=10.5000000, DZ:=0.0000000, BetweenParts:=false For s25 = 1 to 9 Call QVBlock_26 StepLoop.Next Next s25 StepLoop.Close End Sub 'QVBlock_25 Private Sub QVBlock_26 Measure.Circle Label:=StepLoop.AutoLabel("ye_") Lens.NomMag = 2.000000 Stage.MoveTo X:=35.0000096, Y:=-43.75, Z:=0.0005999 Light.SetAll Coax:=LCoax, Stage:=LStage, Ring:=0.00 CircleTool.ScanInt = 5 CircleTool.SetFilter Alg:=DYNAMIC_THRESH, EdgeSlope:=FALLING, EdgeQuality:=STRONG, Outlier:=3, TH:=185, THR:=0.43, THS:=65 CircleTool.Run X:=35.0000033, Y:=-43.75, Z:=0.0006999, R1:=0.0197490, R2:=0.9922892 Measure.EndMeas End Sub 'QVBlock_26 Private Sub QVBlock_27 Measure.Line Label:="YAchse" Measure.RecallFeature Tag:="ya__1" Measure.RecallFeature Tag:="ya__2" Measure.RecallFeature Tag:="ya__3" Measure.RecallFeature Tag:="ya__4" Measure.RecallFeature Tag:="ya__5" Measure.RecallFeature Tag:="ya__6" Measure.RecallFeature Tag:="ya__7" Measure.RecallFeature Tag:="ya__8" Measure.RecallFeature Tag:="ya__9" 'Measure.RecallFeature Tag:="yb__1" 'Measure.RecallFeature Tag:="yb__2" 'Measure.RecallFeature Tag:="yb__3" 'Measure.RecallFeature Tag:="yb__4" 'Measure.RecallFeature Tag:="yb__5" 'Measure.RecallFeature Tag:="yb__6" 'Measure.RecallFeature Tag:="yb__7" 'Measure.RecallFeature Tag:="yb__8" 'Measure.RecallFeature Tag:="yb__9" 'Measure.RecallFeature Tag:="yc__1" 'Measure.RecallFeature Tag:="yc__2" 'Measure.RecallFeature Tag:="yc__3" 'Measure.RecallFeature Tag:="yc__4" 'Measure.RecallFeature Tag:="yc__5" 'Measure.RecallFeature Tag:="yc__6" 'Measure.RecallFeature Tag:="yc__7" 'Measure.RecallFeature Tag:="yc__8" 'Measure.RecallFeature Tag:="yc__9" 'Measure.RecallFeature Tag:="yd__1" 'Measure.RecallFeature Tag:="yd__2" 'Measure.RecallFeature Tag:="yd__3" 'Measure.RecallFeature Tag:="yd__4" 'Measure.RecallFeature Tag:="yd__5" 'Measure.RecallFeature Tag:="yd__6" 'Measure.RecallFeature Tag:="yd__7" 'Measure.RecallFeature Tag:="yd__8" 'Measure.RecallFeature Tag:="yd__9" 'Measure.RecallFeature Tag:="ye__1" 'Measure.RecallFeature Tag:="ye__2" 'Measure.RecallFeature Tag:="ye__3" 'Measure.RecallFeature Tag:="ye__4" 'Measure.RecallFeature Tag:="ye__5" 'Measure.RecallFeature Tag:="ye__6" 'Measure.RecallFeature Tag:="ye__7" 'Measure.RecallFeature Tag:="ye__8" 'Measure.RecallFeature Tag:="ye__9" Measure.EndMeas Results.ReportFeature Show:=ST_, Tag:="YAchse" Construct.IntersectPoint Tag1:="YAchse", Tag2:="XAchse", Label:="NP", ProjPlane:=XY_PLANE, PreferredPoint := 1 Construct.Angle Tag1:="YAchse", Tag2:="XAchse", Label:="Winkel_X_zu_Y_Achse", ProjPlane:=XY_PLANE Results.ReportFeature Show:=CA_, Tag:="Winkel_X_zu_Y_Achse" PCS.AlignOrigin Axes:=ALL_AXES, Tag:="NP" PCS.Export "C:\Wafer-Measuremachine\PCS\BG08R32A_WAFER_NP.pcs" End Sub 'QVBlock_27 Private Sub QVBlock_28 Measure.Circle Label:="Diameter", ProjPlane:=NO_PLANE Video.ChangeToImageContext X:=-29.150945, Y:=41.1315615, Z:=-0.5501986, Coax:=LCoax, Stage:=LStage, Back:=0.00, Front:=0.00, Right:=0.00, Left:=0.00, Angle:=0.00, Color:= qvWhite, NomMag:=2.000000 FocusTool.SetMode FocusType:=EDGE0, Speed:=MED, Range:=3.2943464 FocusTool.EdgeSlope = BOTH FocusTool.Focus X:=-29.4072776, Y:=41.0555321, Z:=-0.5501986, W:=1.1370842, H:=0.6087693 BoxTool.Mode = NORMAL BoxTool.ScanInt = 5 BoxTool.SamplingDirection = DIR_RIGHT BoxTool.SetFilter Alg:=DYNAMIC_THRESH, EdgeSlope:=FALLING, EdgeQuality:=STRONG, Outlier:=0, TH:=167.230769, THR:=0.480655, THS:=70.000000 BoxTool.Run X:=-29.1158139, Y:=41.1718878, Z:=-0.5497986, W:=1.0565827, H:=2.3646410, Angle:=-54.5263 Video.ChangeToImageContext X:=-48.6686585, Y:=-12.4777679, Z:=-0.5497986 BoxTool.Mode = NORMAL BoxTool.ScanInt = 5 BoxTool.SamplingDirection = DIR_RIGHT BoxTool.SetFilter Alg:=DYNAMIC_THRESH, EdgeSlope:=FALLING, EdgeQuality:=STRONG, Outlier:=0, TH:=173.772080, THR:=0.548734, THS:=85.000000 BoxTool.Run X:=-48.6786771, Y:=-12.4979145, Z:=-0.5497986, W:=1.1974603, H:=2.0577408, Angle:=17.1929 Video.ChangeToImageContext X:=-9.1717712, Y:=-49.0356994, Z:=-0.5497986 BoxTool.Mode = NORMAL BoxTool.ScanInt = 5 BoxTool.SamplingDirection = DIR_RIGHT BoxTool.SetFilter Alg:=DYNAMIC_THRESH, EdgeSlope:=FALLING, EdgeQuality:=STRONG, Outlier:=0, TH:=151.800000, THR:=0.426667, THS:=77.000000 BoxTool.Run X:=-9.181878, Y:=-49.0155969, Z:=-0.5497986, W:=1.1873977, H:=2.1935818, Angle:=79.3866 Video.ChangeToImageContext X:=35.4051339, Y:=-34.9353321, Z:=-0.5497986 BoxTool.Mode = NORMAL BoxTool.ScanInt = 5 BoxTool.SamplingDirection = DIR_RIGHT BoxTool.SetFilter Alg:=DYNAMIC_THRESH, EdgeSlope:=FALLING, EdgeQuality:=STRONG, Outlier:=0, TH:=166.036145, THR:=0.476683, THS:=61.500000 BoxTool.Run X:=35.3598956, Y:=-34.9553559, Z:=-0.5497986, W:=1.0062692, H:=2.3143295, Angle:=135.5262 Video.ChangeToImageContext X:=46.8732959, Y:=17.2638624, Z:=-0.5497986 BoxTool.Mode = NORMAL BoxTool.ScanInt = 5 BoxTool.SamplingDirection = DIR_RIGHT BoxTool.SetFilter Alg:=DYNAMIC_THRESH, EdgeSlope:=FALLING, EdgeQuality:=STRONG, Outlier:=0, TH:=155.617564, THR:=0.450926, THS:=73.000000 BoxTool.Run X:=46.8429866, Y:=17.3191388, Z:=-0.5497986, W:=1.1974603, H:=1.9319620, Angle:=-160.3814 Measure.EndMeas FeatureDB(0).SetCircleNoms D:=100.00, X:=0.00, Y:=0.00 FeatureDB(0).D.SetTol Tag:="T2" FeatureDB(0).X.SetTol Tag:="T6" FeatureDB(0).Y.SetTol Tag:="T6" Results.ReportFeature Show:=X_ and Y_ and Z_ and D_, StatFlags:=X_ and Y_ and Z_ and D_, Tag:="Diameter" If FeatureDB("Diameter").X.Deviation > TolDB.Item(FeatureDB("Diameter").X.TOLID).Up or FeatureDB("Diameter").X.Deviation < TolDB.Item(FeatureDB("Diameter").X.TOLID).Lo then OTcount = OTcount + 1 End If If FeatureDB("Diameter").Y.Deviation > TolDB.Item(FeatureDB("Diameter").Y.TOLID).Up or FeatureDB("Diameter").Y.Deviation < TolDB.Item(FeatureDB("Diameter").Y.TOLID).Lo then OTcount = OTcount + 1 End If If FeatureDB("Diameter").D.Deviation > TolDB.Item(FeatureDB("Diameter").D.TOLID).Up or FeatureDB("Diameter").D.Deviation < TolDB.Item(FeatureDB("Diameter").D.TOLID).Lo then OTDcount = OTDcount + 1 End If End Sub 'QVBlock_28 Private Sub QVBlock_29 Measure.Line Label:="Flat_Line" Video.ChangeToImageContext X:=-1.220850902, Y:=48.43920961, Z:=-0.549800817 BoxTool.Mode = NORMAL BoxTool.ScanInt = 2 BoxTool.SamplingDirection = DIR_RIGHT BoxTool.SetFilter Alg:=STATIC_THRESH, EdgeSlope:=FALLING, EdgeQuality:=STRONG, Outlier:=1, TH:=185, THR:=0.43, THS:=65 BoxTool.Run X:=-1.220835941, Y:=48.39388443, Z:=-0.549800817, W:=1.729373820, H:=2.177052282, Angle:=-76.020429699 Video.ChangeToImageContext X:=-6.402009809, Y:=47.46903384, Z:=-0.549800817 BoxTool.Mode = NORMAL BoxTool.ScanInt = 2 BoxTool.SamplingDirection = DIR_RIGHT BoxTool.SetFilter Alg:=STATIC_THRESH, EdgeSlope:=FALLING, EdgeQuality:=STRONG, Outlier:=1, TH:=185, THR:=0.43, THS:=65 BoxTool.Run X:=-6.38202787, Y:=47.48393962, Z:=-0.549800817, W:=1.749251680, H:=2.520012573, Angle:=-76.257187771 Video.ChangeToImageContext X:=-19.74186769, Y:=44.49097109, Z:=-0.549900817 BoxTool.Mode = NORMAL BoxTool.ScanInt = 2 BoxTool.SamplingDirection = DIR_RIGHT BoxTool.SetFilter Alg:=STATIC_THRESH, EdgeSlope:=FALLING, EdgeQuality:=STRONG, Outlier:=1, TH:=185, THR:=0.43, THS:=65 BoxTool.Run X:=-19.72198575, Y:=44.49587697, Z:=-0.549800817, W:=1.977847070, H:=2.341076769, Angle:=-76.717424264 Measure.EndMeas FeatureDB(0).SetLineNoms X:=0.000000000, Y:=0.000000000, Z:=0.000000000, AR:=-14.000000000, AH:=90.000000000 FeatureDB(0).YA.SetTol Tag:="TA" Results.ReportFeature Show:=YA_, Tag:="Flat_Line" If FeatureDB("Flat_Line").YA.Deviation > TolDB.Item(FeatureDB("Flat_Line").YA.TOLID).Up or FeatureDB("Flat_Line").YA.Deviation < TolDB.Item(FeatureDB("Flat_Line").YA.TOLID).Lo then OTAcount = OTAcount + 1 End If Construct.IntersectPoint Tag1:="Diameter", Tag2:="Flat_Line", Label:="Point_1", ProjPlane:=XY_PLANE, PreferredPoint := 1 Construct.IntersectPoint Tag1:="Flat_Line", Tag2:="Diameter", Label:="Point_2", ProjPlane:=XY_PLANE, PreferredPoint := 2 Construct.Distance Tag1:="Point_2", Tag2:="Point_1", Label:="Flat_Length", ProjPlane:=NO_PLANE FeatureDB(0).SetDistNoms SC:=0.0000000, SS:=0.0000000, SL:=0.0000000, _ LC:=32.5000000, LS:=0.0000000, LL:=0.0000000, _ DX:=0.0000000, DY:=0.0000000, DZ:=0.0000000 FeatureDB(0).LC.SetTol Tag:="T3" Results.ReportFeature Show:=LC_, StatFlags:=LC_, Tag:="Flat_Length" If FeatureDB("Flat_Length").LC.Deviation > TolDB.Item(FeatureDB("Flat_Length").LC.TOLID).Up or FeatureDB("Flat_Length").LC.Deviation < TolDB.Item(FeatureDB("Flat_Length").LC.TOLID).Lo then OTLcount = OTLcount + 1 End If End Sub 'QVBlock_29 Private Sub QVBlock_30 Measure.Point Label:="Offset_Point" Measure.KeyinDataPoint X:=0.875, Y:=-0.875, Z:=0.0000000 Measure.EndMeas PCS.AlignOrigin Axes:=ALL_AXES, Tag:="Offset_Point" End Sub 'QVBlock_30 Private Sub BilderAufnehmen Stage.MoveTo X:=XPOS, Y:=YPOS, Z:=0.0000 Lens.NomMag = 2.000000 StrobedPath.AllowedMotion = 5.0 ' open a cartesian step loop to step between features (ie within a PCS) StepLoop.OpenCart DX:=SchrittW, DY:=0.0000000, DZ:=0.0000000, BetweenParts:=false For S3_acq = 1 to Zaehler StrobedPath.SetLighting Coax:=StreamCoax, Stage:=StreamStage, Ring:=0.00, Angle:=0.00 StrobedPath.AddStep X:=XPOS, Y:=YPOS, Z:=0.0, WayPoint:=false StepLoop.Next Next S3_acq StepLoop.Close StrobedPath.Acquire End Sub 'BilderAufnehmen Private Sub QVBlock_31 'print now CXNom = 0 CYNom = 0 XZero = 0 YZero = 0 SAngle = 0 SSoll = 0 SAbw = 0 TCount = 1 MissCount = 0 XZero = SXDev / (Count - 1) YZero = SYDev / (Count - 1) XZero = Format(XZero, "0.00000") YZero = Format(YZero, "0.00000") Do until TCount = Count - 1 Abw = 0 Abw = (featuredb.item("N_" + cstr(TCount)).x.Deviation - XZero) * featuredb.item("N_" + cstr(TCount)).y.Nom - (featuredb.item("N_" + cstr(TCount)).y.Deviation - YZero) * featuredb.item("N_" + cstr(TCount)).x.Nom SAbw = SAbw + Abw SAbw = Format(SAbw, "0.00000") Soll = (featuredb.item("N_" + cstr(TCount)).x.Nom * featuredb.item("N_" + cstr(TCount)).x.Nom) + (featuredb.item("N_" + cstr(TCount)).y.Nom * featuredb.item("N_" + cstr(TCount)).y.Nom) SSoll = SSoll + Soll SSoll = Format(SSoll, "0.00000") TCount = TCount + 1 Loop SAngle = -1 * SAbw / SSoll SAngle = Format(SAngle, "0.00000") TCount = 1 Do until TCount = Count IF FeatureDB("N_" + cstr(TCount)).type = 4096 then ' PassCount = PassCount - 1 MissCount = MissCount + 1 End If CXNom = (featuredb.item("N_" + cstr(TCount)).x.Nom - featuredb.item("N_" + cstr(TCount)).y.Nom * SAngle) + XZero CYNom = featuredb.item("N_" + cstr(TCount)).y.Nom + (SAngle * featuredb.item("N_" + cstr(TCount)).x.Nom) + YZero CXNom = Format(CXNom, "0.00000") CYNom = Format(CYNom, "0.00000") 'FeatureDB.Keyincircle X:=featuredb.item("N_" + cstr(TCount)).x.actual, Y:=featuredb.item("N_" + cstr(TCount)).y.actual, D:=featuredb.item("N_" + cstr(TCount)).D.actual, Label:="L_" + cstr(TCount) 'FeatureDB("L_" + cstr(TCount)).SetCircleNoms X:=CXNom, Y:=CYNom, Z:=0.0000000, D:=0.400000 'FeatureDB("L_" + cstr(TCount)).X.SetTol Tag:="T4" 'FeatureDB("L_" + cstr(TCount)).Y.SetTol Tag:="T4" 'FeatureDB("L_" + cstr(TCount)).D.SetTol Tag:="T5" 'FeatureDB("L_" + cstr(TCount)).CR.SetTol Tag:="T7" 'Results.ReportFeature Show:=X_ and Y_ and D_, Tag:="L_" + cstr(TCount) 'FeatureDB.Delete Tag:="N_" + cstr(TCount) FeatureDB("N_" + cstr(TCount)).SetCircleNoms X:=CXNom, Y:=CYNom, Z:=0.0000000, D:=0.400000 FeatureDB("N_" + cstr(TCount)).X.SetTol Tag:="T4" FeatureDB("N_" + cstr(TCount)).Y.SetTol Tag:="T4" FeatureDB("N_" + cstr(TCount)).D.SetTol Tag:="T5" FeatureDB("N_" + cstr(TCount)).CR.SetTol Tag:="T7" Results.ReportFeature Show:=X_ and Y_ and D_ and CR_, Tag:="N_" + cstr(TCount) TCount = TCount + 1 Loop CoA = 1 Xpc = 0 Ypc = 0 Dpc = 0 XYDpc = 0 XDpc = 0 YDpc = 0 XYpc = 0 PassCount = 1966 Do until CoA = Count If FeatureDB("N_" + cstr(CoA)).OutOfTol<>False and FeatureDB("N_" + cstr(CoA)).X.Tolid<>0 then XWert = FeatureDB("N_" + cstr(CoA)).X.Actual YWert = FeatureDB("N_" + cstr(CoA)).Y.Actual DMWert = FeatureDB("N_" + cstr(CoA)).D.Actual XSoll = FeatureDB("N_" + cstr(CoA)).X.Nom YSoll = FeatureDB("N_" + cstr(CoA)).Y.Nom XAbw = FeatureDB("N_" + cstr(CoA)).X.Deviation YAbw = FeatureDB("N_" + cstr(CoA)).Y.Deviation DAbw = FeatureDB("N_" + cstr(CoA)).D.Deviation OBXTol = TolDB.Item(FeatureDB("N_" + cstr(CoA)).X.TOLID).Up UNXTol = TolDB.Item(FeatureDB("N_" + cstr(CoA)).X.TOLID).Lo OBYTol = TolDB.Item(FeatureDB("N_" + cstr(CoA)).Y.TOLID).Up UNYTol = TolDB.Item(FeatureDB("N_" + cstr(CoA)).Y.TOLID).Lo OBDTol = TolDB.Item(FeatureDB("N_" + cstr(CoA)).D.TOLID).Up UNDTol = TolDB.Item(FeatureDB("N_" + cstr(CoA)).D.TOLID).Lo Fehlerhochzaehlen=True If XAbw > OBXTol or XAbw < UNXTol then If YAbw > OBYTol or YAbw < UNYTol then If DAbw > OBDTol or DAbw < UNDTol then XYDpc = XYDpc + 1 PassCount = PassCount - 1 Else XYpc = XYpc + 1 PassCount = PassCount - 1 End If ElseIf DAbw > OBDTol or DAbw < UNDTol then XDpc = XDpc + 1 PassCount = PassCount - 1 Else Xpc = Xpc + 1 PassCount = PassCount - 1 End If ElseIf YAbw > OBYTol or YAbw < UNYTol then If DAbw > OBDTol or DAbw < UNDTol then YDpc = YDpc + 1 PassCount = PassCount - 1 Else Ypc = Ypc + 1 PassCount = PassCount - 1 End If Else If DAbw > OBDTol or DAbw < UNDTol then Dpc = Dpc + 1 PassCount = PassCount - 1 End if End If End If CoA = CoA + 1 PosOut = XYDpc + XDpc + XYpc + YDpc + Xpc + Ypc DiaOut = XYDpc + XDpc + YDpc + Dpc Loop Print"Total Position Out : "&PosOut Print"Total Diameter Out : "&DiaOut Print"Total Missed Count : "&MissCount 'Print "XYDpc= "&XYDpc 'Print "XDpc= "&XDpc 'Print "XYpc= "&XYpc 'Print "YDpc= "&YDpc 'Print "Xpc= "&Xpc 'Print "Ypc= "&Ypc 'Print "Dpc= "&Dpc 'Print "PassCount= "&PassCount PosMC = PosOut + MissCount PassRate = ((PassCount-MissCount)/1966) Print "Total Pass Rate : "+CSTR(Format(PassRate,"Percent")) If OTcount > 0 then FResult="FAIL" Print"" Print"RESULT: FAIL" ElseIf OTDcount > 0 then FResult="FAIL" Print"" Print"RESULT: FAIL" ElseIf OTAcount > 0 then FResult="FAIL" Print"" Print"RESULT: FAIL" ElseIf OTLcount > 0 then FResult="FAIL" Print"" Print"RESULT: FAIL" ElseIf CDbl(PassRate) > 0.99 then FResult="PASS" Print"" Print"RESULT: PASS" Else If PosMC < 15 then If DiaOut < 500 then FResult = "REMEASURE" Print"" Print"RESULT: RE-MEASURE" Else FResult = "FAIL" Print"" Print"RESULT: FAIL" End If Else FResult = "FAIL" Print"" Print"RESULT: FAIL" End If End If 'print now 'Results.Export "D:\Wafer-Measuremachine\Result\32bf\32BFront_"&Day(Now)&"_"&Month(Now)&"_"&Year(Now)&"_"&Hour(Now)&"_"&Minute(Now)&"_"&Second(Now)&".txt" End Sub 'QVBlock_31 Private Sub QVBlock_OA Measure.Circle ProjPlane:=NO_PLANE, CircleType:=INNER, Datum:=DATUM_BOUNDARY_FIT, Outlier:=0, Label:="N_" + CSTR(COUNT) CircleTool.ScanInt = 1 CircleTool.SamplingDirection = CW CircleTool.SetFilter Alg:=DYNAMIC_THRESH, EdgeSlope:=FALLING, EdgeQuality:=STRONG, Outlier:=0.000000, TH:=174, THR:=0.45, THS:=59 CircleTool.RunVCS X:=0, Y:=0, R1:=2, R2:=113 Measure.EndMeas FeatureDB("N_" + CSTR(COUNT)).SetCircleNoms X:=XPOS, Y:=YPOS, Z:=0.0000000, D:=0.400000 FeatureDB("N_" + CSTR(COUNT)).X.SetTol Tag:="T4" FeatureDB("N_" + CSTR(COUNT)).Y.SetTol Tag:="T4" FeatureDB("N_" + CSTR(COUNT)).D.SetTol Tag:="T5" FeatureDB("N_" + CSTR(COUNT)).CR.SetTol Tag:="T7" 'Results.ReportFeature Show:=X_ and Y_ and D_ and CR_, Tag:="N_" + CSTR(COUNT) SXDev = SXDev + featuredb.item("N_" + cstr(Count)).x.Deviation SYDev = SYDev + featuredb.item("N_" + cstr(Count)).y.Deviation Count = Count + 1 End Sub 'QVBlock_OA Private Sub Rheihe1 ' open a cartesian step loop to step between features (ie within a PCS) StepLoop.OpenCart DX:=SchrittW, DY:=0.0000000, DZ:=0.0000000, BetweenParts:=false For S3 = 1 to Zaehler StrobedPath.LoadNextImage Call QVBlock_OA StepLoop.Next Next S3 StepLoop.Close End Sub 'Rheihe1 Private Sub QVBlock_crFolder dim sfile as string dim sfile2 as string dim sfile3 as string dim sfile4 as string dim sfile5 as string dim sfile6 as string dim sfile7 as string dim sfile8 as string dim sfile9 as string dim sfile10 as string dim FSO as object sfile = "Q:\QA\ReadWrite\Wafer2 Measurement Result\Production\"+Wname+" TDK32B "+bname+"\" if Right(sfile, 1) = "\" then sfile = left(sfile, len(sfile) - 1) end if sfile2 = "Q:\QA\ReadWrite\Wafer2 Measurement Result\Production\"+Wname+" TDK32B "+bname+"\"+rname+"\" if Right(sfile2, 1) = "\" then sfile2 = left(sfile2, len(sfile2) - 1) end if set FSO = CreateObject ("scripting.filesystemobject") if Not FSO.FolderExists(sfile) then FSO.CreateFolder sfile end if if Not FSO.FolderExists(sfile2) then FSO.CreateFolder sfile2 end if if FResult = "PASS" then sfile3 = "Q:\QA\ReadWrite\Wafer2 Measurement Result\Production\"+Wname+" TDK32B "+bname+"\"+rname+"\"+pname+"\" if Right(sfile3, 1) = "\" then sfile3 = left(sfile3, len(sfile3) - 1) end if if Not FSO.FolderExists(sfile3) then FSO.CreateFolder sfile3 end if Print "" Print "End" Print "" Results.Export sfile3 & "\GW_BG08R32B_" & wfname & " " & pname & "_" & stname & "_" &Day(Now)&"-"&Month(Now)&"-"&Year(Now)&"-"&Hour(Now)&"-"&Minute(Now)&"-"&Second(Now)& "_" & opname & "_" & FResult &".txt" End If if FResult = "FAIL" then sfile4 = "Q:\QA\ReadWrite\Wafer2 Measurement Result\Production\"+Wname+" TDK32B "+bname+"\"+rname+"\"+FResult+"\" if Right(sfile4, 1) = "\" then sfile4 = left(sfile4, len(sfile4) - 1) End If if Not FSO.FolderExists(sfile4) then FSO.CreateFolder sfile4 End If Print "" Print "End" Print "" Results.Export sfile4 & "\GW_BG08R32B_" & wfname & " " & pname & "_" & stname & "_" &Day(Now)&"-"&Month(Now)&"-"&Year(Now)&"-"&Hour(Now)&"-"&Minute(Now)&"-"&Second(Now)& "_" & opname & "_" & FResult &".txt" End If if FResult = "REMEASURE" then sfile5 = "Q:\QA\ReadWrite\Wafer2 Measurement Result\Production\"+Wname+" TDK32B "+bname+"\"+rname+"\"+FResult+"\" if Right(sfile5, 1) = "\" then sfile5 = left(sfile5, len(sfile5) - 1) End If if Not FSO.FolderExists(sfile5) then FSO.CreateFolder sfile5 End If Print "" Print "End" Print "" Results.Export sfile5 & "\GW_BG08R32B_" & wfname & " " & pname & "_" & stname & "_" &Day(Now)&"-"&Month(Now)&"-"&Year(Now)&"-"&Hour(Now)&"-"&Minute(Now)&"-"&Second(Now)& "_" & opname & "_" & FResult &".txt" End If sfile6 = "Q:\Mresult\Data\"+Wname+" TDK32B "+bname+"\" if Right(sfile6, 1) = "\" then sfile6 = left(sfile6, len(sfile6) - 1) end if sfile7 = "Q:\Mresult\Data\"+Wname+" TDK32B "+bname+"\"+rname+"\" if Right(sfile7, 1) = "\" then sfile7 = left(sfile7, len(sfile7) - 1) end if set FSO = CreateObject ("scripting.filesystemobject") if Not FSO.FolderExists(sfile6) then FSO.CreateFolder sfile6 end if if Not FSO.FolderExists(sfile7) then FSO.CreateFolder sfile7 end if if FResult = "PASS" then sfile8 = "Q:\Mresult\Data\"+Wname+" TDK32B "+bname+"\"+rname+"\"+pname+"\" if Right(sfile8, 1) = "\" then sfile8 = left(sfile8, len(sfile8) - 1) end if if Not FSO.FolderExists(sfile8) then FSO.CreateFolder sfile8 end if Print "" Print "End" Print "" Results.Export sfile8 & "\GW_BG08R32B_" & wfname & " " & pname & "_" & stname & "_" &Day(Now)&"-"&Month(Now)&"-"&Year(Now)&"-"&Hour(Now)&"-"&Minute(Now)&"-"&Second(Now)& "_" & opname & "_" & FResult &".txt" End If if FResult = "FAIL" then sfile9 = "Q:\Mresult\Data\"+Wname+" TDK32B "+bname+"\"+rname+"\"+FResult+"\" if Right(sfile9, 1) = "\" then sfile9 = left(sfile9, len(sfile9) - 1) End If if Not FSO.FolderExists(sfile9) then FSO.CreateFolder sfile9 End If Print "" Print "End" Print "" Results.Export sfile9 & "\GW_BG08R32B_" & wfname & " " & pname & "_" & stname & "_" &Day(Now)&"-"&Month(Now)&"-"&Year(Now)&"-"&Hour(Now)&"-"&Minute(Now)&"-"&Second(Now)& "_" & opname & "_" & FResult &".txt" End If if FResult = "REMEASURE" then sfile10 = "Q:\Mresult\Data\"+Wname+" TDK32B "+bname+"\"+rname+"\"+FResult+"\" if Right(sfile10, 1) = "\" then sfile10 = left(sfile10, len(sfile10) - 1) End If if Not FSO.FolderExists(sfile10) then FSO.CreateFolder sfile10 End If Print "" Print "End" Print "" Results.Export sfile10 & "\GW_BG08R32B_" & wfname & " " & pname & "_" & stname & "_" &Day(Now)&"-"&Month(Now)&"-"&Year(Now)&"-"&Hour(Now)&"-"&Minute(Now)&"-"&Second(Now)& "_" & opname & "_" & FResult &".txt" End If End Sub 'QVBlock_crFolder Private Sub QVBlock_Excel Dim objXL As Object Dim QTYS AS INTEGER Dim COUNTN AS double Dim CCot AS STRING Dim OD_ACT AS DOUBLE Dim ID_ACT AS DOUBLE Dim CoC_ACT AS DOUBLE Dim NSA_ACT AS DOUBLE Dim LAP_X_ACT AS DOUBLE Dim LAP_Y_ACT AS DOUBLE Dim EW AS STRING Dim EB AS STRING Dim EWF AS STRING Set objXL = CreateObject("Excel.application") objXL.Workbooks.open "C:\Wafer-Measuremachine\Results\TDK\TDKB_Measurement_Result.xlsx" objXL.Visible = false COUNTn = 1 CCot = objXL.Range("B" & COUNTn).Value Do Until CCot = "" CCot = objXL.Range("B" & COUNTn).Value COUNTn = COUNTn + 1 Loop COUNTn = COUNTn - 1 objXL.Range("A" & COUNTn).Value = Now objXL.Range("B" & COUNTn).Value = Wname objXL.Range("C" & COUNTn).Value = bname objXL.Range("D" & COUNTn).Value = rname objXL.Range("E" & COUNTn).Value = pname objXL.Range("F" & COUNTn).Value = PosOut objXL.Range("G" & COUNTn).Value = DiaOut objXL.Range("H" & COUNTn).Value = MissCount objXL.Range("I" & COUNTn).Value = PassRate objXL.Range("J" & COUNTn).Value = FResult objXL.activeworkbook.saveas FileName:="C:\Wafer-Measuremachine\Results\TDK\TDKB_Measurement_Result.xlsx" objXL.activeworkbook.Close(True) objXL.Quit Set objXL = Nothing End Sub 'QVBlock_Excel