From 3debdce91e3dd6e3312d2bf9a51c58549db86fb6 Mon Sep 17 00:00:00 2001 From: Chase Tucker Date: Tue, 15 Jul 2025 20:52:07 -0700 Subject: [PATCH] Revert "RDS JSON caching to minimize processing" This reverts commit 4689b861d7fa72af7266888208e7d5a938bfd8e9. --- LSL2/STPROC/SCAN_SERVICES.txt | 1440 +++++++++++++++--------------- LSL2/STPROCINS/SCANS_EQUATES.txt | 3 - 2 files changed, 707 insertions(+), 736 deletions(-) diff --git a/LSL2/STPROC/SCAN_SERVICES.txt b/LSL2/STPROC/SCAN_SERVICES.txt index 7ec2162..6c9e9fb 100644 --- a/LSL2/STPROC/SCAN_SERVICES.txt +++ b/LSL2/STPROC/SCAN_SERVICES.txt @@ -327,9 +327,7 @@ Service ProcessScanData(ScanID, ScanJSON) Case Otherwise$ ScansRow = LotID - End Case - - ScansRow = True$ + End Case Case ScanData[1, 5] EQ 'RESET' ScansRow = 'RESET' @@ -337,7 +335,6 @@ Service ProcessScanData(ScanID, ScanJSON) ScansRow = '' ScansRow = '' ScansRow = '' - ScansRow = True$ Case ScanData[1, 2] EQ '1H' // Employee ID scan. Set the EMPLOYEE_ID column and check the @@ -370,7 +367,6 @@ Service ProcessScanData(ScanID, ScanJSON) ScansRow = Member ScansRow = True$ - ScansRow = True$ End Case Case ScanData[1, 3] EQ '10S' @@ -387,7 +383,6 @@ Service ProcessScanData(ScanID, ScanJSON) ToolRow = Database_Services('ReadDataRow', 'TOOL', ToolID) If Error_Services('NoError') then ScansRow = 'TOOL' - ScansRow = True$ ToolType = ToolRow<2> Begin Case Case ToolType _EQC 'Reactor' @@ -565,7 +560,6 @@ Service ProcessScanData(ScanID, ScanJSON) ScansRow = False$ ScansRow = False$ ScansRow = True$ - ScansRow = True$ Result = 'Override Performed successfully' end @@ -586,7 +580,6 @@ Service ProcessScanData(ScanID, ScanJSON) Locate TWLot in ThisScanTWLots using @VM setting twPOS then ScansRow = TWLotQuantity ScansRow = True$ - ScansRow = True$ end Case ScanData[1, 17] EQ 'TESTRUNTYPEUPDATE' @@ -609,8 +602,6 @@ Service ProcessScanData(ScanID, ScanJSON) ConfirmNote = 'Test wafer requirement acknowledged. [RDS:' : RDSNo : '], [WO:' : WO : '], [Cassette:' : CassNo : ']' Reactor_Log_Services('AddComment', Reactor, ConfirmNote, {EMPLOYEE_ID}) - ScansRow = True$ - Result = 'Test wafer requirement acknowledged' Case ScanData EQ '' // Most likely receiving RDS data, so nothing to do here. @@ -658,7 +649,6 @@ Service ProcessScanData(ScanID, ScanJSON) end else ScansRow = CassetteID end - ScansRow = True$ end else Error_Services('Add', CassetteID : ' is not a valid Cassette ID.') end @@ -699,91 +689,185 @@ Service ProcessScanData(ScanID, ScanJSON) // determine what the next action will be (i.e. Pre-Epi+Load, Unload, etc.). Ensure we are // working with an RDS and not a WM_IN or WM_OUT cassette ID. They are not used during the // "RDS" process. - If ScansRow NE False$ then - If (CassetteIDs NE '') then - TestWaferLotData = ScansRow - TestWaferLotChanged = ScansRow - Abort = False$ - TestWaferLotIsValid = False$ - If TestWaferLotData NE '' and TestWaferLotChanged NE False$ then - ThisTestRunType = ScansRow - If ThisTestRunType NE '' then - for each TWLot in TestWaferLotData using @VM setting twPOS - If ScansRow NE '' OR ScansRow GT 0 then - TWLotCurrQty = Database_Services('ReadDataColumn', 'LOT', TWLot, LOT_WAFER_QTY$, True$, 0, False$) - ThisCurrUsageQty = ScansRow - If TWLotCurrQty GT 0 then - If TWLotCurrQty GE ThisCurrUsageQty then - TWLotCurrOperation = Lot_Services('GetLotCurrOperationName', TWLot) - If TWLotCurrOperation NE 'TW_CREATE' AND TWLotCurrOperation NE 'TW_CLOSE' then - TWLotCurrOpen = Database_Services('ReadDataColumn', 'LOT', TWLot, LOT_OPEN$, True$, 0, False$) - If Not(TWLotCurrOpen) then - Abort = True$ - Scan_Services('AddNotAcceptableReason', 'Lot ':TWLot:' is closed and cannot be used at this time.') - end else - TestWaferLotIsValid = True$ - end - end else + If (CassetteIDs NE '') then + TestWaferLotData = ScansRow + TestWaferLotChanged = ScansRow + Abort = False$ + TestWaferLotIsValid = False$ + If TestWaferLotData NE '' and TestWaferLotChanged NE False$ then + ThisTestRunType = ScansRow + If ThisTestRunType NE '' then + for each TWLot in TestWaferLotData using @VM setting twPOS + If ScansRow NE '' OR ScansRow GT 0 then + TWLotCurrQty = Database_Services('ReadDataColumn', 'LOT', TWLot, LOT_WAFER_QTY$, True$, 0, False$) + ThisCurrUsageQty = ScansRow + If TWLotCurrQty GT 0 then + If TWLotCurrQty GE ThisCurrUsageQty then + TWLotCurrOperation = Lot_Services('GetLotCurrOperationName', TWLot) + If TWLotCurrOperation NE 'TW_CREATE' AND TWLotCurrOperation NE 'TW_CLOSE' then + TWLotCurrOpen = Database_Services('ReadDataColumn', 'LOT', TWLot, LOT_OPEN$, True$, 0, False$) + If Not(TWLotCurrOpen) then Abort = True$ - Scan_Services('AddNotAcceptableReason', 'Lot ':TWLot:' is currently at ':TWLotCurrOperation:' and cannot be used at this time.') + Scan_Services('AddNotAcceptableReason', 'Lot ':TWLot:' is closed and cannot be used at this time.') + end else + TestWaferLotIsValid = True$ end end else - Scan_Services('AddNotAcceptableReason', 'Test wafer Lot ':TWLot:' does not have enough wafers. Please select ' : TWLotCurrQty : ' wafers or less.') + Abort = True$ + Scan_Services('AddNotAcceptableReason', 'Lot ':TWLot:' is currently at ':TWLotCurrOperation:' and cannot be used at this time.') end end else - Scan_Services('AddNotAcceptableReason', 'Test wafer Lot ':TWLot:' has no wafers and cannot be logged for usage.') - end + Scan_Services('AddNotAcceptableReason', 'Test wafer Lot ':TWLot:' does not have enough wafers. Please select ' : TWLotCurrQty : ' wafers or less.') + end end else - Abort = True$ - Scan_Services('AddNotAcceptableReason', 'Test Wafer Lot ':TWLot:' must have a quantity associated with it.') - end - Until Abort - Next TWLot - end else - Scan_Services('AddNotAcceptableReason', 'A test run type is required to log test wafer usage.') - end + Scan_Services('AddNotAcceptableReason', 'Test wafer Lot ':TWLot:' has no wafers and cannot be logged for usage.') + end + end else + Abort = True$ + Scan_Services('AddNotAcceptableReason', 'Test Wafer Lot ':TWLot:' must have a quantity associated with it.') + end + Until Abort + Next TWLot + end else + Scan_Services('AddNotAcceptableReason', 'A test run type is required to log test wafer usage.') end - // Ensure only one cassette is scanned - If Not(Abort) then - If (NumCass EQ 1) then - CassetteID = CassetteIDs<0, NumCass> - // Ensure we are working with an RDS and not a WM_OUT/WM_IN cassette - If (Count(CassetteID, '.') EQ 0) then - - RDSNo = CassetteID - RDSRec = Database_Services('ReadDataRow', 'RDS', RDSNo) - - WONo = RDSRec - CassNo = RDSRec - CurrStatus = obj_WO_Mat('CurrStatus', WONo:'*':CassNo) - - - // RDS Format - IsEpiPro = RDS_Services('IsEpiPro', CassetteID) - If IsEpiPro EQ False$ then - // Non-EpiPro RDS + end + // Ensure only one cassette is scanned + If Not(Abort) then + If (NumCass EQ 1) then + CassetteID = CassetteIDs<0, NumCass> + // Ensure we are working with an RDS and not a WM_OUT/WM_IN cassette + If (Count(CassetteID, '.') EQ 0) then + + RDSNo = CassetteID + RDSRec = Database_Services('ReadDataRow', 'RDS', RDSNo) + + WONo = RDSRec + CassNo = RDSRec + CurrStatus = obj_WO_Mat('CurrStatus', WONo:'*':CassNo) + + + // RDS Format + IsEpiPro = RDS_Services('IsEpiPro', CassetteID) + If IsEpiPro EQ False$ then + // Non-EpiPro RDS + WONo = Xlate('RDS', CassetteID, 'WO', 'X') + CassNo = Xlate('RDS', CassetteID, 'CASS_NO', 'X') + WOMatKey = WONo:'*':CassNo + WOMatLocs = Xlate('WO_MAT', WOMatKey, WO_MAT_INV_LOCATION$, 'X') + If Index(WOMatLocs,'PTI',1) else Error_Services('Add', 'Cassette ':CassetteID:' failed due to missing PTI.') + end else + // EpiPro RDS + OutCassNos = Xlate('RDS', CassetteID, 'OUT_CASS_NO', 'X') + OutCassNos = SRP_Array('Clean', OutCassNos, 'TrimAndMakeUnique', @VM) + For each OutCassNo in OutCassNos using @VM setting oPos WONo = Xlate('RDS', CassetteID, 'WO', 'X') - CassNo = Xlate('RDS', CassetteID, 'CASS_NO', 'X') + CassNo = OutCassNo WOMatKey = WONo:'*':CassNo WOMatLocs = Xlate('WO_MAT', WOMatKey, WO_MAT_INV_LOCATION$, 'X') - If Index(WOMatLocs,'PTI',1) else Error_Services('Add', 'Cassette ':CassetteID:' failed due to missing PTI.') - end else - // EpiPro RDS - OutCassNos = Xlate('RDS', CassetteID, 'OUT_CASS_NO', 'X') - OutCassNos = SRP_Array('Clean', OutCassNos, 'TrimAndMakeUnique', @VM) - For each OutCassNo in OutCassNos using @VM setting oPos - WONo = Xlate('RDS', CassetteID, 'WO', 'X') - CassNo = OutCassNo - WOMatKey = WONo:'*':CassNo - WOMatLocs = Xlate('WO_MAT', WOMatKey, WO_MAT_INV_LOCATION$, 'X') - If Index(WOMatLocs,'PTI',1) else Error_Services('Add', 'Cassette ':CassetteID:' failed due to missing PTI.') - Next OutCassNo - end - - If Error_Services('NoError') then - If CurrStatus NE 'HOLD' then - If (EmployeeID NE '') then - * SupplInstAckReq = Xlate('RDS', RDSNo, 'SUPPL_ACK_REQ' , 'X') + If Index(WOMatLocs,'PTI',1) else Error_Services('Add', 'Cassette ':CassetteID:' failed due to missing PTI.') + Next OutCassNo + end + + If Error_Services('NoError') then + If CurrStatus NE 'HOLD' then + If (EmployeeID NE '') then + * SupplInstAckReq = Xlate('RDS', RDSNo, 'SUPPL_ACK_REQ' , 'X') + CurrStage = Xlate('RDS', RDSNo, 'CURR_STAGE', 'X') + If CurrStage EQ 'VER' then + VerSupplID = Supplement_Services('UnacknowledgedSupplementCheck', 'RDS', RDSNo, 'VER') + If VerSupplID NE False$ then + SupplVerInstAckReq = True$ + end else + SupplVerInstAckReq = False$ + end + end else + SupplVerInstAckReq = False$ + end + + If CurrStage EQ 'LOAD' OR CurrStage EQ 'VER' then + LoadSupplID = Supplement_Services('UnacknowledgedSupplementCheck', 'RDS', RDSNo, 'LOAD') + If LoadSupplID NE False$ then + SupplLoadInstAckReq = True$ + end else + SupplLoadInstAckReq = False$ + end + end else + SupplLoadInstAckReq = False$ + end + + If CurrStage EQ 'UNLOAD' then + UnloadSupplID = Supplement_Services('UnacknowledgedSupplementCheck', 'RDS', RDSNo, 'UNLOAD') + If UnloadSupplID NE False$ then + SupplUnloadInstAckReq = True$ + end else + SupplUnloadInstAckReq = False$ + end + end else + SupplUnloadInstAckReq = False$ + end + + If CurrStage EQ 'POST' then + PostSupplID = Supplement_Services('UnacknowledgedSupplementCheck', 'RDS', RDSNo, 'POST') + If PostSupplID NE False$ then + SupplPostInstAckReq = True$ + end else + SupplPostInstAckReq = False$ + end + end else + SupplPostInstAckReq = False$ + end + + RDSLayerInstAckReq = Xlate('RDS', RDSNo, 'RDS_LAYER_ACK_REQ' , 'X') + PreInstAckReq = Xlate('RDS', RDSNo, 'PRE_INST_ACK_REQ' , 'X') + FwiInstAckReq = Xlate('RDS', RDSNo, 'FWI_INST_ACK_REQ' , 'X') + LwiInstAckReq = Xlate('RDS', RDSNo, 'LWI_INST_ACK_REQ' , 'X') + QAInstAckReq = Xlate('RDS', RDSNo, 'QA_INST_ACK_REQ' , 'X') + LoadInstAckReq = Xlate('RDS', RDSNo, 'LOAD_INST_ACK_REQ' , 'X') + UnloadInstAckReq = Xlate('RDS', RDSNo, 'UNLOAD_INST_ACK_REQ' , 'X') + PostInstAckReq = Xlate('RDS', RDSno, 'POST_INST_ACK_REQ' , 'X') + WaferCountInstAckReq = Xlate('RDS', RDSNo, 'WAFER_COUNT_ACK_REQ' , 'X') + // Parse JSON objects + hRDS = SRP_JSON(hScanJSON, 'Get', 'rds') + If (hRDS NE 0) then + + If (SupplVerInstAckReq NE False$) then + SupplAck = SRP_JSON(hRDS, 'GetValue', 'supplVerInstAck') + If (SupplAck EQ True$) then + Supplement_Services('AcknowledgeSupplement', VerSupplID, ScansRow) + end + end + If (SupplLoadInstAckReq NE False$) then + SupplAck = SRP_JSON(hRDS, 'GetValue', 'supplLoadInstAck') + If (SupplAck EQ True$) then + Supplement_Services('AcknowledgeSupplement', LoadSupplID, ScansRow) + end + end + If (SupplUnloadInstAckReq NE False$) then + SupplAck = SRP_JSON(hRDS, 'GetValue', 'supplUnloadInstAck') + If (SupplAck EQ True$) then + Supplement_Services('AcknowledgeSupplement', UnloadSupplID, ScansRow) + end + end + If (SupplPostInstAckReq NE False$) then + SupplAck = SRP_JSON(hRDS, 'GetValue', 'supplPostInstAck') + If (SupplAck EQ True$) then + Supplement_Services('AcknowledgeSupplement', PostSupplID, ScansRow) + end + end + If RDSLayerInstAckReq then RDSRec = SRP_JSON(hRDS, 'GetValue', 'rdsLayerInstAck') + If PreInstAckReq then RDSRec = SRP_JSON(hRDS, 'GetValue', 'preInstAck') + If FwiInstAckReq then RDSRec = SRP_JSON(hRDS, 'GetValue', 'fwiInstAck') + If LwiInstAckReq then RDSRec = SRP_JSON(hRDS, 'GetValue', 'lwiInstAck') + If QAInstAckReq then RDSRec = SRP_JSON(hRDS, 'GetValue', 'qaInstAck') + If LoadInstAckReq then RDSRec = SRP_JSON(hRDS, 'GetValue', 'loadInstAck') + If UnloadInstAckReq then RDSRec = SRP_JSON(hRDS, 'GetValue', 'unloadInstAck') + If PostInstAckReq then RDSRec = SRP_JSON(hRDS, 'GetValue', 'postInstAck') + If WaferCountInstAckReq then RDSRec = SRP_JSON(hRDS, 'GetValue', 'waferCountInstAck') + + Database_Services('WriteDataRow', 'RDS', RDSNo, RDSRec, True$, False$, True$) + + * SupplInstAckReq = Xlate('RDS', RDSNo, 'SUPPL_ACK_REQ' , 'X') CurrStage = Xlate('RDS', RDSNo, 'CURR_STAGE', 'X') If CurrStage EQ 'VER' then VerSupplID = Supplement_Services('UnacknowledgedSupplementCheck', 'RDS', RDSNo, 'VER') @@ -813,7 +897,7 @@ Service ProcessScanData(ScanID, ScanJSON) SupplUnloadInstAckReq = True$ end else SupplUnloadInstAckReq = False$ - end + end end else SupplUnloadInstAckReq = False$ end @@ -836,457 +920,362 @@ Service ProcessScanData(ScanID, ScanJSON) QAInstAckReq = Xlate('RDS', RDSNo, 'QA_INST_ACK_REQ' , 'X') LoadInstAckReq = Xlate('RDS', RDSNo, 'LOAD_INST_ACK_REQ' , 'X') UnloadInstAckReq = Xlate('RDS', RDSNo, 'UNLOAD_INST_ACK_REQ' , 'X') - PostInstAckReq = Xlate('RDS', RDSno, 'POST_INST_ACK_REQ' , 'X') + PostInstAckReq = Xlate('RDS', RDSNo, 'POST_INST_ACK_REQ' , 'X') WaferCountInstAckReq = Xlate('RDS', RDSNo, 'WAFER_COUNT_ACK_REQ' , 'X') - // Parse JSON objects - hRDS = SRP_JSON(hScanJSON, 'Get', 'rds') - If (hRDS NE 0) then - - If (SupplVerInstAckReq NE False$) then - SupplAck = SRP_JSON(hRDS, 'GetValue', 'supplVerInstAck') - If (SupplAck EQ True$) then - Supplement_Services('AcknowledgeSupplement', VerSupplID, ScansRow) - end - end - If (SupplLoadInstAckReq NE False$) then - SupplAck = SRP_JSON(hRDS, 'GetValue', 'supplLoadInstAck') - If (SupplAck EQ True$) then - Supplement_Services('AcknowledgeSupplement', LoadSupplID, ScansRow) - end - end - If (SupplUnloadInstAckReq NE False$) then - SupplAck = SRP_JSON(hRDS, 'GetValue', 'supplUnloadInstAck') - If (SupplAck EQ True$) then - Supplement_Services('AcknowledgeSupplement', UnloadSupplID, ScansRow) - end - end - If (SupplPostInstAckReq NE False$) then - SupplAck = SRP_JSON(hRDS, 'GetValue', 'supplPostInstAck') - If (SupplAck EQ True$) then - Supplement_Services('AcknowledgeSupplement', PostSupplID, ScansRow) - end - end - If RDSLayerInstAckReq then RDSRec = SRP_JSON(hRDS, 'GetValue', 'rdsLayerInstAck') - If PreInstAckReq then RDSRec = SRP_JSON(hRDS, 'GetValue', 'preInstAck') - If FwiInstAckReq then RDSRec = SRP_JSON(hRDS, 'GetValue', 'fwiInstAck') - If LwiInstAckReq then RDSRec = SRP_JSON(hRDS, 'GetValue', 'lwiInstAck') - If QAInstAckReq then RDSRec = SRP_JSON(hRDS, 'GetValue', 'qaInstAck') - If LoadInstAckReq then RDSRec = SRP_JSON(hRDS, 'GetValue', 'loadInstAck') - If UnloadInstAckReq then RDSRec = SRP_JSON(hRDS, 'GetValue', 'unloadInstAck') - If PostInstAckReq then RDSRec = SRP_JSON(hRDS, 'GetValue', 'postInstAck') - If WaferCountInstAckReq then RDSRec = SRP_JSON(hRDS, 'GetValue', 'waferCountInstAck') - - Database_Services('WriteDataRow', 'RDS', RDSNo, RDSRec, True$, False$, True$) - - * SupplInstAckReq = Xlate('RDS', RDSNo, 'SUPPL_ACK_REQ' , 'X') - CurrStage = Xlate('RDS', RDSNo, 'CURR_STAGE', 'X') - If CurrStage EQ 'VER' then - VerSupplID = Supplement_Services('UnacknowledgedSupplementCheck', 'RDS', RDSNo, 'VER') - If VerSupplID NE False$ then - SupplVerInstAckReq = True$ - end else - SupplVerInstAckReq = False$ - end - end else - SupplVerInstAckReq = False$ - end - - If CurrStage EQ 'LOAD' OR CurrStage EQ 'VER' then - LoadSupplID = Supplement_Services('UnacknowledgedSupplementCheck', 'RDS', RDSNo, 'LOAD') - If LoadSupplID NE False$ then - SupplLoadInstAckReq = True$ - end else - SupplLoadInstAckReq = False$ - end - end else - SupplLoadInstAckReq = False$ - end - - If CurrStage EQ 'UNLOAD' then - UnloadSupplID = Supplement_Services('UnacknowledgedSupplementCheck', 'RDS', RDSNo, 'UNLOAD') - If UnloadSupplID NE False$ then - SupplUnloadInstAckReq = True$ - end else - SupplUnloadInstAckReq = False$ - end - end else - SupplUnloadInstAckReq = False$ - end - - If CurrStage EQ 'POST' then - PostSupplID = Supplement_Services('UnacknowledgedSupplementCheck', 'RDS', RDSNo, 'POST') - If PostSupplID NE False$ then - SupplPostInstAckReq = True$ - end else - SupplPostInstAckReq = False$ - end - end else - SupplPostInstAckReq = False$ - end - - RDSLayerInstAckReq = Xlate('RDS', RDSNo, 'RDS_LAYER_ACK_REQ' , 'X') - PreInstAckReq = Xlate('RDS', RDSNo, 'PRE_INST_ACK_REQ' , 'X') - FwiInstAckReq = Xlate('RDS', RDSNo, 'FWI_INST_ACK_REQ' , 'X') - LwiInstAckReq = Xlate('RDS', RDSNo, 'LWI_INST_ACK_REQ' , 'X') - QAInstAckReq = Xlate('RDS', RDSNo, 'QA_INST_ACK_REQ' , 'X') - LoadInstAckReq = Xlate('RDS', RDSNo, 'LOAD_INST_ACK_REQ' , 'X') - UnloadInstAckReq = Xlate('RDS', RDSNo, 'UNLOAD_INST_ACK_REQ' , 'X') - PostInstAckReq = Xlate('RDS', RDSNo, 'POST_INST_ACK_REQ' , 'X') - WaferCountInstAckReq = Xlate('RDS', RDSNo, 'WAFER_COUNT_ACK_REQ' , 'X') - - SRP_JSON(hRDS, 'Release') - end - ToolID = ScansRow - Reactor = ToolID[-1, 'BR'] - Username = ScansRow - WaferCountAck = RDSRec - LLSide = ScansRow - WaferQty = '' - If WaferCountAck EQ True$ then - WaferQty = RDSRec - end else - WaferQty = RDSRec - end - // Check signature fields to determine where the lot is in the RDS process. The service should - // use the signatures in the RDS table, not the WO_MAT table, so that we can support both - // EpiPro and non-EpiPro lots. - WONo = RDSRec - CassNo = RDSRec - CurrStatus = obj_WO_Mat('CurrStatus', WONo:'*':CassNo) - CurrStage = Xlate('RDS', RDSNo, 'CURR_STAGE', 'X') + SRP_JSON(hRDS, 'Release') + end + + ToolID = ScansRow + Reactor = ToolID[-1, 'BR'] + Username = ScansRow + WaferCountAck = RDSRec + LLSide = ScansRow + WaferQty = '' + If WaferCountAck EQ True$ then + WaferQty = RDSRec + end else + WaferQty = RDSRec + end + // Check signature fields to determine where the lot is in the RDS process. The service should + // use the signatures in the RDS table, not the WO_MAT table, so that we can support both + // EpiPro and non-EpiPro lots. + WONo = RDSRec + CassNo = RDSRec + CurrStatus = obj_WO_Mat('CurrStatus', WONo:'*':CassNo) + CurrStage = Xlate('RDS', RDSNo, 'CURR_STAGE', 'X') + + Begin Case - Begin Case + Case CurrStage _EQC 'VER' + Action = 'LOAD' - Case CurrStage _EQC 'VER' - Action = 'LOAD' - - // Check if both the PRE and LOAD stages are ready to sign - // If a Pre Clean is required, then the OpenInsight UI must be used for now until support for cleans operations - // is added to the barcode web application. - LotNo = RDSRec - PreCleanReq = False$ - CleanInspKeyID = Xlate('RDS', RDSNo, 'PRE_CI_NO', 'X') - * If CleanInspKeyID NE '' then PreCleanReq = Xlate('CLEAN_INSP', CleanInspKeyID, 'SPEC_CLEAN_REQ', 'X') - PSN = RDSRec - PrePRSStageKey = PSN:'*PRE' - PreCleanReq = Xlate('PRS_STAGE', PrePRSStageKey, 'CLEAN_SIG_REQ', 'X') - - If ( (PreCleanReq EQ False$) or (PreCleanReq EQ '') ) then - // The first run on a reactor requires that RDS Layer parameters be entered manually. This is when Prove-in - // occurs. - RunOrderNo = Xlate('RDS', RDSNo, 'RUN_ORDER_NUM', 'X') - If RunOrderNo GT 1 then - // Wafer is eligible to have recipe parameters automatically applied from the previous cassette. - // Only copy RDS layer parameters if they do not already exist. This way we do not overwrite - // manually entered parameters. - LSParmsComp = Xlate('RDS', RDSNo, 'LS_PARMS_COMP', 'X') - FirstParmsComp = LSParmsComp<1,1> - If (FirstParmsComp EQ False$) then RDS_Services('CopyRDSLayerParameters', RDSNo) - //Test Wafer logging verification - - - // Supplier lot verification - ScannedSuppLot = ScansRow - RDSSuppLot = RDSRec - If (ScannedSuppLot NE '') then - If (ScannedSuppLot _EQC RDSSuppLot) then - IsTWLoggingReqd = RDS_Services('IsTWLoggingReqd', RDSNo) - If IsTWLoggingReqd NE True$ OR TestWaferLotData NE '' then - WaferCountAckReq = Xlate('RDS', RDSNo, 'WAFER_COUNT_ACK_REQ', 'X') - If WaferCountAckReq EQ False$ then - PreStageReady = '' - LoadStageReady = '' - PreStageReady = QA_Services('PreEpiSignatureReady', RDSNo, Username, WaferQty, Reactor) - If PreStageReady EQ True$ then - LoadStageReady = QA_Services('LoadSignatureReady', RDSNo, Username, WaferQty, LLSide, True$, Reactor) - If (LoadStageReady NE True$) then - // Why is it not ready? - ErrorMsg = Error_Services('GetMessage') - Begin Case - Case IndexC(ErrorMsg, 'supplement', 1) - // Clear the error to return a JSON payload and handle the acknowledgements. - Error_Services('Clear') - Scan_Services('AddNotAcceptableReason', ErrorMsg) - Case IndexC(ErrorMsg, 'ROTR', 1) - ROTRBlock = Database_Services('ReadDataColumn', 'REACTOR', Reactor, REACTOR_ROTR_STATUS$, True$, 0, False$) - ROTRBlockReason = Database_Services('ReadDataColumn', 'REACTOR', Reactor, REACTOR_ROTR_STATUS_REASON$, True$, 0, False$) - ROTREnabled = Database_Services('ReadDataColumn', 'REACTOR', Reactor, REACTOR_ENABLE_ROTR$, True$, 0, False$) - If ( (ROTRBlock NE 'P') AND (ROTREnabled EQ True$) ) then - // Clear the error to return a JSON payload and allow for OVERRIDE scan. - ScansRow = True$ - ScansRow = ROTRBlockReason - ScansRow = 'ROTR' - Error_Services('Clear') - Scan_Services('AddNotAcceptableReason', "ROTR Load Block Enabled") - end else - ScansRow = False$ - ScansRow = '' - ScansRow = '' - end - End Case - end - end else + // Check if both the PRE and LOAD stages are ready to sign + // If a Pre Clean is required, then the OpenInsight UI must be used for now until support for cleans operations + // is added to the barcode web application. + LotNo = RDSRec + PreCleanReq = False$ + CleanInspKeyID = Xlate('RDS', RDSNo, 'PRE_CI_NO', 'X') + * If CleanInspKeyID NE '' then PreCleanReq = Xlate('CLEAN_INSP', CleanInspKeyID, 'SPEC_CLEAN_REQ', 'X') + PSN = RDSRec + PrePRSStageKey = PSN:'*PRE' + PreCleanReq = Xlate('PRS_STAGE', PrePRSStageKey, 'CLEAN_SIG_REQ', 'X') + + If ( (PreCleanReq EQ False$) or (PreCleanReq EQ '') ) then + // The first run on a reactor requires that RDS Layer parameters be entered manually. This is when Prove-in + // occurs. + RunOrderNo = Xlate('RDS', RDSNo, 'RUN_ORDER_NUM', 'X') + If RunOrderNo GT 1 then + // Wafer is eligible to have recipe parameters automatically applied from the previous cassette. + // Only copy RDS layer parameters if they do not already exist. This way we do not overwrite + // manually entered parameters. + LSParmsComp = Xlate('RDS', RDSNo, 'LS_PARMS_COMP', 'X') + FirstParmsComp = LSParmsComp<1,1> + If (FirstParmsComp EQ False$) then RDS_Services('CopyRDSLayerParameters', RDSNo) + //Test Wafer logging verification + + + // Supplier lot verification + ScannedSuppLot = ScansRow + RDSSuppLot = RDSRec + If (ScannedSuppLot NE '') then + If (ScannedSuppLot _EQC RDSSuppLot) then + IsTWLoggingReqd = RDS_Services('IsTWLoggingReqd', RDSNo) + If IsTWLoggingReqd NE True$ OR TestWaferLotData NE '' then + WaferCountAckReq = Xlate('RDS', RDSNo, 'WAFER_COUNT_ACK_REQ', 'X') + If WaferCountAckReq EQ False$ then + PreStageReady = '' + LoadStageReady = '' + PreStageReady = QA_Services('PreEpiSignatureReady', RDSNo, Username, WaferQty, Reactor) + If PreStageReady EQ True$ then + LoadStageReady = QA_Services('LoadSignatureReady', RDSNo, Username, WaferQty, LLSide, True$, Reactor) + If (LoadStageReady NE True$) then // Why is it not ready? ErrorMsg = Error_Services('GetMessage') Begin Case Case IndexC(ErrorMsg, 'supplement', 1) + // Clear the error to return a JSON payload and handle the acknowledgements. Error_Services('Clear') Scan_Services('AddNotAcceptableReason', ErrorMsg) - End Case - end - end else - Scan_Services('AddNotAcceptableReason', 'The cassette wafer count must be verified against the scheduled wafer count to proceed.') - end - end else - Scan_Services('AddNotAcceptableReason', 'Test wafers are required to be logged with this run.') - end - end else - ScansRow = '' - Error_Services('Add', '(':CassetteID:') Supplier lot mismatch.') - end - end else - Scan_Services('AddNotAcceptableReason', 'Supplier lot scan required in order to complete a tool scan.') - end - - end else - Error_Services('Add', '(':CassetteID:') The first run must be completed using the OpenInsight user interface.') - end - end else - Error_Services('Add', '(':CassetteID:') A pre-clean is required for this RDS. The OpenInsight user interface must be used to proceed.') - end - Case CurrStage _EQC 'LOAD' - Action = 'LOAD' - ScannedSuppLot = ScansRow - RDSSuppLot = RDSRec - If (ScannedSuppLot NE '') then - If (ScannedSuppLot _EQC RDSSuppLot) then - IsTWLoggingReqd = RDS_Services('IsTWLoggingReqd', RDSNo) - If IsTWLoggingReqd NE True$ OR TestWaferLotData NE '' then - // Scheduled tool verification (only supports reactors at the moment) - ClearSelect - SchedTool = Xlate('RDS', RDSNo, 'SCHED_REACTOR', 'X') - ClearSelect - SchedTool = 'R':SchedTool - ScanTool = ScansRow - If SchedTool EQ ScanTool then - // Check if LOAD stage is ready to sign - RDSLayerAckReq = Xlate('RDS', RDSNo, 'RDS_LAYER_ACK_REQ', 'X') - If RDSLayerAckReq EQ False$ then - If LWIInstAckReq EQ False$ then - If LoadInstAckReq EQ False$ then - LoadStageReady = QA_Services('LoadSignatureReady', RDSNo, Username, WaferQty, LLSide) - If (LoadStageReady NE True$) then - // Why is it not ready? - ErrorMsg = Error_Services('GetMessage') - Begin Case - Case IndexC(ErrorMsg, 'supplement', 1) - // Clear the error to return a JSON payload and handle the acknowledgements. + Case IndexC(ErrorMsg, 'ROTR', 1) + ROTRBlock = Database_Services('ReadDataColumn', 'REACTOR', Reactor, REACTOR_ROTR_STATUS$, True$, 0, False$) + ROTRBlockReason = Database_Services('ReadDataColumn', 'REACTOR', Reactor, REACTOR_ROTR_STATUS_REASON$, True$, 0, False$) + ROTREnabled = Database_Services('ReadDataColumn', 'REACTOR', Reactor, REACTOR_ENABLE_ROTR$, True$, 0, False$) + If ( (ROTRBlock NE 'P') AND (ROTREnabled EQ True$) ) then + // Clear the error to return a JSON payload and allow for OVERRIDE scan. + ScansRow = True$ + ScansRow = ROTRBlockReason + ScansRow = 'ROTR' Error_Services('Clear') - Scan_Services('AddNotAcceptableReason', ErrorMsg) - Case IndexC(ErrorMsg, 'ROTR', 1) - ROTRBlock = Database_Services('ReadDataColumn', 'REACTOR', Reactor, REACTOR_ROTR_STATUS$, True$, 0, False$) - ROTRBlockReason = Database_Services('ReadDataColumn', 'REACTOR', Reactor, REACTOR_ROTR_STATUS_REASON$, True$, 0, False$) - ROTREnabled = Database_Services('ReadDataColumn', 'REACTOR', Reactor, REACTOR_ENABLE_ROTR$, True$, 0, False$) - If ( (ROTRBlock NE 'P') AND (ROTREnabled EQ True$) ) then - // Clear the error to return a JSON payload and allow for OVERRIDE scan. - ScansRow = True$ - ScansRow = ROTRBlockReason - ScansRow = 'ROTR' - Error_Services('Clear') - Scan_Services('AddNotAcceptableReason', "ROTR Load Block Enabled") - end else - ScansRow = False$ - ScansRow = '' - ScansRow = '' - end - End Case - end - end else - Scan_Services('AddNotAcceptableReason', 'The LOAD stage engineering instructions must be acknowledged before the load operation can be signed.') + Scan_Services('AddNotAcceptableReason', "ROTR Load Block Enabled") + end else + ScansRow = False$ + ScansRow = '' + ScansRow = '' + end + End Case end end else - Scan_Services('AddNotAcceptableReason', 'The LWI stage engineering instructions must be acknowledged before the load operation can be signed.') - end - end else - ErrorMessage = 'RDS layer parameters must be reviewed for accuracy and acknowledged before the load operation can be signed.' - Scan_Services('AddNotAcceptableReason', ErrorMessage) - end - end else - Error_Services('Add', 'Scanned tool ':ScanTool:' does not match the scheduled tool ':SchedTool:'. (':RDSNo:')') - end - end else - Scan_Services('AddNotAcceptableReason', 'Test wafers are required to be logged with this run.') - end - end else - - ScansRow = '' - Error_Services('Add', '(':CassetteID:') Supplier lot mismatch.') - end - end else - Scan_Services('AddNotAcceptableReason', 'Supplier lot scan required in order to complete a tool scan.') - end - - Case CurrStage _EQC 'UNLOAD' - Action = 'UNLOAD' - // Check if UNLOAD stage is ready to sign - If ( (LWIInstAckReq EQ False$) or (LWIInstAckReq EQ '') ) then - - If ( (UnloadInstAckReq EQ False$) or (UnloadInstAckReq EQ '') ) then - If ( (PostInstAckReq EQ False$) or (PostInstAckReq EQ '') ) then - UnloadStageReady = QA_Services('UnloadSignatureReady', RDSNo, Username, Reactor) - If Not(UnloadStageReady) then - // Why is it not ready? - ErrorMsg = Error_Services('GetMessage') - Begin Case - Case IndexC(ErrorMsg, 'supplement', 1) - Error_Services('Clear') - Scan_Services('AddNotAcceptableReason', ErrorMsg) - Case Otherwise$ - // Keep error on Error_Services stack and return 400 level error. - End Case - end else - ReactorNo = Xlate('RDS', RDSNo, RDS_REACTOR$, 'X') - ReactorType = Xlate('REACTOR', ReactorNo, REACTOR_REACT_TYPE$, 'X') - If Len(ReactorType) GE 3 and ReactorType[1, 3] _EQC 'HTR' then - WO = Xlate('RDS', RDSNo, RDS_WO$, 'X') - CassNo = Xlate('RDS', RDSNo, 'RUN_ORDER_NUM', 'X') - WoMatKey = WO:'*':CassNo - WoMatRec = Database_Services('ReadDataRow', 'WO_MAT', WoMatKey) - LastCassInWoTestWaferAckReq = WoMatRec - LastCassInWoTestWaferAcked = WoMatRec - LastCassInWoTestWaferReqMsg = '' - If LastCassInWoTestWaferAcked EQ False$ or LastCassInWoTestWaferAcked EQ '' then - LastCassInWo = WO_MAT_Services('CassetteIsLastInWo', WoMatKey) - - If LastCassInWo then - NextEventScheduled = False$ - NextEventHasSamePsn = True$ - NextEventIsBlock = False$ - - NextScheduledEvent = Schedule_Services('GetNextEvent', ReactorNo) - If Error_Services('NoError') then - NextEventScheduled = True$ - - NextEventHasSamePsn = Schedule_Services('NextEventIsSamePsn', ReactorNo) - NextEventIsBlock = Schedule_Services('NextEventIsBlock', ReactorNo) - end - - If NextEventScheduled EQ False$ or NextEventHasSamePsn EQ False$ or NextEventIsBlock EQ True$ then - LastCassInWoTestWaferAckReq = True$ - WoMatRec = LastCassInWoTestWaferAckReq - TestWaferRanSinceLoad = WoMatRec or TestWaferLotIsValid EQ True$ - - If TestWaferLotIsValid NE True$ and TestWaferRanSinceLoad NE True$ then - TestWaferRanSinceLoad = Rds_Services('TestWaferRanAfterLoad', RDSNo) - - If TestWaferRanSinceLoad NE True$ then - LastCassInWoTestWaferReqMsg = '' - If NextEventScheduled EQ False$ or NextEventIsBlock EQ True$ then - LastCassInWoTestWaferReqMsg = 'No material scheduled. Test wafer required.' - end else If NextEventHasSamePsn EQ False$ then - LastCassInWoTestWaferReqMsg = 'Next work order is a NEW PSN number. Test wafer required.' - end - - Scan_Services('AddNotAcceptableReason', LastCassInWoTestWaferReqMsg) - end - end - - WoMatRec = TestWaferRanSinceLoad - - Database_Services('WriteDataRow', 'WO_MAT', WoMatKey, WoMatRec, True$, False$, False$) - end - end + // Why is it not ready? + ErrorMsg = Error_Services('GetMessage') + Begin Case + Case IndexC(ErrorMsg, 'supplement', 1) + Error_Services('Clear') + Scan_Services('AddNotAcceptableReason', ErrorMsg) + End Case end + end else + Scan_Services('AddNotAcceptableReason', 'The cassette wafer count must be verified against the scheduled wafer count to proceed.') end + end else + Scan_Services('AddNotAcceptableReason', 'Test wafers are required to be logged with this run.') end end else - ScanMsg = 'The POST stage engineering instructions must be acknowledged before the load operation can be signed.' - Scan_Services('AddNotAcceptableReason', ScanMsg) + ScansRow = '' + Error_Services('Add', '(':CassetteID:') Supplier lot mismatch.') end end else - ScanMsg = 'The UNLOAD stage engineering instructions must be acknowledged before the load operation can be signed.' - Scan_Services('AddNotAcceptableReason', ScanMsg) - end + Scan_Services('AddNotAcceptableReason', 'Supplier lot scan required in order to complete a tool scan.') + end + end else - ScanMsg = 'The LWI stage engineering instructions must be acknowledged before the load operation can be signed.' - Scan_Services('AddNotAcceptableReason', ScanMsg) - end - Case CurrStage _EQC 'COMP' - Action = 'COMP' - Error_Services('Add', '(':CassetteID:") Cassette has already been FQA'd.") - Case Otherwise$ - Action = CurrStage - Error_Services('Set', '(':CassetteID:') The ':CurrStage:' is not currently supported by the barcode application.') - End Case - end else - Scan_Services('AddNotAcceptableReason', 'EmployeeID required to complete a tool scan.') - end - end else - Error_Services('Add', '(':CassetteID:') Process Error: cassette is on Hold and may not be signed off.') - end - end - end else - Error_Services('Add', '(':CassetteID:') WMI/WMO cassette are not currently supported for tool scans. The OpenInsight user interface must be used in order to proceed.') - end - end else - // Currently we are only supporting loading one cassette onto a tool at a time. - Error_Services('Add', '(':CassetteID:') Only one cassette can be loaded onto a tool at a time.') - end - end - - end else - If ScansRow NE '' then - TestWaferLotChanged = ScansRow - ThisTestRunType = ScansRow - ThisUser = ScansRow - If TestWaferLotChanged NE False$ then - If ThisTestRunType NE '' then - If RowExists('LSL_USERS', ThisUser) then - TestWaferLotData = ScansRow - Abort = False$ - for each TWLot in TestWaferLotData using @VM setting twPOS - If ScansRow NE '' OR ScansRow GT 0 then - TWLotCurrQty = Database_Services('ReadDataColumn', 'LOT', TWLot, LOT_WAFER_QTY$, True$, 0, False$) - ThisCurrUsageQty = ScansRow - If TWLotCurrQty GT 0 then - If TWLotCurrQty GE ThisCurrUsageQty then - TWLotCurrOperation = Lot_Services('GetLotCurrOperationName', TWLot) - If TWLotCurrOperation NE 'TW_CREATE' AND TWLotCurrOperation NE 'TW_CLOSE' then - TWLotCurrOpen = Database_Services('ReadDataColumn', 'LOT', TWLot, LOT_OPEN$, True$, 0, False$) - If Not(TWLotCurrOpen) then - - Abort = True$ - Scan_Services('AddNotAcceptableReason', 'Lot ':TWLot:' is closed and cannot be used at this time.') + Error_Services('Add', '(':CassetteID:') The first run must be completed using the OpenInsight user interface.') + end + end else + Error_Services('Add', '(':CassetteID:') A pre-clean is required for this RDS. The OpenInsight user interface must be used to proceed.') + end + Case CurrStage _EQC 'LOAD' + Action = 'LOAD' + ScannedSuppLot = ScansRow + RDSSuppLot = RDSRec + If (ScannedSuppLot NE '') then + If (ScannedSuppLot _EQC RDSSuppLot) then + IsTWLoggingReqd = RDS_Services('IsTWLoggingReqd', RDSNo) + If IsTWLoggingReqd NE True$ OR TestWaferLotData NE '' then + // Scheduled tool verification (only supports reactors at the moment) + ClearSelect + SchedTool = Xlate('RDS', RDSNo, 'SCHED_REACTOR', 'X') + ClearSelect + SchedTool = 'R':SchedTool + ScanTool = ScansRow + If SchedTool EQ ScanTool then + // Check if LOAD stage is ready to sign + RDSLayerAckReq = Xlate('RDS', RDSNo, 'RDS_LAYER_ACK_REQ', 'X') + If RDSLayerAckReq EQ False$ then + If LWIInstAckReq EQ False$ then + If LoadInstAckReq EQ False$ then + LoadStageReady = QA_Services('LoadSignatureReady', RDSNo, Username, WaferQty, LLSide) + If (LoadStageReady NE True$) then + // Why is it not ready? + ErrorMsg = Error_Services('GetMessage') + Begin Case + Case IndexC(ErrorMsg, 'supplement', 1) + // Clear the error to return a JSON payload and handle the acknowledgements. + Error_Services('Clear') + Scan_Services('AddNotAcceptableReason', ErrorMsg) + Case IndexC(ErrorMsg, 'ROTR', 1) + ROTRBlock = Database_Services('ReadDataColumn', 'REACTOR', Reactor, REACTOR_ROTR_STATUS$, True$, 0, False$) + ROTRBlockReason = Database_Services('ReadDataColumn', 'REACTOR', Reactor, REACTOR_ROTR_STATUS_REASON$, True$, 0, False$) + ROTREnabled = Database_Services('ReadDataColumn', 'REACTOR', Reactor, REACTOR_ENABLE_ROTR$, True$, 0, False$) + If ( (ROTRBlock NE 'P') AND (ROTREnabled EQ True$) ) then + // Clear the error to return a JSON payload and allow for OVERRIDE scan. + ScansRow = True$ + ScansRow = ROTRBlockReason + ScansRow = 'ROTR' + Error_Services('Clear') + Scan_Services('AddNotAcceptableReason', "ROTR Load Block Enabled") + end else + ScansRow = False$ + ScansRow = '' + ScansRow = '' + end + End Case + end + end else + Scan_Services('AddNotAcceptableReason', 'The LOAD stage engineering instructions must be acknowledged before the load operation can be signed.') + end + end else + Scan_Services('AddNotAcceptableReason', 'The LWI stage engineering instructions must be acknowledged before the load operation can be signed.') + end + end else + ErrorMessage = 'RDS layer parameters must be reviewed for accuracy and acknowledged before the load operation can be signed.' + Scan_Services('AddNotAcceptableReason', ErrorMessage) + end + end else + Error_Services('Add', 'Scanned tool ':ScanTool:' does not match the scheduled tool ':SchedTool:'. (':RDSNo:')') + end + end else + Scan_Services('AddNotAcceptableReason', 'Test wafers are required to be logged with this run.') end end else - Abort = True$ - Scan_Services('AddNotAcceptableReason', 'Lot ':TWLot:' is currently at ':TWLotCurrOperation:' and cannot be used at this time.') + + ScansRow = '' + Error_Services('Add', '(':CassetteID:') Supplier lot mismatch.') end end else - Scan_Services('AddNotAcceptableReason', 'Test wafer Lot ':TWLot:' does not have enough wafers. Please select ' : TWLotCurrQty : ' wafers or less.') + Scan_Services('AddNotAcceptableReason', 'Supplier lot scan required in order to complete a tool scan.') end - end else - Scan_Services('AddNotAcceptableReason', 'Test wafer Lot ':TWLot:' has no wafers and cannot be logged for usage.') - end - end else - Abort = True$ - Scan_Services('AddNotAcceptableReason', 'Lot ':TWLot:' must have a quantity associated with it.') - end - Until Abort - Next TWLot + + Case CurrStage _EQC 'UNLOAD' + Action = 'UNLOAD' + // Check if UNLOAD stage is ready to sign + If ( (LWIInstAckReq EQ False$) or (LWIInstAckReq EQ '') ) then + + If ( (UnloadInstAckReq EQ False$) or (UnloadInstAckReq EQ '') ) then + If ( (PostInstAckReq EQ False$) or (PostInstAckReq EQ '') ) then + UnloadStageReady = QA_Services('UnloadSignatureReady', RDSNo, Username, Reactor) + If Not(UnloadStageReady) then + // Why is it not ready? + ErrorMsg = Error_Services('GetMessage') + Begin Case + Case IndexC(ErrorMsg, 'supplement', 1) + Error_Services('Clear') + Scan_Services('AddNotAcceptableReason', ErrorMsg) + Case Otherwise$ + // Keep error on Error_Services stack and return 400 level error. + End Case + end else + ReactorNo = Xlate('RDS', RDSNo, RDS_REACTOR$, 'X') + ReactorType = Xlate('REACTOR', ReactorNo, REACTOR_REACT_TYPE$, 'X') + If Len(ReactorType) GE 3 and ReactorType[1, 3] _EQC 'HTR' then + WO = Xlate('RDS', RDSNo, RDS_WO$, 'X') + CassNo = Xlate('RDS', RDSNo, 'RUN_ORDER_NUM', 'X') + WoMatKey = WO:'*':CassNo + WoMatRec = Database_Services('ReadDataRow', 'WO_MAT', WoMatKey) + LastCassInWoTestWaferAckReq = WoMatRec + LastCassInWoTestWaferAcked = WoMatRec + LastCassInWoTestWaferReqMsg = '' + If LastCassInWoTestWaferAcked EQ False$ or LastCassInWoTestWaferAcked EQ '' then + LastCassInWo = WO_MAT_Services('CassetteIsLastInWo', WoMatKey) + + If LastCassInWo then + NextEventScheduled = False$ + NextEventHasSamePsn = True$ + NextEventIsBlock = False$ + + NextScheduledEvent = Schedule_Services('GetNextEvent', ReactorNo) + If Error_Services('NoError') then + NextEventScheduled = True$ + + NextEventHasSamePsn = Schedule_Services('NextEventIsSamePsn', ReactorNo) + NextEventIsBlock = Schedule_Services('NextEventIsBlock', ReactorNo) + end + + If NextEventScheduled EQ False$ or NextEventHasSamePsn EQ False$ or NextEventIsBlock EQ True$ then + LastCassInWoTestWaferAckReq = True$ + WoMatRec = LastCassInWoTestWaferAckReq + TestWaferRanSinceLoad = WoMatRec or TestWaferLotIsValid EQ True$ + + If TestWaferLotIsValid NE True$ and TestWaferRanSinceLoad NE True$ then + TestWaferRanSinceLoad = Rds_Services('TestWaferRanAfterLoad', RDSNo) + + If TestWaferRanSinceLoad NE True$ then + LastCassInWoTestWaferReqMsg = '' + If NextEventScheduled EQ False$ or NextEventIsBlock EQ True$ then + LastCassInWoTestWaferReqMsg = 'No material scheduled. Test wafer required.' + end else If NextEventHasSamePsn EQ False$ then + LastCassInWoTestWaferReqMsg = 'Next work order is a NEW PSN number. Test wafer required.' + end + + Scan_Services('AddNotAcceptableReason', LastCassInWoTestWaferReqMsg) + end + end + + WoMatRec = TestWaferRanSinceLoad + + Database_Services('WriteDataRow', 'WO_MAT', WoMatKey, WoMatRec, True$, False$, False$) + end + end + end + end + end + end else + ScanMsg = 'The POST stage engineering instructions must be acknowledged before the load operation can be signed.' + Scan_Services('AddNotAcceptableReason', ScanMsg) + end + end else + ScanMsg = 'The UNLOAD stage engineering instructions must be acknowledged before the load operation can be signed.' + Scan_Services('AddNotAcceptableReason', ScanMsg) + end + end else + ScanMsg = 'The LWI stage engineering instructions must be acknowledged before the load operation can be signed.' + Scan_Services('AddNotAcceptableReason', ScanMsg) + end + Case CurrStage _EQC 'COMP' + Action = 'COMP' + Error_Services('Add', '(':CassetteID:") Cassette has already been FQA'd.") + Case Otherwise$ + Action = CurrStage + Error_Services('Set', '(':CassetteID:') The ':CurrStage:' is not currently supported by the barcode application.') + End Case + end else + Scan_Services('AddNotAcceptableReason', 'EmployeeID required to complete a tool scan.') + end end else - Scan_Services('AddNotAcceptableReason', 'A User ID Scan is required to log test wafer usage.') - end - end else - Scan_Services('AddNotAcceptableReason', 'A test run type is required to log test wafer usage.') + Error_Services('Add', '(':CassetteID:') Process Error: cassette is on Hold and may not be signed off.') + end end + end else + Error_Services('Add', '(':CassetteID:') WMI/WMO cassette are not currently supported for tool scans. The OpenInsight user interface must be used in order to proceed.') end end else - Scan_Services('AddNotAcceptableReason', 'A cassette must be scanned in order to complete a tool scan.') + // Currently we are only supporting loading one cassette onto a tool at a time. + Error_Services('Add', '(':CassetteID:') Only one cassette can be loaded onto a tool at a time.') end end + + end else + If ScansRow NE '' then + TestWaferLotChanged = ScansRow + ThisTestRunType = ScansRow + ThisUser = ScansRow + If TestWaferLotChanged NE False$ then + If ThisTestRunType NE '' then + If RowExists('LSL_USERS', ThisUser) then + TestWaferLotData = ScansRow + Abort = False$ + for each TWLot in TestWaferLotData using @VM setting twPOS + If ScansRow NE '' OR ScansRow GT 0 then + TWLotCurrQty = Database_Services('ReadDataColumn', 'LOT', TWLot, LOT_WAFER_QTY$, True$, 0, False$) + ThisCurrUsageQty = ScansRow + If TWLotCurrQty GT 0 then + If TWLotCurrQty GE ThisCurrUsageQty then + TWLotCurrOperation = Lot_Services('GetLotCurrOperationName', TWLot) + If TWLotCurrOperation NE 'TW_CREATE' AND TWLotCurrOperation NE 'TW_CLOSE' then + TWLotCurrOpen = Database_Services('ReadDataColumn', 'LOT', TWLot, LOT_OPEN$, True$, 0, False$) + If Not(TWLotCurrOpen) then + + Abort = True$ + Scan_Services('AddNotAcceptableReason', 'Lot ':TWLot:' is closed and cannot be used at this time.') + end + end else + Abort = True$ + Scan_Services('AddNotAcceptableReason', 'Lot ':TWLot:' is currently at ':TWLotCurrOperation:' and cannot be used at this time.') + end + end else + Scan_Services('AddNotAcceptableReason', 'Test wafer Lot ':TWLot:' does not have enough wafers. Please select ' : TWLotCurrQty : ' wafers or less.') + end + end else + Scan_Services('AddNotAcceptableReason', 'Test wafer Lot ':TWLot:' has no wafers and cannot be logged for usage.') + end + end else + Abort = True$ + Scan_Services('AddNotAcceptableReason', 'Lot ':TWLot:' must have a quantity associated with it.') + end + Until Abort + Next TWLot + end else + Scan_Services('AddNotAcceptableReason', 'A User ID Scan is required to log test wafer usage.') + end + end else + Scan_Services('AddNotAcceptableReason', 'A test run type is required to log test wafer usage.') + end + end + end else + Scan_Services('AddNotAcceptableReason', 'A cassette must be scanned in order to complete a tool scan.') + end end + Case Otherwise$ Scan_Services('AddNotAcceptableReason', 'A location ID or tool ID must be scanned to proceed.') End Case @@ -1757,7 +1746,6 @@ Service ConvertMVScanToJSON(ScanID, mvScan, itemURL) ParsingResult = SRP_JSON(TWLotJSON, 'Parse', TW_Lot_JSON) If ParsingResult EQ '' then SRP_JSON(objJSONScan, 'Set', 'testWaferLots', TWLotJSON) - SRP_JSON(TWLotJSON, 'Release') end end end @@ -1802,7 +1790,6 @@ Service ConvertMVScanToJSON(ScanID, mvScan, itemURL) ParsingResponse = SRP_JSON(hTRTypeOpts, 'Parse', TestRunTypeOptionsJson) If ParsingResponse EQ '' then SRP_JSON(objJSONScan, 'Set', 'testRunTypeOptions', hTRTypeOpts) - SRP_JSON(hTRTypeOpts, 'Release') end end end @@ -1845,7 +1832,6 @@ Service ConvertMVScanToJSON(ScanID, mvScan, itemURL) ParsingResult = SRP_JSON(hEmployeeJson, 'Parse', EmployeeJson) If ParsingResult EQ '' then SRP_JSON(objJSONScan, 'Set', 'employee', hEmployeeJson) - SRP_JSON(hEmployeeJson, 'Release') end end @@ -1936,244 +1922,225 @@ Service ConvertMVScanToJSON(ScanID, mvScan, itemURL) SRP_JSON(objJSONScan, 'SetValue', 'lastModified', {LAST_MODIFIED}, 'String') If {SCAN_TYPE} EQ 'TOOL' then - rdsJson = {RDS_JSON} - rdsChanged = {RDS_CHANGED} - ParsingResponse = '' - If rdsJson NE '' and rdsChanged EQ False$ then - ParsingResponse = SRP_JSON(hRdsJson, 'Parse', rdsJson) - If ParsingResponse EQ '' then - SRP_JSON(objJSONScan, 'Set', 'rds', hRdsJson) - SRP_JSON(hRdsJson, 'Release') - end - end - - If rdsJson EQ '' or rdsChanged NE False$ or ParsingResponse NE '' then - CassIDs = {CASSETTE_IDS} - RDSNo = CassIDs<0, 1> - CurrStage = Xlate('RDS', RDSNo, 'CURR_STAGE', 'X') - If ( ({EMPLOYEE_ID} NE '') and ({TOOL_ID} NE '') and ({SUPPLIER_LOT} NE '') and ({CASSETTE_IDS} NE '') and ( (CurrStage EQ 'LOAD') or (CurrStage EQ 'VER') ) ) | - or ( ({EMPLOYEE_ID} NE '') and ({TOOL_ID} NE '') and ({CASSETTE_IDS} NE '') and (CurrStage EQ 'UNLOAD') ) then - // RDS object - objRDS = '' + CassIDs = {CASSETTE_IDS} + RDSNo = CassIDs<0, 1> + CurrStage = Xlate('RDS', RDSNo, 'CURR_STAGE', 'X') + If ( ({EMPLOYEE_ID} NE '') and ({TOOL_ID} NE '') and ({SUPPLIER_LOT} NE '') and ({CASSETTE_IDS} NE '') and ( (CurrStage EQ 'LOAD') or (CurrStage EQ 'VER') ) ) | + or ( ({EMPLOYEE_ID} NE '') and ({TOOL_ID} NE '') and ({CASSETTE_IDS} NE '') and (CurrStage EQ 'UNLOAD') ) then + // RDS object + objRDS = '' + + If SRP_JSON(objRDS, 'New', 'Object') then - If SRP_JSON(objRDS, 'New', 'Object') then - - RDSRec = Database_Services('ReadDataRow', 'RDS', RDSNo) - * SupplInstAckReq = Xlate('RDS', RDSNo, 'SUPPL_ACK_REQ' , 'X') - If CurrStage EQ 'VER' then - VerSupplID = Supplement_Services('UnacknowledgedSupplementCheck', 'RDS', RDSNo, 'VER') - If VerSupplID NE False$ then - SupplVerInstAckReq = True$ - end else - SupplVerInstAckReq = False$ - end + RDSRec = Database_Services('ReadDataRow', 'RDS', RDSNo) + * SupplInstAckReq = Xlate('RDS', RDSNo, 'SUPPL_ACK_REQ' , 'X') + If CurrStage EQ 'VER' then + VerSupplID = Supplement_Services('UnacknowledgedSupplementCheck', 'RDS', RDSNo, 'VER') + If VerSupplID NE False$ then + SupplVerInstAckReq = True$ end else SupplVerInstAckReq = False$ end - - If CurrStage EQ 'VER' or CurrStage EQ 'LOAD' then - LoadSupplID = Supplement_Services('UnacknowledgedSupplementCheck', 'RDS', RDSNo, 'LOAD') - If LoadSupplID NE False$ then - SupplLoadInstAckReq = True$ - end else - SupplLoadInstAckReq = False$ - end + end else + SupplVerInstAckReq = False$ + end + + If CurrStage EQ 'VER' or CurrStage EQ 'LOAD' then + LoadSupplID = Supplement_Services('UnacknowledgedSupplementCheck', 'RDS', RDSNo, 'LOAD') + If LoadSupplID NE False$ then + SupplLoadInstAckReq = True$ end else SupplLoadInstAckReq = False$ end - - If CurrStage EQ 'UNLOAD' then - UnloadSupplID = Supplement_Services('UnacknowledgedSupplementCheck', 'RDS', RDSNo, 'UNLOAD') - If UnloadSupplID NE False$ then - SupplUnloadInstAckReq = True$ - end else - SupplUnloadInstAckReq = False$ - end + end else + SupplLoadInstAckReq = False$ + end + + If CurrStage EQ 'UNLOAD' then + UnloadSupplID = Supplement_Services('UnacknowledgedSupplementCheck', 'RDS', RDSNo, 'UNLOAD') + If UnloadSupplID NE False$ then + SupplUnloadInstAckReq = True$ end else SupplUnloadInstAckReq = False$ end - - If CurrStage EQ 'POST' then - PostSupplID = Supplement_Services('UnacknowledgedSupplementCheck', 'RDS', RDSNo, 'POST') - If PostSupplID NE False$ then - SupplPostInstAckReq = True$ - end else - SupplPostInstAckReq = False$ - end + end else + SupplUnloadInstAckReq = False$ + end + + If CurrStage EQ 'POST' then + PostSupplID = Supplement_Services('UnacknowledgedSupplementCheck', 'RDS', RDSNo, 'POST') + If PostSupplID NE False$ then + SupplPostInstAckReq = True$ end else SupplPostInstAckReq = False$ end - - @DICT = Database_Services('GetTableHandle', 'DICT.SCANS') - @ID = ScanID - @RECORD = mvScan - - RDSLayerInstAckReq = Xlate('RDS', RDSNo, 'RDS_LAYER_ACK_REQ' , 'X') - RDSLayerIDs = Xlate('RDS', RDSNo, 'RDS_LS_ID' , 'X') - PreInstAckReq = Xlate('RDS', RDSNo, 'PRE_INST_ACK_REQ' , 'X') - PreInst = Xlate('RDS', RDSNo, 'PRE_INST' , 'X') - FwiInstAckReq = Xlate('RDS', RDSNo, 'FWI_INST_ACK_REQ' , 'X') - FwiInst = Xlate('RDS', RDSNo, 'FWI_INST' , 'X') - LwiInstAckReq = Xlate('RDS', RDSNo, 'LWI_INST_ACK_REQ' , 'X') - LwiInst = Xlate('RDS', RDSNo, 'LWI_INST' , 'X') - QAInstAckReq = Xlate('RDS', RDSNo, 'QA_INST_ACK_REQ' , 'X') - QAInst = Xlate('RDS', RDSNo, 'QA_INST' , 'X') - LoadInstAckReq = Xlate('RDS', RDSNo, 'LOAD_INST_ACK_REQ' , 'X') - LoadInst = Xlate('RDS', RDSNo, 'LOAD_INST' , 'X') - UnloadInstAckReq = Xlate('RDS', RDSNo, 'UNLOAD_INST_ACK_REQ' , 'X') - UnloadInst = Xlate('RDS', RDSNo, 'UNLOAD_INST' , 'X') - PostInstAckReq = Xlate('RDS', RDSNo, 'POST_INST_ACK_REQ' , 'X') - PostInst = Xlate('RDS', RDSNo, 'POST_INST' , 'X') - WaferCountInstAckReq = Xlate('RDS', RDSNo, 'WAFER_COUNT_ACK_REQ' , 'X') - - * SchedWfrCnt = Xlate('SCANS', ScanID, 'SCHEDULER_WAFER_COUNT', 'X') - WaferCountInst = 'Please verify the wafer quantity in the cassette matches the ' | - : 'scheduled wafer quantity, ':{SCHEDULER_WAFER_COUNT}:'.' - - * SRP_JSON(objRDS, 'SetValue', 'supplInstAckReq' , SupplInstAckReq , 'Boolean') - * SRP_JSON(objRDS, 'SetValue', 'supplInstAck' , RDSRec , 'Boolean') - * SRP_JSON(objRDS, 'SetValue', 'supplInst' , RDSRec , 'String') - - - If supplLoadInstAckReq EQ TRUE$ then - supplLoadInstAck = Xlate('SUPPLEMENTS', LoadSupplID, SUPPLEMENTS_SUPPL_ACK$, 'X', '') - supplLoadInst = Xlate('SUPPLEMENTS', LoadSupplID, SUPPLEMENTS_SUPPL_TEXT$, 'X', '') - end else - supplLoadInstAck = '' - supplLoadInst = '' - end - SRP_JSON(objRDS, 'SetValue', 'supplLoadInstAckReq' , supplLoadInstAckReq , 'Boolean') - SRP_JSON(objRDS, 'SetValue', 'supplLoadInstAck' , supplLoadInstAck , 'Boolean') - SRP_JSON(objRDS, 'SetValue', 'supplLoadInst' , supplLoadInst , 'String') - - If supplVerInstAckReq EQ TRUE$ then - supplVerInstAck = Xlate('SUPPLEMENTS', VerSupplID, SUPPLEMENTS_SUPPL_ACK$, 'X', '') - supplVerInst = Xlate('SUPPLEMENTS', VerSupplID, SUPPLEMENTS_SUPPL_TEXT$, 'X', '') - end else - supplVerInstAck = '' - supplVerInst = '' - end - SRP_JSON(objRDS, 'SetValue', 'supplVerInstAckReq' , supplVerInstAckReq , 'Boolean') - SRP_JSON(objRDS, 'SetValue', 'supplVerInstAck' , supplVerInstAck , 'Boolean') - SRP_JSON(objRDS, 'SetValue', 'supplVerInst' , supplVerInst , 'String') - - - If supplUnloadInstAckReq EQ TRUE$ then - supplUnloadInstAck = Xlate('SUPPLEMENTS', UnloadSupplID, SUPPLEMENTS_SUPPL_ACK$, 'X', '') - supplUnloadInst = Xlate('SUPPLEMENTS', UnloadSupplID, SUPPLEMENTS_SUPPL_TEXT$, 'X', '') - end else - supplUnloadInstAck = '' - supplUnloadInst = '' - end - SRP_JSON(objRDS, 'SetValue', 'supplUnloadInstAckReq' , supplUnloadInstAckReq , 'Boolean') - SRP_JSON(objRDS, 'SetValue', 'supplUnloadInstAck' , supplUnloadInstAck , 'Boolean') - SRP_JSON(objRDS, 'SetValue', 'supplUnloadInst' , supplUnloadInst , 'String') - - If supplPostInstAckReq EQ TRUE$ then - supplPostInstAck = Xlate('SUPPLEMENTS', PostSupplID, SUPPLEMENTS_SUPPL_ACK$, 'X', '') - supplPostInst = Xlate('SUPPLEMENTS', PostSupplID, SUPPLEMENTS_SUPPL_TEXT$, 'X', '') - end else - supplPostInstAck = '' - supplPostInst = '' - end - SRP_JSON(objRDS, 'SetValue', 'supplPostInstAckReq' , supplPostInstAckReq , 'Boolean') - SRP_JSON(objRDS, 'SetValue', 'supplPostInstAck' , supplPostInstAck , 'Boolean') - SRP_JSON(objRDS, 'SetValue', 'supplPostInst' , supplPostInst , 'String') - - SRP_JSON(objRDS, 'SetValue', 'preInstAckReq' , PreInstAckReq , 'Boolean') - SRP_JSON(objRDS, 'SetValue', 'preInstAck' , RDSRec , 'Boolean') - SRP_JSON(objRDS, 'SetValue', 'preInst' , PreInst , 'String') - SRP_JSON(objRDS, 'SetValue', 'fwiInstAckReq' , FwiInstAckReq , 'Boolean') - SRP_JSON(objRDS, 'SetValue', 'fwiInstAck' , RDSRec , 'Boolean') - SRP_JSON(objRDS, 'SetValue', 'fwiInst' , FwiInst , 'String') - SRP_JSON(objRDS, 'SetValue', 'lwiInstAckReq' , LwiInstAckReq , 'Boolean') - SRP_JSON(objRDS, 'SetValue', 'lwiInstAck' , RDSRec , 'Boolean') - SRP_JSON(objRDS, 'SetValue', 'lwiInst' , LwiInst , 'String') - SRP_JSON(objRDS, 'SetValue', 'qaInstAckReq' , QAInstAckReq , 'Boolean') - SRP_JSON(objRDS, 'SetValue', 'qaInstAck' , RDSRec , 'Boolean') - SRP_JSON(objRDS, 'SetValue', 'qaInst' , QAInst , 'String') - SRP_JSON(objRDS, 'SetValue', 'loadInstAckReq' , LoadInstAckReq , 'Boolean') - SRP_JSON(objRDS, 'SetValue', 'loadInstAck' , RDSRec , 'Boolean') - SRP_JSON(objRDS, 'SetValue', 'loadInst' , LoadInst , 'String') - SRP_JSON(objRDS, 'SetValue', 'unloadInstAckReq' , UnloadInstAckReq , 'Boolean') - SRP_JSON(objRDS, 'SetValue', 'unloadInstAck' , RDSRec , 'Boolean') - SRP_JSON(objRDS, 'SetValue', 'unloadInst' , UnloadInst , 'String') - SRP_JSON(objRDS, 'SetValue', 'postInstAckReq' , PostInstAckReq , 'Boolean') - SRP_JSON(objRDS, 'SetValue', 'postInstAck' , RDSRec , 'Boolean') - SRP_JSON(objRDS, 'SetValue', 'postInst' , PostInst , 'String') - SRP_JSON(objRDS, 'SetValue', 'waferCountInstAckReq' , WaferCountInstAckReq , 'Boolean') - SRP_JSON(objRDS, 'SetValue', 'waferCountInstAck' , RDSRec , 'Boolean') - SRP_JSON(objRDS, 'SetValue', 'waferCountInst' , WaferCountInst , 'String') - SRP_JSON(objRDS, 'SetValue', 'rdsLayerInstAckReq' , RDSLayerInstAckReq , 'Boolean') - SRP_JSON(objRDS, 'SetValue', 'rdsLayerInstAck' , RDSRec , 'Boolean') - - OverrideRequired = @Record - OverrideType = @Record - OverrideReason = @Record - SRP_JSON(objRDS, 'SetValue', 'overRideAckReq' , OverrideRequired , 'Boolean') - SRP_JSON(objRDS, 'SetValue', 'overRideType' , OverrideType , 'string') - SRP_JSON(objRDS, 'SetValue', 'overRideReason', @Record, 'string') - - If ((OverrideRequired EQ True$) and (OverrideType EQ 'ROTR')) then - Swap " " with "" in OverrideReason - OverrideComments = Xlate("ROTR_OVERRIDE_COMMENT_OPTIONS", OverrideReason, ROTR_OVERRIDE_COMMENT_OPTIONS_COMMENT_OPTIONS$, 'X') - SRP_JSON(objRds, "SetValueArray", "overRideComments", OverrideComments, @VM) - - Reactor = {TOOL_ID}[2,999] - rotrOverrideCount = Xlate('REACTOR', Reactor, REACTOR_ROTR_OVERRIDE_COUNT$, 'X') - if rotrOverrideCount EQ '' then rotrOverrideCount = 0 - SRP_JSON(objRds, "SetValue", "rotrOverrideCount", rotrOverrideCount, 'Number') - end - arrayRDSLayers = '' - // Add RDSLayers (recipe parameters) array - If SRP_JSON(arrayRDSLayers, 'New', 'Array') then - For each RDSLayerID in RDSLayerIDs using @VM setting vPos - arrayParameters = '' - If SRP_JSON(arrayParameters, 'New', 'Array') then - RDSLayerKey = RDSNo:'*':RDSLayerID - ColNames = 'LS_ID,RECIPE_NO,RECIPE_NAME,DOPANT,EPI_DILUENT,EPI_TIME,' | - : 'DILUENT_ADJ_PARAM,DOPANT_FLOW,HCL_FLOW,BAKE_TIME,EPI_H2_FLOW,' | - : 'TCS_FLOW,DCS_FLOW,AUX1,AUX2,F_OFFSET,S_OFFSET,R_OFFSET,' | - : 'SUSC_ETCH,ETCH1,ETCH2,ETCH3,UL_TEMP' - ParamList = 'Layer ID,Recipe,Recipe Name,Dopant,Epi Diluent,Deposit,' | - : 'Diluent,Dopant Flow,HCL Flow,Bake Time,H2 Flow,TCS Flow,' | - : 'DCS Flow,Aux 1 Flow,Aux 2 flow,F Offset,S Offset,R Offset,' | - : 'Susc Etch,Etch 1,Etch 2,Etch 3,Unload Temp' - pos = '' - For each Parameter in ParamList using ',' setting pos - ColName = Field(ColNames, ',', pos) - ParamData = Xlate('RDS_LAYER', RDSLayerKey, ColName, 'X') - Conversion = Xlate('DICT.RDS_LAYER', ColName, DICT_CONV$, 'X') - If ParamData NE '' then - If Conversion NE '' then ParamData = OConv(ParamData, Conversion) - objParameter = '' - If SRP_JSON(objParameter, 'New', 'Object') then - Success = SRP_JSON(objParameter, 'SetValue', 'Parameter', Parameter) - Success = SRP_JSON(objParameter, 'SetValue', 'Value', ParamData) - // Add parameter object to parameter array - Success = SRP_JSON(arrayParameters, 'Add', objParameter) - SRP_JSON(objParameter, 'Release') - end - end - Next Value - end - // Add parameter array to RDS Layer array - Success = SRP_JSON(arrayRDSLayers, 'Add', arrayParameters) - SRP_JSON(arrayParameters, 'Release') - Next RDSLayerID - Success = SRP_JSON(objRDS, 'Set', 'rdsLayers', arrayRDSLayers) - SRP_JSON(arrayRDSLayers, 'Release') - end - - SRP_JSON(objJSONScan, 'Set', 'rds', objRDS) - - rdsJson = SRP_JSON(objRDS, 'Stringify', 'Fast') - mvScan = rdsJson - mvScan = False$ - mvScanChanged = True$ - - SRP_JSON(objRDS, 'Release') + end else + SupplPostInstAckReq = False$ end + + @DICT = Database_Services('GetTableHandle', 'DICT.SCANS') + @ID = ScanID + @RECORD = mvScan + + RDSLayerInstAckReq = Xlate('RDS', RDSNo, 'RDS_LAYER_ACK_REQ' , 'X') + RDSLayerIDs = Xlate('RDS', RDSNo, 'RDS_LS_ID' , 'X') + PreInstAckReq = Xlate('RDS', RDSNo, 'PRE_INST_ACK_REQ' , 'X') + PreInst = Xlate('RDS', RDSNo, 'PRE_INST' , 'X') + FwiInstAckReq = Xlate('RDS', RDSNo, 'FWI_INST_ACK_REQ' , 'X') + FwiInst = Xlate('RDS', RDSNo, 'FWI_INST' , 'X') + LwiInstAckReq = Xlate('RDS', RDSNo, 'LWI_INST_ACK_REQ' , 'X') + LwiInst = Xlate('RDS', RDSNo, 'LWI_INST' , 'X') + QAInstAckReq = Xlate('RDS', RDSNo, 'QA_INST_ACK_REQ' , 'X') + QAInst = Xlate('RDS', RDSNo, 'QA_INST' , 'X') + LoadInstAckReq = Xlate('RDS', RDSNo, 'LOAD_INST_ACK_REQ' , 'X') + LoadInst = Xlate('RDS', RDSNo, 'LOAD_INST' , 'X') + UnloadInstAckReq = Xlate('RDS', RDSNo, 'UNLOAD_INST_ACK_REQ' , 'X') + UnloadInst = Xlate('RDS', RDSNo, 'UNLOAD_INST' , 'X') + PostInstAckReq = Xlate('RDS', RDSNo, 'POST_INST_ACK_REQ' , 'X') + PostInst = Xlate('RDS', RDSNo, 'POST_INST' , 'X') + WaferCountInstAckReq = Xlate('RDS', RDSNo, 'WAFER_COUNT_ACK_REQ' , 'X') + + * SchedWfrCnt = Xlate('SCANS', ScanID, 'SCHEDULER_WAFER_COUNT', 'X') + WaferCountInst = 'Please verify the wafer quantity in the cassette matches the ' | + : 'scheduled wafer quantity, ':{SCHEDULER_WAFER_COUNT}:'.' + + * SRP_JSON(objRDS, 'SetValue', 'supplInstAckReq' , SupplInstAckReq , 'Boolean') + * SRP_JSON(objRDS, 'SetValue', 'supplInstAck' , RDSRec , 'Boolean') + * SRP_JSON(objRDS, 'SetValue', 'supplInst' , RDSRec , 'String') + + + If supplLoadInstAckReq EQ TRUE$ then + supplLoadInstAck = Xlate('SUPPLEMENTS', LoadSupplID, SUPPLEMENTS_SUPPL_ACK$, 'X', '') + supplLoadInst = Xlate('SUPPLEMENTS', LoadSupplID, SUPPLEMENTS_SUPPL_TEXT$, 'X', '') + end else + supplLoadInstAck = '' + supplLoadInst = '' + end + SRP_JSON(objRDS, 'SetValue', 'supplLoadInstAckReq' , supplLoadInstAckReq , 'Boolean') + SRP_JSON(objRDS, 'SetValue', 'supplLoadInstAck' , supplLoadInstAck , 'Boolean') + SRP_JSON(objRDS, 'SetValue', 'supplLoadInst' , supplLoadInst , 'String') + + If supplVerInstAckReq EQ TRUE$ then + supplVerInstAck = Xlate('SUPPLEMENTS', VerSupplID, SUPPLEMENTS_SUPPL_ACK$, 'X', '') + supplVerInst = Xlate('SUPPLEMENTS', VerSupplID, SUPPLEMENTS_SUPPL_TEXT$, 'X', '') + end else + supplVerInstAck = '' + supplVerInst = '' + end + SRP_JSON(objRDS, 'SetValue', 'supplVerInstAckReq' , supplVerInstAckReq , 'Boolean') + SRP_JSON(objRDS, 'SetValue', 'supplVerInstAck' , supplVerInstAck , 'Boolean') + SRP_JSON(objRDS, 'SetValue', 'supplVerInst' , supplVerInst , 'String') + + + If supplUnloadInstAckReq EQ TRUE$ then + supplUnloadInstAck = Xlate('SUPPLEMENTS', UnloadSupplID, SUPPLEMENTS_SUPPL_ACK$, 'X', '') + supplUnloadInst = Xlate('SUPPLEMENTS', UnloadSupplID, SUPPLEMENTS_SUPPL_TEXT$, 'X', '') + end else + supplUnloadInstAck = '' + supplUnloadInst = '' + end + SRP_JSON(objRDS, 'SetValue', 'supplUnloadInstAckReq' , supplUnloadInstAckReq , 'Boolean') + SRP_JSON(objRDS, 'SetValue', 'supplUnloadInstAck' , supplUnloadInstAck , 'Boolean') + SRP_JSON(objRDS, 'SetValue', 'supplUnloadInst' , supplUnloadInst , 'String') + + If supplPostInstAckReq EQ TRUE$ then + supplPostInstAck = Xlate('SUPPLEMENTS', PostSupplID, SUPPLEMENTS_SUPPL_ACK$, 'X', '') + supplPostInst = Xlate('SUPPLEMENTS', PostSupplID, SUPPLEMENTS_SUPPL_TEXT$, 'X', '') + end else + supplPostInstAck = '' + supplPostInst = '' + end + SRP_JSON(objRDS, 'SetValue', 'supplPostInstAckReq' , supplPostInstAckReq , 'Boolean') + SRP_JSON(objRDS, 'SetValue', 'supplPostInstAck' , supplPostInstAck , 'Boolean') + SRP_JSON(objRDS, 'SetValue', 'supplPostInst' , supplPostInst , 'String') + + SRP_JSON(objRDS, 'SetValue', 'preInstAckReq' , PreInstAckReq , 'Boolean') + SRP_JSON(objRDS, 'SetValue', 'preInstAck' , RDSRec , 'Boolean') + SRP_JSON(objRDS, 'SetValue', 'preInst' , PreInst , 'String') + SRP_JSON(objRDS, 'SetValue', 'fwiInstAckReq' , FwiInstAckReq , 'Boolean') + SRP_JSON(objRDS, 'SetValue', 'fwiInstAck' , RDSRec , 'Boolean') + SRP_JSON(objRDS, 'SetValue', 'fwiInst' , FwiInst , 'String') + SRP_JSON(objRDS, 'SetValue', 'lwiInstAckReq' , LwiInstAckReq , 'Boolean') + SRP_JSON(objRDS, 'SetValue', 'lwiInstAck' , RDSRec , 'Boolean') + SRP_JSON(objRDS, 'SetValue', 'lwiInst' , LwiInst , 'String') + SRP_JSON(objRDS, 'SetValue', 'qaInstAckReq' , QAInstAckReq , 'Boolean') + SRP_JSON(objRDS, 'SetValue', 'qaInstAck' , RDSRec , 'Boolean') + SRP_JSON(objRDS, 'SetValue', 'qaInst' , QAInst , 'String') + SRP_JSON(objRDS, 'SetValue', 'loadInstAckReq' , LoadInstAckReq , 'Boolean') + SRP_JSON(objRDS, 'SetValue', 'loadInstAck' , RDSRec , 'Boolean') + SRP_JSON(objRDS, 'SetValue', 'loadInst' , LoadInst , 'String') + SRP_JSON(objRDS, 'SetValue', 'unloadInstAckReq' , UnloadInstAckReq , 'Boolean') + SRP_JSON(objRDS, 'SetValue', 'unloadInstAck' , RDSRec , 'Boolean') + SRP_JSON(objRDS, 'SetValue', 'unloadInst' , UnloadInst , 'String') + SRP_JSON(objRDS, 'SetValue', 'postInstAckReq' , PostInstAckReq , 'Boolean') + SRP_JSON(objRDS, 'SetValue', 'postInstAck' , RDSRec , 'Boolean') + SRP_JSON(objRDS, 'SetValue', 'postInst' , PostInst , 'String') + SRP_JSON(objRDS, 'SetValue', 'waferCountInstAckReq' , WaferCountInstAckReq , 'Boolean') + SRP_JSON(objRDS, 'SetValue', 'waferCountInstAck' , RDSRec , 'Boolean') + SRP_JSON(objRDS, 'SetValue', 'waferCountInst' , WaferCountInst , 'String') + SRP_JSON(objRDS, 'SetValue', 'rdsLayerInstAckReq' , RDSLayerInstAckReq , 'Boolean') + SRP_JSON(objRDS, 'SetValue', 'rdsLayerInstAck' , RDSRec , 'Boolean') + + OverrideRequired = @Record + OverrideType = @Record + OverrideReason = @Record + SRP_JSON(objRDS, 'SetValue', 'overRideAckReq' , OverrideRequired , 'Boolean') + SRP_JSON(objRDS, 'SetValue', 'overRideType' , OverrideType , 'string') + SRP_JSON(objRDS, 'SetValue', 'overRideReason', @Record, 'string') + + If ((OverrideRequired EQ True$) and (OverrideType EQ 'ROTR')) then + Swap " " with "" in OverrideReason + OverrideComments = Xlate("ROTR_OVERRIDE_COMMENT_OPTIONS", OverrideReason, ROTR_OVERRIDE_COMMENT_OPTIONS_COMMENT_OPTIONS$, 'X') + SRP_JSON(objRds, "SetValueArray", "overRideComments", OverrideComments, @VM) + + Reactor = {TOOL_ID}[2,999] + rotrOverrideCount = Xlate('REACTOR', Reactor, REACTOR_ROTR_OVERRIDE_COUNT$, 'X') + if rotrOverrideCount EQ '' then rotrOverrideCount = 0 + SRP_JSON(objRds, "SetValue", "rotrOverrideCount", rotrOverrideCount, 'Number') + end + arrayRDSLayers = '' + // Add RDSLayers (recipe parameters) array + If SRP_JSON(arrayRDSLayers, 'New', 'Array') then + For each RDSLayerID in RDSLayerIDs using @VM setting vPos + arrayParameters = '' + If SRP_JSON(arrayParameters, 'New', 'Array') then + RDSLayerKey = RDSNo:'*':RDSLayerID + ColNames = 'LS_ID,RECIPE_NO,RECIPE_NAME,DOPANT,EPI_DILUENT,EPI_TIME,' | + : 'DILUENT_ADJ_PARAM,DOPANT_FLOW,HCL_FLOW,BAKE_TIME,EPI_H2_FLOW,' | + : 'TCS_FLOW,DCS_FLOW,AUX1,AUX2,F_OFFSET,S_OFFSET,R_OFFSET,' | + : 'SUSC_ETCH,ETCH1,ETCH2,ETCH3,UL_TEMP' + ParamList = 'Layer ID,Recipe,Recipe Name,Dopant,Epi Diluent,Deposit,' | + : 'Diluent,Dopant Flow,HCL Flow,Bake Time,H2 Flow,TCS Flow,' | + : 'DCS Flow,Aux 1 Flow,Aux 2 flow,F Offset,S Offset,R Offset,' | + : 'Susc Etch,Etch 1,Etch 2,Etch 3,Unload Temp' + pos = '' + For each Parameter in ParamList using ',' setting pos + ColName = Field(ColNames, ',', pos) + ParamData = Xlate('RDS_LAYER', RDSLayerKey, ColName, 'X') + Conversion = Xlate('DICT.RDS_LAYER', ColName, DICT_CONV$, 'X') + If ParamData NE '' then + If Conversion NE '' then ParamData = OConv(ParamData, Conversion) + objParameter = '' + If SRP_JSON(objParameter, 'New', 'Object') then + Success = SRP_JSON(objParameter, 'SetValue', 'Parameter', Parameter) + Success = SRP_JSON(objParameter, 'SetValue', 'Value', ParamData) + // Add parameter object to parameter array + Success = SRP_JSON(arrayParameters, 'Add', objParameter) + SRP_JSON(objParameter, 'Release') + end + end + Next Value + end + // Add parameter array to RDS Layer array + Success = SRP_JSON(arrayRDSLayers, 'Add', arrayParameters) + SRP_JSON(arrayParameters, 'Release') + Next RDSLayerID + Success = SRP_JSON(objRDS, 'Set', 'rdsLayers', arrayRDSLayers) + SRP_JSON(arrayRDSLayers, 'Release') + end + + SRP_JSON(objJSONScan, 'Set', 'rds', objRDS) + SRP_JSON(objRDS, 'Release') end end end @@ -2432,3 +2399,10 @@ ClearCursors: return + + + + + + + diff --git a/LSL2/STPROCINS/SCANS_EQUATES.txt b/LSL2/STPROCINS/SCANS_EQUATES.txt index 73789c4..0906d06 100644 --- a/LSL2/STPROCINS/SCANS_EQUATES.txt +++ b/LSL2/STPROCINS/SCANS_EQUATES.txt @@ -45,12 +45,9 @@ compile insert SCANS_EQUATES equ SCANS.TW_LOT_JSON$ to 36 equ SCANS.EMPLOYEE_CHANGED$ to 37 equ SCANS.EMPLOYEE_JSON$ to 38 - equ SCANS.RDS_CHANGED$ to 39 - equ SCANS.RDS_JSON$ to 40 #endif -