From d626ebdf3ca243a8adec01638a41e3e0d9bdb48a Mon Sep 17 00:00:00 2001 From: "Ouellette Jonathan (CSC FI SPS MESLEO)" Date: Mon, 21 Apr 2025 22:26:15 +0200 Subject: [PATCH] Merged PR 15381: EPP BioRad Data Import BugFix --- LSL2/STPROC/METROLOGY_SERVICES.txt | 64 +++++++++++++++++++++++------- 1 file changed, 50 insertions(+), 14 deletions(-) diff --git a/LSL2/STPROC/METROLOGY_SERVICES.txt b/LSL2/STPROC/METROLOGY_SERVICES.txt index 884cde1..6bbb3e2 100644 --- a/LSL2/STPROC/METROLOGY_SERVICES.txt +++ b/LSL2/STPROC/METROLOGY_SERVICES.txt @@ -98,7 +98,7 @@ Declare function SRP_Sort_Array, Metrology_Services, obj_RDS_Test, obj_Test_P Declare function Work_Order_Services, SRP_JSON, Logging_Services, Environment_Services, SRP_Trim, Min, Max Declare function QA_Services, SRP_Join_Arrays, Get_Status, Obj_Clean_Insp, Datetime, SRP_Datetime Declare function Httpclient_Services, PM_Services, Signature_Services, SRP_Array, Math_Services -Declare function Tool_Class_Services +Declare function Tool_Class_Services, obj_wo_mat LogPath = Environment_Services('GetApplicationRootPath') : '\LogFiles\Metrology' LogDate = Oconv(Date(), 'D4/') @@ -567,6 +567,7 @@ Service ImportStratusData(RunData) Slots = WOMatQARec SpecQty = WOMatQARec pPos = '' + WOMatSlotProfile = obj_WO_Mat('SlotWaferIDs',WOMatKey:@RM:WOMatRec) For each Profile in Profiles using @VM setting pPos Stage = Stages<0, pPos> If ( (Profile EQ '1ADE') and ( (Stage EQ 'QA') or (Stage EQ 'MO_QA') ) ) then @@ -581,9 +582,15 @@ Service ImportStratusData(RunData) end Begin Case Case Slot EQ '1' - WaferIndex = 1 + For WaferIndex = 1 to 25 + SlotIsEmpty = WOMatSlotProfile<1, WaferIndex> EQ '' + Until SlotIsEmpty EQ False$ + Next WaferIndex Case Slot EQ 'L' - WaferIndex = 25 + For WaferIndex = 25 to 1 Step -1 + SlotIsEmpty = WOMatSlotProfile<1, WaferIndex> EQ '' + Until SlotIsEmpty EQ False$ + Next WaferIndex Case Slot EQ 'A' WaferIndex = 1 Case Otherwise$ @@ -2221,9 +2228,27 @@ Service RemoveOldMetrology() end service +/* +ImportBioRadEPPFQAData +Modified and annotated by JRO 4/18/2025 +Written to import data specifically for EpiPro QA/FQA Thickness. +Note: Due to the nature of the forms used to validate EpiPro FQA, we currently only support single value data import. +If we wish to extend this to multi value data import than we need to write the values with Sub Value Marks at the Value Mark position of the test profile. +Then we also need to modify the form usage to support parsing those multi-values. +I am leaving the iterating methods in here with the possibility that we can extend this to support multi valued data should the business need it. +This service requires the following parameters: +1. RunData, The internal delimited run data from the parent calling routine ImportBioRadData. +The service does the following actions: +1. Parses through the run data to extract the WMO Lot id, reactor id, recipe id, and slot id. +2. Writes the data point to the slot position in the WM_OUT record - > MU_WAFER_THK_RESULT field, for all wafers whether they are MU wafers or not. + This allows us to detect that Any and all MU wafers have thickness data. +3. Reads the WO_MAT_QA record. +4. Iterates through WO_MAT_QA record -> PROFILE fields @VM values, IF the profile is 1ADE, or QA, or MO_QA then +5. Determines the spec slot by reading the WO_MAT_QA record -> SLOT field +6. If the detected RunDataSlot matches the spec slot, writes the datapoint to the WO_MAT_QA record - > RESULT field in the same @VM that the iterator is currently set to. +*/ +Service ImportBioRadEPPFQAData(RunData) -Service ImportBioRadEPPFQAData(RunData, FileName) - Timestamp = RunData<2> WMOKeyID = RunData<6> Swap '.' with '*' in WMOKeyID @@ -2232,12 +2257,15 @@ Service ImportBioRadEPPFQAData(RunData, FileName) RunDataLayer = RunData<8> ReactorID = RunData<5> ScanRecipe = RunData<4> + DataSlotId = RunData<11> + DataSlotId = SRP_Trim(DataSlotId, 'F', 0) FieldPos = 13 FieldPosIncrement = 2 Offset = 1 Decimals = 2 Positions = '' DataPoints = '' + WMORec = Database_Services('ReadDataRow', 'WM_OUT', WMOKeyID) WOMatQAKey = Field(WMOKeyID, '*', 1) : '*' : Field(WMOKeyID, '*', 3) Loop @@ -2257,9 +2285,7 @@ Service ImportBioRadEPPFQAData(RunData, FileName) Metrology_Services('LogResults', RDSNo@, Machine, 'UID001', Service : ' : ' : Error_Services('GetMessage')) end //Update the WM_OUT record for EpiPro - for each wafer in Positions using @VM setting dPos - WMORec = DataPoints<0, dPos> - Next wafer + WMORec = DataPoints Database_Services('WriteDataRow', 'WM_OUT', WMOKeyID, WMORec, True$, False$, True$) end else Metrology_Services('LogResults', RDSNo@, Machine, 'UID001', Service : ' : ' : Error_Services('GetMessage')) @@ -2279,19 +2305,28 @@ Service ImportBioRadEPPFQAData(RunData, FileName) Stage = Stages<0, pPos> If ( (Profile EQ '1ADE') and ( (Stage EQ 'QA') or (Stage EQ 'MO_QA') ) ) then Slot = Slots<0, pPos> + //There is a specific scenario where when the spec wafers are 1 and L, and there is a makeup wafer in each of the first and last slots, they would then want to + //measure the next open slot, either incremented down from the last wafer position or incremented up from the first wafer position. + //We may need to add that in when the definition becomes clearer. Begin Case - Case Slot EQ '1' - WaferIndex = 1 + Case Slot EQ '1' + For WaferIndex = 1 to 25 + SlotIsEmpty = Database_Services('ReadDataColumn', 'WM_OUT', WMOKeyID, WM_OUT_RDS$, True$, 0, False$)<1, WaferIndex> EQ '' + Until SlotIsEmpty EQ False$ + Next WaferIndex Case Slot EQ 'L' - WaferIndex = 25 + For WaferIndex = 25 to 1 Step -1 + SlotIsEmpty = Database_Services('ReadDataColumn', 'WM_OUT', WMOKeyID, WM_OUT_RDS$, True$, 0, False$)<1, WaferIndex> EQ '' + Until SlotIsEmpty EQ False$ + Next WaferIndex Case Slot EQ 'A' WaferIndex = 1 Case Otherwise$ WaferIndex = Slot End Case - Locate WaferIndex in Positions using @VM setting dPos then - WOMatQARec = DataPoints<0, dPos> - end + If DataSlotId EQ WaferIndex then + WOMatQARec = DataPoints + end end Next Profile Database_Services('WriteDataRow', 'WO_MAT_QA', WOMatQAID, WOMatQARec, True$, False$, True$) @@ -2967,3 +3002,4 @@ LoadRunDataToDatabase: return +