From 0da14ae4ae0db46db46376a3b7dc8d9b567c745b Mon Sep 17 00:00:00 2001 From: "Infineon\\Ouellette" Date: Thu, 30 Jan 2025 14:51:45 -0700 Subject: [PATCH] Updated Method to determine if test wafer is required. --- LSL2/STPROC/RDS_EVENTS.txt | 100 +++++++++++++++++++++++++++-------- LSL2/STPROC/RDS_SERVICES.txt | 97 ++++++++++++++++++++++++++------- 2 files changed, 155 insertions(+), 42 deletions(-) diff --git a/LSL2/STPROC/RDS_EVENTS.txt b/LSL2/STPROC/RDS_EVENTS.txt index ef1c04f..f50d598 100644 --- a/LSL2/STPROC/RDS_EVENTS.txt +++ b/LSL2/STPROC/RDS_EVENTS.txt @@ -89,7 +89,7 @@ Declare subroutine Dialog_Box, Qa_Services, Obj_React_Ll, Start_Window, obj_Reac Declare subroutine Lot_Services Declare function Dialog_Box, Msg, MemberOf, obj_WO_Mat, Database_Services, Get_Property, obj_React_Status, Get_Status Declare function QA_Services, Database_Services, Rds_Services, Obj_Calendar, Override_Log_Services, Max, Supplement_Services -Declare function Datetime +Declare function Datetime, Test_Run_Services SubclassInfo = Form_Services('FindSubclassControl') Subclass = SubclassInfo<1> @@ -351,9 +351,63 @@ Event PUB_SIGN.CLICK() If (Valid EQ True$) then if XLATE('APP_INFO', 'NEW_TW_SYSTEM_ACTIVE_SWITCH', 1, 'X') EQ True$ then UsingTestWafers = False$ - if ReactorType NE 'EPP' then - UsingTestWafers = Msg(@Window, '', 'YESNO', '', 'Log Test Wafer Usage':@FM:'Are any test wafers loaded?') - end + ExistingTestWafersLogged = Test_Run_Services('GetTestRunKeysByRDS', RdsNo) + If ExistingTestWafersLogged EQ '' then + if ReactorType NE 'EPP' then + UsingTestWafers = Msg(@Window, '', 'YESNO', '', 'Log Test Wafer Usage':@FM:'Are any test wafers loaded?') + end + IsTWReqd = RDS_Services('IsTWLoggingReqd', RDSNo) + If UsingTestWafers then + TWLogResult = Dialog_Box('NDW_LOG_TEST_WAFER_USAGE', @Window, RDSNo : @VM : 'STANDARD' : @VM : 'REACTOR' : @VM : Reactor) + If TWLogResult then + QA_Services('SignLoadStage', RDSNo, @USER4, WfrQty, LLSide) + end else + If IsTWReqd then + UserMsg = "Unable to sign load because test wafer logging is required on this run. A supervisor or lead may override." + OverrideGroups = 'LEAD':@VM:'SUPERVISOR':@VM:'ENGINEERING':@VM:'ENG_TECH' + UserVerification = Dialog_Box('NDW_VERIFY_USER', @WINDOW, @USER4:@FM:OverrideGroups:@FM:'':@FM:UserMsg) + Override = UserVerification<1> + If Override then + QA_Services('SignLoadStage', RDSNo, @USER4, WfrQty, LLSide) + end + end else + ContinueLoad = Msg(@Window, '', 'YESNO', '', 'Continue?':@FM:'Test wafer logging was cancelled. Do you wish to continue signing?') + If ContinueLoad then + QA_Services('SignLoadStage', RDSNo, @USER4, WfrQty, LLSide) + end + end + end + end else + if IsTWReqd EQ False$ then + QA_Services('SignLoadStage', RDSNo, @USER4, WfrQty, LLSide) + end else + UserMsg = "Unable to sign load because test wafer logging is required on this run. A supervisor or lead may override." + OverrideGroups = 'LEAD':@VM:'SUPERVISOR':@VM:'ENGINEERING':@VM:'ENG_TECH' + UserVerification = Dialog_Box('NDW_VERIFY_USER', @WINDOW, @USER4:@FM:OverrideGroups:@FM:'':@FM:UserMsg) + Override = UserVerification<1> + If Override then + QA_Services('SignLoadStage', RDSNo, @USER4, WfrQty, LLSide) + end + end + + end + end else + QA_Services('SignLoadStage', RDSNo, @USER4, WfrQty, LLSide) + end + + end else + QA_Services('SignLoadStage', RDSNo, @USER4, WfrQty, LLSide) + end + + end + end else + if XLATE('APP_INFO', 'NEW_TW_SYSTEM_ACTIVE_SWITCH', 1, 'X') EQ True$ then + UsingTestWafers = False$ + ExistingTestWafersLogged = Test_Run_Services('GetTestRunKeysByRDS', RdsNo) + If ExistingTestWafersLogged EQ '' then + if ReactorType NE 'EPP' then + UsingTestWafers = Msg(@Window, '', 'YESNO', '', 'Log Test Wafer Usage':@FM:'Are any test wafers loaded?') + end IsTWReqd = RDS_Services('IsTWLoggingReqd', RDSNo) If UsingTestWafers then TWLogResult = Dialog_Box('NDW_LOG_TEST_WAFER_USAGE', @Window, RDSNo : @VM : 'STANDARD' : @VM : 'REACTOR' : @VM : Reactor) @@ -361,7 +415,13 @@ Event PUB_SIGN.CLICK() QA_Services('SignLoadStage', RDSNo, @USER4, WfrQty, LLSide) end else If IsTWReqd then - Msg(@Window, 'Unable to sign load because test wafer logging is required on this run.') + UserMsg = "Unable to sign load because test wafer logging is required on this run. A supervisor or lead may override." + OverrideGroups = 'LEAD':@VM:'SUPERVISOR':@VM:'ENGINEERING':@VM:'ENG_TECH' + UserVerification = Dialog_Box('NDW_VERIFY_USER', @WINDOW, @USER4:@FM:OverrideGroups:@FM:'':@FM:UserMsg) + Override = UserVerification<1> + If Override then + QA_Services('SignLoadStage', RDSNo, @USER4, WfrQty, LLSide) + end end else ContinueLoad = Msg(@Window, '', 'YESNO', '', 'Continue?':@FM:'Test wafer logging was cancelled. Do you wish to continue signing?') If ContinueLoad then @@ -373,27 +433,20 @@ Event PUB_SIGN.CLICK() if IsTWReqd EQ False$ then QA_Services('SignLoadStage', RDSNo, @USER4, WfrQty, LLSide) end else - Msg(@Window, 'Unable to sign load because test wafer logging is required on this run.') + UserMsg = "Unable to sign load because test wafer logging is required on this run. A supervisor or lead may override." + OverrideGroups = 'LEAD':@VM:'SUPERVISOR':@VM:'ENGINEERING':@VM:'ENG_TECH' + UserVerification = Dialog_Box('NDW_VERIFY_USER', @WINDOW, @USER4:@FM:OverrideGroups:@FM:'':@FM:UserMsg) + Override = UserVerification<1> + If Override then + QA_Services('SignLoadStage', RDSNo, @USER4, WfrQty, LLSide) + end end end - end else - QA_Services('SignLoadStage', RDSNo, @USER4, WfrQty, LLSide) - end - - end - end else - UsingTestWafers = Msg(@Window, '', 'YESNO', '', 'Log Test Wafer Usage':@FM:'Are any test wafers loaded?') - If UsingTestWafers then - TWLogResult = Dialog_Box('NDW_LOG_TEST_WAFER_USAGE', @Window, RDSNo : @VM : 'STANDARD' : @VM : 'REACTOR' : @VM : Reactor) - If TWLogResult then - QA_Services('SignLoadStage', RDSNo, @USER4, WfrQty, LLSide) - end else - ContinueLoad = Msg(@Window, '', 'YESNO', '', 'Continue?':@FM:'Test wafer logging was cancelled. Do you wish to continue signing?') - If ContinueLoad then - QA_Services('SignLoadStage', RDSNo, @USER4, WfrQty, LLSide) - end - end + end else + QA_Services('SignLoadStage', RDSNo, @USER4, WfrQty, LLSide) + end + end else QA_Services('SignLoadStage', RDSNo, @USER4, WfrQty, LLSide) end @@ -720,3 +773,4 @@ return + diff --git a/LSL2/STPROC/RDS_SERVICES.txt b/LSL2/STPROC/RDS_SERVICES.txt index 50fe7f5..f515f07 100644 --- a/LSL2/STPROC/RDS_SERVICES.txt +++ b/LSL2/STPROC/RDS_SERVICES.txt @@ -70,6 +70,7 @@ $Insert REACT_RUN_EQUATES $Insert REACTOR_EQUATES $Insert WO_MAT_QA_EQUATES $Insert PRS_STAGE_EQUATES +$Insert PRS_PROP_EQUATES $Insert WO_LOG_EQUATES $Insert WM_OUT_EQUATES $Insert REACT_UTIL_EQU @@ -743,31 +744,88 @@ Service IsValidSubLot(RDSNo, RDSType, SupplierLot) Response = IsValid end service +Service GetRDSRunHistoryByReactorAndWO(ReactorNo, WO) + table = "RDS" + ErrorMessage = '' + RDSRecords = '' + RDSSortedByAssignmentDTM = '' + Open "DICT ":table To @DICT Else + ErrorMessage = 'Error opening RDS dictionary' + End + If ErrorMessage EQ '' then + srch_strng = "WO":@VM:WO:@FM:"REACTOR":@VM:ReactorNo:@FM + option = "" + flag = "" + Btree.Extract(srch_strng, table, @DICT, RDSRecords, option, flag) + end + RDSRecordsWithPreEpiSig = '' + for each RDSKey in RDSRecords using @VM setting RDSPos + ThisRDSRec = Database_Services('ReadDataRow', 'RDS', RDSKey, True$, 0, False$) + ThisRDSPreEpiDT = ThisRDSRec + ThisRDSPreEpiTM = ThisRDSRec + ThisRDSPreEpiDTM = SRP_Datetime('Combine', ThisRDSPreEpiDT, ThisRDSPreEpiTM) + RDSRecordsWithPreEpiSig<1, RDSPos> = RDSKey + RDSRecordsWithPreEpiSig<2, RDSPos> = ThisRDSPreEpiDTM + Next RDSKey + RDSSortedByAssignmentDTM = SRP_Sort_Array(RDSRecordsWithPreEpiSig, 'AN2', 0) + FinalRDSSortedByAssignmentDTM = '' + + for each RDS in RDSSortedByAssignmentDTM<1> using @VM setting SortedRDSPos + ThisRDSDtm = RDSSortedByAssignmentDTM<2, SortedRDSPos> + if ThisRDSDtm GT 0 then + FinalRDSSortedByAssignmentDTM<1, -1> = RDS + FinalRDSSortedByAssignmentDTM<2, -1> = OConv(ThisRDSDtm, 'DT') + end + Next RDS + Response = FinalRDSSortedByAssignmentDTM<1> +end service + + Service IsTWLoggingReqd(RDSNo) - Response = False$ - RDSRec = Database_Services('ReadDataRow', 'RDS', RDSNo, True$, 0, False$) - ReactorNo = RDSRec - ReactorType = Database_Services('ReadDataColumn', 'REACTOR', ReactorNo, REACTOR_REACT_TYPE$) - If ReactorType NE 'EPP' then - IsHGCVReqd = obj_RDS('MetPropFlag', RDSNo:@RM:RDSRec:@RM:'CRES') - If IsHGCVReqd EQ True$ then - ExistingTWKeys = Test_Run_Services('GetTestRunKeysByRDS', RDSNo) - If ExistingTWKeys EQ '' then - Response = True$ - end else - Response = False$ - end - - end else - Response = False$ - end + IsTWReqd = False$ + ExistingTWRuns = Test_Run_Services('GetTestRunKeysByRDS', RDSNo) + If ExistingTWRuns EQ '' then + RDSRec = Database_Services('ReadDataRow', 'RDS', RDSNo) + WONo = RDSRec + ReactNo = RDSRec + ThisReactorRunOrder = 0 + ReactRDSNos = RDS_Services('GetRDSRunHistoryByReactorAndWO', ReactNo, WONo) + LOCATE RDSNo IN ReactRDSNos USING @VM SETTING ThisReactorRunOrder ELSE Return + PSNo = RDSRec + PSRec = Database_Services('ReadDataRow', 'PROD_SPEC', PSNo) + PRSLayerKeys = PSRec + for each PRSLayerKey in PRSLayerKeys using @VM + PRSPropKeys = Database_Services('ReadDataColumn', 'PRS_LAYER', PRSLayerKey, 5) + for each PRSPropKey in PRSPropKeys using @VM + PRSPropRec = Database_Services('ReadDataRow', 'PRS_PROP', PRSPropKey) + WaferType = PRSPropRec<6> + TestType = Field(PRSPropKey, '*', 3) + Layer = Field(PRSPropKey, '*', 2) + MeasureFreq = PRSPropRec + Start = PRSPropRec + If WaferType NE 'Product' AND WaferType NE 'Prod' then + BEGIN CASE + CASE MeasureFreq = 'F' AND ThisReactorRunOrder = 1 ; IsTWReqd = 1 + CASE ThisReactorRunOrder = Start ; IsTWReqd = 1 + CASE NUM(MeasureFreq) + IF MOD(ThisReactorRunOrder,MeasureFreq) - Start = 0 THEN + IsTWReqd = True$ + END + END CASE + end + Until IsTWReqd EQ True$ + Next PRSPropKey + Until IsTWReqd EQ True$ + Next PRSLayerKey end else - Response = False$ + IsTWReqd = False$ end + //The code below will be removed upon final production usage. TWTrackingSystemActive = Database_Services('ReadDataColumn', 'APP_INFO', 'NEW_TW_SYSTEM_ACTIVE_SWITCH', 1, True$, 0, False$) If TWTrackingSystemActive EQ False$ then - Response = False$ + IsTWReqd = False$ end + Response = IsTWReqd end service //---------------------------------------------------------------------------------------------------------------------- @@ -1703,3 +1761,4 @@ return +