From 9749af69cf4a9ff03a78e915c42ac7eaa1795951 Mon Sep 17 00:00:00 2001 From: "Infineon\\StieberD" Date: Mon, 17 Nov 2025 11:16:00 -0700 Subject: [PATCH] Fixed an issue preventing surfscan sort pass fail values from being evaluated for multiple scans. Updated CLEAN_INSP_ACTIONS to be able to retrieve UCL values from SPC for records related to WM_OUT records. --- LSL2/STPROC/CLEAN_INSP_ACTIONS.txt | 39 +++++++++++++++++------------- 1 file changed, 22 insertions(+), 17 deletions(-) diff --git a/LSL2/STPROC/CLEAN_INSP_ACTIONS.txt b/LSL2/STPROC/CLEAN_INSP_ACTIONS.txt index 1f21738..2a652ef 100644 --- a/LSL2/STPROC/CLEAN_INSP_ACTIONS.txt +++ b/LSL2/STPROC/CLEAN_INSP_ACTIONS.txt @@ -77,6 +77,7 @@ $Insert IFX_EQUATES Equ Comma$ to ',' Declare function Error_Services, Database_Services, Environment_Services, QA_Services, RDS_Services, MemberOf +Declare function SRP_Array Declare subroutine Error_Services, Database_Services, Post_Metrology_Manual_Data_Entry_Log, Service_Services Declare subroutine Qa_Services @@ -467,7 +468,7 @@ WRITE_RECORD_PRE: SODAvg = OConv(ScanDefectsAvg<0, ScanRecipeIndex>, 'MD3') NumFailedWafers = 0 For each WaferSOD in ScanSODPerWafer using @SVM setting WaferIndex - WaferSort = ScanSortPerWafer<0, ScanRecipeIndex, WaferIndex> + WaferSort = ScanSortPerWafer<0, 0, WaferIndex> If ( (WaferSOD NE '') or (WaferSort NE '') ) then // We have SOD data for this wafer so check if it is < SOD Max If ( (WaferSOD LE SpecDefect) and (WaferSort NE 'FAIL') ) then @@ -633,22 +634,29 @@ WRITE_RECORD_PRE: Case Stage _EQC 'POST' If SpecRecipes NE '' then - // Check each scan recipe. For each ScanRecipeName in ScanRecipes using @VM setting ScanRecipeIndex Locate ScanRecipeName in SpecRecipes using @VM setting SpecRecipeIndex then // Get UCL value from SPC for each spec recipe if they have not yet been retrieved. UCL = Record - If (UCL EQ '') or (UCL EQ 0) then - // The UCL has not yet been retrieved from SPC or an error could have - // occurred when the last attempt to retrieve it, so try to get it now. - UCL = QA_Services('PostUCLRequest', RDSKey, ScanRecipeName) - If (UCL NE '') and (UCL NE 0) then - Record = UCL - end else - ErrorMessage = 'Error retrieving UCL value from QA_Services in CLEAN_INSP_ACTIONS' - Error_Services('Add', ErrorMessage) - end + If ( (UCL EQ '') or (UCL EQ 0) ) then + If IsWmOut then + WMOutKey = Record:'*':Record:'*':Record + RDSKeys = Xlate('WM_OUT', WMOutKey, WM_OUT_RDS$, 'X') + RDSKeys = SRP_Array('Clean', RDSKeys, 'TrimAndMakeUnique', 'X') + If RDSKeys NE '' then RDSKey = RDSKeys<0, 1> + end + If (RDSKey NE '') then + // The UCL has not yet been retrieved from SPC or an error could have + // occurred when the last attempt to retrieve it, so try to get it now. + UCL = QA_Services('PostUCLRequest', RDSKey, ScanRecipeName) + If (UCL NE '') and (UCL NE 0) then + Record = UCL + end else + ErrorMessage = 'Error retrieving UCL value from QA_Services in CLEAN_INSP_ACTIONS' + Error_Services('Add', ErrorMessage) + end + end end SpecSampleQty = Record SpecDefect = Oconv(SpecDefects<0, SpecRecipeIndex>, 'MD0') @@ -666,7 +674,7 @@ WRITE_RECORD_PRE: SODAvg = OConv(ScanDefectsAvg<0, ScanRecipeIndex>, 'MD3') NumFailedWafers = 0 For each WaferSOD in ScanSODPerWafer using @SVM setting WaferIndex - WaferSort = ScanSortPerWafer<0, ScanRecipeIndex, WaferIndex> + WaferSort = ScanSortPerWafer<0, 0, WaferIndex> If ( (WaferSOD NE '') or (WaferSort NE '') ) then // We have SOD data for this wafer so check if it is < SOD Max If ( (WaferSOD LE SpecDefect) and (WaferSort NE 'FAIL') ) then @@ -700,12 +708,9 @@ WRITE_RECORD_PRE: Case (SigRequired EQ True$) AND (ScanSig EQ '') ROTRAction = 'F' ROTRActionReason = 'SurfScan signature is missing.' - Case (ScanDefect GT SpecDefect) + Case (ScanDefect GT SpecDefect) or ( Not(ROTREnabled) and (NumFailedWafers GT 0) ) or ( ROTREnabled and (NumFailedWafers GE ROTRFailLimit) ) ROTRAction = 'F' ROTRActionReason = 'SurfScan data out of bounds.' - Case ROTREnabled and (NumFailedWafers GE ROTRFailLimit) - ROTRAction = 'F' - ROTRActionReason = 'SurfScan data out of bounds.' Case (ScanHaze GT SpecHaze) ROTRAction = 'F' ROTRActionReason = 'SurfScan Haze out of bounds.'