diff --git a/LSL2/STPROC/NDW_RDS_QUERY_EVENTS.txt b/LSL2/STPROC/NDW_RDS_QUERY_EVENTS.txt index 2b795ed..dda2205 100644 --- a/LSL2/STPROC/NDW_RDS_QUERY_EVENTS.txt +++ b/LSL2/STPROC/NDW_RDS_QUERY_EVENTS.txt @@ -59,11 +59,11 @@ If Event EQ 'OLE' then Transfer Param1 to Event Transfer Param2 to Param1 Transfer Param3 to Param2 - * Transfer Param4 to Param3 - * Transfer Param5 to Param4 - * Transfer Param6 to Param5 - * Transfer Param7 to Param6 - * Transfer Param8 to Param7 + Transfer Param4 to Param3 + Transfer Param5 to Param4 + Transfer Param6 to Param5 + Transfer Param7 to Param6 + Transfer Param8 to Param7 end GoToEvent Event for CtrlEntID @@ -226,14 +226,17 @@ Event PUB_ENG_OPTIONS.CLICK() End Case If ServiceModules NE '' then - Def = "" + ErrorMsg = '' + Def = '' Def = Caption Def = "GC" Def = NumRows Def = 600 - MsgUp = Msg(@WINDOW, Def) ;* Start gas guage message + Def = -2 + Def = -2 + MsgUp = Msg(@Window, Def) ;* Start gas guage message For each WOMatKey in WOMatKeys using @VM setting vPos - Running = Msg(@WINDOW, MsgUp, vPos, MSGINSTUPDATE$) ;* Update gas guage + Running = Msg(@Window, MsgUp, vPos, MSGINSTUPDATE$) ;* Update gas guage For each ServiceModule in ServiceModules using @VM setting sPos Service = Services<0, sPos> If Service = 'UpdateRDSLayerSpecs' then @@ -243,21 +246,33 @@ Event PUB_ENG_OPTIONS.CLICK() Ans = Function(@ServiceModule(Service, WOMatKey)) end If Error_Services('HasError') then - Error_Services('DisplayError') + ErrorMsg = Error_Services('GetMessage') end + Until (ErrorMsg NE '') Next ServiceModule + Until (ErrorMsg NE '') Next WOMatKey - Msg(@WINDOW,MsgUp) ;* Take gas guage down + + Msg(@Window,MsgUp) ;* Take gas guage down + If (ErrorMsg NE '') then + Msg(@Window, '', 'OK', '', 'Operation Aborted':@FM:ErrorMsg) + end end - If Error_Services('NoError') then - Def = "" + Def = '' + Def = -2 + Def = -2 + If (ErrorMsg EQ '') then Def = '*' Def = 'Success' - Def = "Update complete!" - Def = "BO" - MsgUp = Msg(@window, Def) + Def = 'Update complete!' + end else + Def = 'H' + Def = 'Update failed!' + Def = ErrorMsg end + Def = "BO" + MsgUp = Msg(@Window, Def, 'OK') end end event @@ -277,7 +292,7 @@ Event PUB_ON_HOLD.CLICK() HoldEntity = 'RDS' HoldType = 'HOLD' HoldData = '' - HoldData = Dialog_Box('DIALOG_HOLD',@WINDOW,Transition:@FM:@FM:HoldType) + HoldData = Dialog_Box('DIALOG_HOLD',@Window,Transition:@FM:@FM:HoldType) If HoldData NE 'Cancel' then GoSub GetView Hold_Services('EnableMultipleHolds', WOMatKeys, HoldEntity, RDSKeys, 'NDW_RDS_QUERY', '', HoldData) @@ -289,7 +304,7 @@ Event PUB_ON_HOLD.CLICK() MsgInfo = 'BNY' MsgInfo = 'Hold Successful. Would you like to print label(s)?' MsgInfo = '!' - PrintLabel = Msg(@WINDOW,MsgInfo,'') + PrintLabel = Msg(@Window,MsgInfo,'') HoldBy = HoldData<1> Reason = HoldData<2> Stage = HoldData<4> @@ -333,7 +348,7 @@ Event PUB_OFF_HOLD.CLICK() Transition = True$ HoldType = 'HOLD' HoldData = '' - HoldData = Dialog_Box('DIALOG_HOLD',@WINDOW,Transition:@FM:@FM:HoldType) + HoldData = Dialog_Box('DIALOG_HOLD',@Window,Transition:@FM:@FM:HoldType) If HoldData NE 'Cancel' then GoSub GetView Hold_Services('DisableMultipleHolds', WOMatKeys, 'RDS', RDSKeys, 'NDW_RDS_QUERY', '', HoldData) @@ -666,7 +681,7 @@ CheckSelectedForHolds: Until HoldOnFlag EQ True$ and HoldOffFlag EQ True$ Next K end - if MemberOf(@USER4, 'ENG_TECH') OR MemberOf(@USER4, 'LEAD') OR MemberOf(@USER4, 'SUPERVISOR') then + if MemberOf(@User4, 'ENG_TECH') OR MemberOf(@User4, 'LEAD') OR MemberOf(@User4, 'SUPERVISOR') then // IF ANY SELECTED LOTS ARE ON HOLD, ENABLE PUB_OFF_HOLD Set_Property(@Window:'.PUB_OFF_HOLD', 'ENABLED', HoldOffFlag) end else diff --git a/LSL2/STPROC/OBJ_PROD_SPEC.txt b/LSL2/STPROC/OBJ_PROD_SPEC.txt index 3578ae3..0daddae 100644 --- a/LSL2/STPROC/OBJ_PROD_SPEC.txt +++ b/LSL2/STPROC/OBJ_PROD_SPEC.txt @@ -2035,9 +2035,10 @@ RETURN GetQAMet: * * * * * * * - PSNo = Parms[1,@RM] - PSRec = Parms[COL2()+1,@RM] - ReactSchedFlag = Parms[COL2()+1,@RM] + PSNo = Parms[1,@RM] + PSRec = Parms[COL2()+1,@RM] + ReactSchedFlag = Parms[COL2()+1,@RM] + AllSchedFlag = Parms[COL2()+1,@RM] GOSUB StageSortKeys @@ -2055,12 +2056,11 @@ GetQAMet: FOR TestNo = 1 TO MetCnt - IF PSStageRec NE '' THEN + IF (PSStageRec NE '') THEN - IF ReactSchedFlag = 1 THEN - - IF PSStageRec = 1 THEN - + Begin Case + Case AllSchedFlag + // Return all scheduled metrology ResLineCnt += 1 Result = FIELD(PSStageKey,'*',2) Result = PSStageRec @@ -2077,36 +2077,56 @@ GetQAMet: Result = PSStageRec Result = PSStageRec ;* Possible Future Result = PSStageRec ;* 12/3/2016 JCH for Mark - Result = PSStageRec + Result = PSStageRec - END - - END ELSE - - ResLineCnt += 1 - Result = FIELD(PSStageKey,'*',2) - Result = PSStageRec - Result = PSStageRec - Result = PSStageRec - Result = PSStageRec - Result = PSStageRec - Result = PSStageRec - Result = PSStageRec - Result = PSStageRec - Result = PSStageRec - Result = PSStageRec - Result = PSStageRec - Result = PSStageRec - Result = PSStageRec ;* Possible future - Result = PSStageRec ;* 12/3/2016 JCH for Mark - Result = PSStageRec - - END ;* End of check for ReactSchedFlag + Case ReactSchedFlag + // Just return reactor scheduled metrology + IF (PSStageRec EQ True$) THEN + ResLineCnt += 1 + Result = FIELD(PSStageKey,'*',2) + Result = PSStageRec + Result = PSStageRec + Result = PSStageRec + Result = PSStageRec + Result = PSStageRec + Result = PSStageRec + Result = PSStageRec + Result = PSStageRec + Result = PSStageRec + Result = PSStageRec + Result = PSStageRec + Result = PSStageRec + Result = PSStageRec ;* Possible Future + Result = PSStageRec ;* 12/3/2016 JCH for Mark + Result = PSStageRec + END + + Case Otherwise$ + // Just return work order scheduled metrology + IF (PSStageRec NE True$) THEN + ResLineCnt += 1 + Result = FIELD(PSStageKey,'*',2) + Result = PSStageRec + Result = PSStageRec + Result = PSStageRec + Result = PSStageRec + Result = PSStageRec + Result = PSStageRec + Result = PSStageRec + Result = PSStageRec + Result = PSStageRec + Result = PSStageRec + Result = PSStageRec + Result = PSStageRec + Result = PSStageRec ;* Possible Future + Result = PSStageRec ;* 12/3/2016 JCH for Mark + Result = PSStageRec + END + + End Case END NEXT TestNo NEXT N RETURN - - diff --git a/LSL2/STPROC/OBJ_WO_REACT.txt b/LSL2/STPROC/OBJ_WO_REACT.txt index 8b8eb85..b3ad76d 100644 --- a/LSL2/STPROC/OBJ_WO_REACT.txt +++ b/LSL2/STPROC/OBJ_WO_REACT.txt @@ -14,7 +14,6 @@ COMPILE FUNCTION obj_WO_React(Method,Parms) */ - DECLARE FUNCTION Get_Status, Msg, Utility, obj_Tables, NextKey, obj_Prod_Spec, obj_WO_Mat_QA, GetTickCount Declare function Environment_Services, Database_Services DECLARE SUBROUTINE Set_Status, Msg, obj_Tables, RList, ErrMsg, Btree.Extract, obj_WO_Mat_QA, Mona_Services @@ -70,222 +69,213 @@ RETURN Result AddRdsNo: * * * * * * * -StartTick = GetTickCount() -MetricName = 'AddRdsNo' + StartTick = GetTickCount() + MetricName = 'AddRdsNo' -WONo = Parms[1,@RM] -StepNo = Parms[COL2()+1,@RM] -ReactNo = Parms[COL2()+1,@RM] -RdsNo = Parms[COL2()+1,@RM] -CassNo = Parms[COL2()+1,@RM] + WONo = Parms[1,@RM] + StepNo = Parms[COL2()+1,@RM] + ReactNo = Parms[COL2()+1,@RM] + RdsNo = Parms[COL2()+1,@RM] + CassNo = Parms[COL2()+1,@RM] -IF WONo = '' THEN RETURN -IF StepNo = '' THEN RETURN -IF ReactNo = '' THEN RETURN -IF RdsNo = '' THEN RETURN -IF CassNo = '' THEN RETURN + IF WONo = '' THEN RETURN + IF StepNo = '' THEN RETURN + IF ReactNo = '' THEN RETURN + IF RdsNo = '' THEN RETURN + IF CassNo = '' THEN RETURN -WOReactKey = WONo:'*':StepNo:'*':ReactNo - -otParms = 'WO_REACT':@RM:WOReactKey - -WOReactRec = obj_Tables('ReadOnlyRec',otParms) -RDSNos = WOReactRec -CassNos = WOReactRec - -PSNos = XLATE('WO_LOG',WoNo,'PROD_VER_STEP_PSN','X') -PSNo = PSNos<1,StepNo> - -QAMetData = obj_Prod_Spec('GetQAMet',PSNo:@RM:@RM:1) ;* * * Get Reactor Scheduled QA Metrology * * * - -IF QAMetData = '' THEN RETURN ;* No reactor scheduled QA_MET specified - -Start = QAMetData -Interval = QAMetData -Stage = QAMetData -MetPropCd = QAMetData -GOSUB BuildAllTestPos ;* Set RDSNos, Start and Interval -> returns AllTestPos - -* * * Find where the the RDS being added will be in the list. * * * - -LOCATE RDSNo IN WOReactRec USING @VM SETTING InsPos THEN + WOReactKey = WONo:'*':StepNo:'*':ReactNo otParms = 'WO_REACT':@RM:WOReactKey - WOReactRec = obj_Tables('UnlockRec',otParms) - RETURN ;* RDSNo already in this list -> nothing to do. + WOReactRec = obj_Tables('ReadOnlyRec',otParms) + RDSNos = WOReactRec + CassNos = WOReactRec -END ELSE + PSNos = XLATE('WO_LOG',WoNo,'PROD_VER_STEP_PSN','X') + PSNo = PSNos<1,StepNo> - LOCATE InsPos IN AllTestPos USING @VM SETTING TrimPos ELSE Null - + QAMetData = obj_Prod_Spec('GetQAMet',PSNo:@RM:@RM:1) ;* * * Get Reactor Scheduled QA Metrology * * * + + IF QAMetData = '' THEN RETURN ;* No reactor scheduled QA_MET specified + + Start = QAMetData + Interval = QAMetData + Stage = QAMetData + MetPropCd = QAMetData + GOSUB BuildAllTestPos ;* Set RDSNos, Start and Interval -> returns AllTestPos + + * * * Find where the the RDS being added will be in the list. * * * + + LOCATE RDSNo IN WOReactRec USING @VM SETTING InsPos THEN + + otParms = 'WO_REACT':@RM:WOReactKey + WOReactRec = obj_Tables('UnlockRec',otParms) + + RETURN ;* RDSNo already in this list -> nothing to do. + + END ELSE + + LOCATE InsPos IN AllTestPos USING @VM SETTING TrimPos ELSE Null + + ChangePosList = FIELD(AllTestPos,@VM,TrimPos,SeqCnt) + GOSUB RemSchedQA ;* Removes unsigned QAMet from cassettes scheduled past the box being removed + + END + + WOReactRec = INSERT(WOReactRec,WO_REACT_RDS_NO$,InsPos,0,RDSNo) + WOReactRec = INSERT(WOReactRec,WO_REACT_CASS_NO$,InsPos,0,CassNo) ;* Inserts the passed in RDSNo & associated cassette number from the data fields + + RDSNos = WOReactRec ;* List after insert + CassNos = WOReactRec ;* List after insert + + * * * Now build list for cassette + + GOSUB BuildAllTestPos ChangePosList = FIELD(AllTestPos,@VM,TrimPos,SeqCnt) - GOSUB RemSchedQA ;* Removes unsigned QAMet from cassettes scheduled past the box being removed - -END + // Add QAMet spec data to cassettes now associated with the test + // positions after removing the RDS & Cassno from the lists + GOSUB AddSchedQA -WOReactRec = INSERT(WOReactRec,WO_REACT_RDS_NO$,InsPos,0,RDSNo) -WOReactRec = INSERT(WOReactRec,WO_REACT_CASS_NO$,InsPos,0,CassNo) ;* Inserts the passed in RDSNo & associated cassette number from the data fields + otParms = FIELDSTORE(otParms,@RM,4,0,WOReactRec) + // Done with updates to the WO_REACT record + obj_Tables('WriteOnlyRec',otParms) -RDSNos = WOReactRec ;* List after insert -CassNos = WOReactRec ;* List after insert + Result = Log -* * * Now build list for cassette - -GOSUB BuildAllTestPos -ChangePosList = FIELD(AllTestPos,@VM,TrimPos,SeqCnt) - -GOSUB AddSchedQA ;* Add QAMet spec data to cassettes now associated with the test positions after removing the RDS & Cassno from the lists - -otParms = FIELDSTORE(otParms,@RM,4,0,WOReactRec) -obj_Tables('WriteOnlyRec',otParms) ;* Done with updates to the WO_REACT record - -Result = Log - -EndTick = GetTickCount() -Mona_Services('QueueLatencyAndCountMetrics', MonaResource, MetricName, StartTick, EndTick) + EndTick = GetTickCount() + Mona_Services('QueueLatencyAndCountMetrics', MonaResource, MetricName, StartTick, EndTick) RETURN - * * * * * * * RemRDSNo: * * * * * * * -StartTick = GetTickCount() -MetricName = 'RemRDSNo' + StartTick = GetTickCount() + MetricName = 'RemRDSNo' -WONo = Parms[1,@RM] -StepNo = Parms[COL2()+1,@RM] -ReactNo = Parms[COL2()+1,@RM] -RdsNo = Parms[COL2()+1,@RM] -CassNo = Parms[COL2()+1,@RM] + WONo = Parms[1,@RM] + StepNo = Parms[COL2()+1,@RM] + ReactNo = Parms[COL2()+1,@RM] + RdsNo = Parms[COL2()+1,@RM] + CassNo = Parms[COL2()+1,@RM] -IF WONo = '' THEN RETURN -IF StepNo = '' THEN RETURN -IF ReactNo = '' THEN RETURN -IF RdsNo = '' THEN RETURN -IF CassNo = '' THEN RETURN + IF WONo = '' THEN RETURN + IF StepNo = '' THEN RETURN + IF ReactNo = '' THEN RETURN + IF RdsNo = '' THEN RETURN + IF CassNo = '' THEN RETURN -WOReactKey = WONo:'*':StepNo:'*':ReactNo + WOReactKey = WONo:'*':StepNo:'*':ReactNo -otParms = 'WO_REACT':@RM:WOReactKey -// 10/12/18 Changed to ReadOnlyRec as per Francois' instructions. - djs -WOReactRec = obj_Tables('ReadOnlyRec',otParms) + otParms = 'WO_REACT':@RM:WOReactKey + + WOReactRec = obj_Tables('ReadOnlyRec',otParms) -RDSNos = WOReactRec -CassNos = WOReactRec + RDSNos = WOReactRec + CassNos = WOReactRec -PSNos = XLATE('WO_LOG',WoNo,'PROD_VER_STEP_PSN','X') -PSNo = PSNos<1,StepNo> + PSNos = XLATE('WO_LOG',WoNo,'PROD_VER_STEP_PSN','X') + PSNo = PSNos<1,StepNo> -QAMetData = obj_Prod_Spec('GetQAMet',PSNo:@RM:@RM:1) ;* * * Get Reactor Scheduled QA Metrology * * * + QAMetData = obj_Prod_Spec('GetQAMet',PSNo:@RM:@RM:1) ;* * * Get Reactor Scheduled QA Metrology * * * -Start = QAMetData -Interval = QAMetData -Stage = QAMetData -MetPropCd = QAMetData + Start = QAMetData + Interval = QAMetData + Stage = QAMetData + MetPropCd = QAMetData -GOSUB BuildAllTestPos ;* Set RDSNos, Start and Interval -> returns AllTestPos + GOSUB BuildAllTestPos ;* Set RDSNos, Start and Interval -> returns AllTestPos -IF AllTestPos NE '' THEN + IF AllTestPos NE '' THEN - * * * Find where the the RDS being removed is in the list. * * * + * * * Find where the the RDS being removed is in the list. * * * - LOCATE RDSNo IN WOReactRec USING @VM SETTING RemPos THEN + LOCATE RDSNo IN WOReactRec USING @VM SETTING RemPos THEN - LOCATE RemPos IN AllTestPos USING @VM SETTING TrimPos ELSE Null - - ChangePosList = FIELD(AllTestPos,@VM,TrimPos,SeqCnt) - - GOSUB RemSchedQA ;* Removes unsigned QAMet from cassettes scheduled past the box being removed - END ELSE - - otParms = 'WO_REACT':@RM:WOReactKey - WOReactRec = obj_Tables('UnlockRec',otParms) + LOCATE RemPos IN AllTestPos USING @VM SETTING TrimPos ELSE Null + + ChangePosList = FIELD(AllTestPos,@VM,TrimPos,SeqCnt) + + GOSUB RemSchedQA ;* Removes unsigned QAMet from cassettes scheduled past the box being removed + END ELSE + + otParms = 'WO_REACT':@RM:WOReactKey + WOReactRec = obj_Tables('UnlockRec',otParms) - RETURN ;* RDSNo is not in this list -> nothing to do. - END -END ;* End of check for AllTestPos null + RETURN ;* RDSNo is not in this list -> nothing to do. + END + END ;* End of check for AllTestPos null -WOReactRec = DELETE(WOReactRec,WO_REACT_RDS_NO$,RemPos,0) -WOReactRec = DELETE(WOReactRec,WO_REACT_CASS_NO$,RemPos,0) ;* Removes the passed in RDSNo & associated cassette number from the data fields + WOReactRec = DELETE(WOReactRec,WO_REACT_RDS_NO$,RemPos,0) + WOReactRec = DELETE(WOReactRec,WO_REACT_CASS_NO$,RemPos,0) ;* Removes the passed in RDSNo & associated cassette number from the data fields -RDSNos = WOReactRec ;* List after removal -CassNos = WOReactRec ;* List after removal + RDSNos = WOReactRec ;* List after removal + CassNos = WOReactRec ;* List after removal -* * * Now build list for cassette - -GOSUB BuildAllTestPos -ChangePosList = FIELD(AllTestPos,@VM,TrimPos,SeqCnt) + * * * Now build list for cassette + + GOSUB BuildAllTestPos + ChangePosList = FIELD(AllTestPos,@VM,TrimPos,SeqCnt) -GOSUB AddSchedQA ;* Add QAMet spec data to cassettes now associated with the test positions after removing the RDS & Cassno from the lists -otParms = FIELDSTORE(otParms,@RM,4,0,WOReactRec) -// 10/12/18 Changed to WriteOnlyRec as per Francois' instructions. - djs -obj_Tables('WriteOnlyRec',otParms) ;* Done with updates to the WO_REACT record + GOSUB AddSchedQA ;* Add QAMet spec data to cassettes now associated with the test positions after removing the RDS & Cassno from the lists + otParms = FIELDSTORE(otParms,@RM,4,0,WOReactRec) -Result = Log + obj_Tables('WriteOnlyRec',otParms) ;* Done with updates to the WO_REACT record -EndTick = GetTickCount() -Mona_Services('QueueLatencyAndCountMetrics', MonaResource, MetricName, StartTick, EndTick) + Result = Log + + EndTick = GetTickCount() + Mona_Services('QueueLatencyAndCountMetrics', MonaResource, MetricName, StartTick, EndTick) RETURN - - - ************** Internal Methods ************* * * * * * * * BuildAllTestPos: * * * * * * * -AllTestPos = '' + AllTestPos = '' -RDSCnt = COUNT(RDSNos,@VM) + (RDSNos NE '') -SeqCnt = 0 + RDSCnt = COUNT(RDSNos,@VM) + (RDSNos NE '') + SeqCnt = 0 -FOR TestSeq = 1 TO RDSCnt - IF REM((TestSeq - Start),Interval) = 0 THEN - AllTestPos<1,-1> = TestSeq ;* Build list of list positions to have QAMet scheduled - SeqCnt += 1 - END -NEXT TestSeq + FOR TestSeq = 1 TO RDSCnt + IF REM((TestSeq - Start),Interval) = 0 THEN + AllTestPos<1,-1> = TestSeq ;* Build list of list positions to have QAMet scheduled + SeqCnt += 1 + END + NEXT TestSeq -Log := 'AllTestPos: ':AllTestPos:@FM + Log := 'AllTestPos: ':AllTestPos:@FM RETURN - * * * * * * * RemSchedQA: * * * * * * * -chgCnt = COUNT(ChangePosList,@VM) + (ChangePosList NE '') + chgCnt = COUNT(ChangePosList,@VM) + (ChangePosList NE '') -FOR I = 1 TO chgCnt - RemCassNo = CassNos<1,ChangePoslist<1,I>> - Log:= 'RemSched on CassNo: ':RemCassNo:@FM - - owmParms = WONo:@RM:StepNo:@RM:RemCassNo:@RM:Stage:@RM:MetPropCd - - obj_WO_Mat_QA('RemQAMet',owmParms) ;* Unschedule test boxes before list change - - IF Get_Status(errCode) THEN - ErrMsg(errCode) - END - - - *obj_WO_Mat('RemQAMet',owmParms) ;* Dead 6/5/2015 JCH - Remove after a few days - - *IF Get_Status(errCode) THEN - * ErrMsg(errCode) - *END -NEXT I + FOR I = 1 TO chgCnt + RemCassNo = CassNos<1,ChangePoslist<1,I>> + Log:= 'RemSched on CassNo: ':RemCassNo:@FM + + owmParms = WONo:@RM:StepNo:@RM:RemCassNo:@RM:Stage:@RM:MetPropCd + + obj_WO_Mat_QA('RemQAMet',owmParms) ;* Unschedule test boxes before list change + + IF Get_Status(errCode) THEN + ErrMsg(errCode) + END + + NEXT I RETURN @@ -294,47 +284,39 @@ RETURN AddSchedQA: * * * * * * * -chgCnt = COUNT(ChangePosList,@VM) + (ChangePosList NE '') + chgCnt = COUNT(ChangePosList,@VM) + (ChangePosList NE '') -FOR I = 1 TO chgCnt - AddCassNo = CassNos<1,ChangePoslist<1,I>> - - Log:= 'AddSched on CassNo: ':AddCassNo:@FM - - owmParms = WONo:@RM - owmParms := StepNo:@RM - owmParms := AddCassNo:@RM - owmParms := QAMetData:@RM - owmParms := QAMetData:@RM - owmParms := QAMetData:@RM - owmParms := QAMetData:@RM - owmParms := QAMetData:@RM - owmParms := QAMetData:@RM - owmParms := QAMetData:@RM - owmParms := QAMetData:@RM - owmParms := QAMetData:@RM - owmParms := QAMetData:@RM - owmParms := QAMetData:@RM - owmParms := QAMetData:@RM - owmParms := QAMetData:@RM - owmParms := QAMetData ; // 10/15/18 - djs - Added Phase Min Spec for HgCV - - - obj_WO_Mat_QA('AddQAMet', owmParms) ;* Schedule test boxes after list change - - IF Get_Status(errCode) THEN - ErrMsg(errCode) - END - - *obj_WO_Mat('AddQAMet',owmParms) ;* Dead 6/5/2015 JCH - remove after a few days - - *IF Get_Status(errCode) THEN - * ErrMsg(errCode) - *END - - - -NEXT I + FOR I = 1 TO chgCnt + AddCassNo = CassNos<1,ChangePoslist<1,I>> + + Log:= 'AddSched on CassNo: ':AddCassNo:@FM + + owmParms = WONo:@RM + owmParms := StepNo:@RM + owmParms := AddCassNo:@RM + owmParms := QAMetData:@RM + owmParms := QAMetData:@RM + owmParms := QAMetData:@RM + owmParms := QAMetData:@RM + owmParms := QAMetData:@RM + owmParms := QAMetData:@RM + owmParms := QAMetData:@RM + owmParms := QAMetData:@RM + owmParms := QAMetData:@RM + owmParms := QAMetData:@RM + owmParms := QAMetData:@RM + owmParms := QAMetData:@RM + owmParms := QAMetData:@RM + owmParms := QAMetData ; // 10/15/18 - djs - Added Phase Min Spec for HgCV + + + obj_WO_Mat_QA('AddQAMet', owmParms) ;* Schedule test boxes after list change + + IF Get_Status(errCode) THEN + ErrMsg(errCode) + END + + NEXT I RETURN diff --git a/LSL2/STPROC/WO_MAT_QA_SERVICES.txt b/LSL2/STPROC/WO_MAT_QA_SERVICES.txt index 71bfa22..a07f6dd 100644 --- a/LSL2/STPROC/WO_MAT_QA_SERVICES.txt +++ b/LSL2/STPROC/WO_MAT_QA_SERVICES.txt @@ -57,6 +57,8 @@ $Insert PRS_LAYER_EQUATES $Insert PRS_STAGE_EQUATES $Insert PROD_VER_EQUATES $Insert QA_MET_EQUATES ;* Used in GetQAMet data structure return variable +$Insert RDS_EQUATES +$Insert WO_REACT_EQUATES Declare function Database_Services, SRP_JSON, Error_Services, obj_Prod_Spec, Wo_Mat_Qa_Services Declare subroutine Database_Services, SRP_JSON, Error_Services @@ -192,130 +194,168 @@ End Service Service UpdateQAMet(WOMatKey) - + WOMatQARec = '' ErrorMsg = '' If (WOMatKey NE '') then - - WONo = Field(WOMatKey, '*', 1) - CassNo = Field(WOMatKey, '*', 2) - - * * * * * * * * Build QA_MET profile - Work Order scheduled only * * * * * * * * - WOStepKeys = XLATE('WO_LOG', WONo, WO_LOG_WO_STEP_KEY$, 'X') - - StepCnt = DCount(WOStepKeys,@VM) - - EpiProPSNo = '' - EpiProPSRec = '' - - MetLine = 1 - - // Get original WO_MAT_QA record to copy any test results - OrigWOMatQARec = Database_Services('ReadDataRow', 'WO_MAT_QA', WOMatKey) - OrigQAStages = OrigWOMatQARec - OrigQAProfiles = OrigWOMatQARec - OrigQASlots = OrigWOMatQARec - OrigQASlotTests = OrigWOMatQARec - OrigQAResults = OrigWOMatQARec - OrigQASigs = OrigWOMatQARec - OrigQASigDtms = OrigWOMatQARec - OrigQAStdResults = OrigWOMatQARec - OrigQADataPoints = OrigWOMatQARec - OrigQAMinResults = OrigWOMatQARec - OrigQAMaxResults = OrigWOMatQARec - OrigQARangeResults = OrigWOMatQARec - OrigQAEdgeResults = OrigWOMatQARec - OrigQA5mmResults = OrigWOMatQARec - OrigQAOutOfSpecs = OrigWOMatQARec - OrigQAFailReasons = OrigWOMatQARec - - * WO_MAT record is used to check for pre-existing signatures jch 6/7/2015 - WOMatRec = Database_Services('ReadDataRow', 'WO_MAT', WOMatKey) - - FOR WOStepNo = 1 TO StepCnt - PSNo = XLATE('WO_STEP', WOStepKeys<1,WOStepNo>, WO_STEP_PROD_SPEC_ID$, 'X') - PSRec = Database_Services('ReadDataRow', 'PROD_SPEC', PSNo) - QAMetData = obj_Prod_Spec('GetQAMet',PSNo:@RM:PSRec) - QAStages = QAMetData - StageCnt = COUNT(QAStages,@VM) + (QAStages NE '') - - FOR StageNo = 1 TO StageCnt - Stage = QAMetData - - MetTest = QAMetData ;* StageRec - - Interval = QAMetData ;* StageRec - Start = QAMetData ;* StageRec - ReactSched = QAMetData ;* StageRec - TestFlag = 0 - - IF Interval NE '' AND Start NE '' THEN - IF Interval = Start THEN - IF REM(CassNo,Interval) = 0 THEN TestFlag = 1 - END ELSE - IF ABS((Start + INT(CassNo/Interval)*Interval) - CassNo) = 0 THEN TestFlag = 1 - END - IF TestFlag AND NOT(ReactSched) THEN - WOMatQARec = WOStepNo:QAMetData ;* StageRec - WOMatQARec = QAMetData ;* StageRec - WOMatQARec = QAMetData ;* StageRec - WOMatQARec = QAMetData - WOMatQARec = QAMetData ;* StageRec - WOMatQARec = QAMetData ;* StageRec - WOMatQARec = QAMetData ;* StageRec - WOMatQARec = QAMetData ;* StageRec - WOMatQARec = QAMetData ;* StageRec - WOMatQARec = QAMetData ;* StageRec - WOMatQARec = QAMetData ;* StageRec - WOMatQARec = ReactSched ;* StageRec - WOMatQARec = QAMetData ;* StageRec - WOMatQARec = QAMetData - - If OrigWOMatQARec NE '' then - CurrStage = QAMetData - CurrProfile = WOStepNo:QAMetData - CurrSlot = QAMetData - // Copy any existing results from the original WO_MAT_QA record. - If OrigQAStages NE '' then - Found = False$ - For each OrigQAStage in OrigQAStages using @VM setting sPos - OrigQAProfile = OrigQAProfiles<0, sPos> - OrigQASlot = OrigQASlots<0, sPos> - If ( (CurrStage EQ OrigQAStage) and (CurrProfile EQ OrigQAProfile) and (CurrSlot EQ OrigQASlot) ) then - Found = True$ - WOMatQARec = OrigQASlotTests<0, sPos> - WOMatQARec = OrigQAResults<0, sPos> - WOMatQARec = OrigQASigs<0, sPos> - WOMatQARec = OrigQASigDtms<0, sPos> - WOMatQARec = OrigQAStdResults<0, sPos> - WOMatQARec = OrigQADataPoints<0, sPos> - WOMatQARec = OrigQAMinResults<0, sPos> - WOMatQARec = OrigQAMaxResults<0, sPos> - WOMatQARec = OrigQARangeResults<0, sPos> - WOMatQARec = OrigQAEdgeResults<0, sPos> - WOMatQARec = OrigQA5mmResults<0, sPos> - WOMatQARec = OrigQAOutOfSpecs<0, sPos> - WOMatQARec = OrigQAFailReasons<0, sPos> - end - Until Found - Next OrigQAStage - end - end - MetLine += 1 - END - END - - NEXT StageNo - - NEXT WOStepNo - - Database_Services('WriteDataRow', 'WO_MAT_QA', WONo:'*':CassNo, WOMatQARec) - + WONo = Field(WOMatKey, '*', 1) + CassNo = Field(WOMatKey, '*', 2) + RDSNo = Database_Services('ReadDataColumn', 'WO_MAT', WOMatKey, WO_MAT_RDS_NO$) + If Error_Services('NoError') then + If (RDSNo NE '') then + // Check if it has been assigned to a reactor + ReactNo = Database_Services('ReadDataColumn', 'RDS', RDSNo, RDS_REACTOR$) + If Error_Services('HasError') then + ErrorMsg = 'Error in ':Service:' service. Error message: ':Error_Services('GetMessage') + end + end else + // Either not signed into a reactor yet or this WO_MAT is EpiPro and therefore there is no + // 1-to-1 RDS record. Because of this, reactor scheduled QA met is not possible with EpiPro. + ReactNo = '' + end + If (ErrorMsg EQ '') then + WOStepKeys = Database_Services('ReadDataColumn', 'WO_LOG', WONo, WO_LOG_WO_STEP_KEY$) + If Error_Services('NoError') then + StepCnt = DCount(WOStepKeys,@VM) + MetLine = 1 + // Get original WO_MAT_QA record to copy any test results + OrigWOMatQARec = Database_Services('ReadDataRow', 'WO_MAT_QA', WOMatKey) + OrigQAStages = OrigWOMatQARec + OrigQAProfiles = OrigWOMatQARec + OrigQASlots = OrigWOMatQARec + OrigQASlotTests = OrigWOMatQARec + OrigQAResults = OrigWOMatQARec + OrigQASigs = OrigWOMatQARec + OrigQASigDtms = OrigWOMatQARec + OrigQAStdResults = OrigWOMatQARec + OrigQADataPoints = OrigWOMatQARec + OrigQAMinResults = OrigWOMatQARec + OrigQAMaxResults = OrigWOMatQARec + OrigQARangeResults = OrigWOMatQARec + OrigQAEdgeResults = OrigWOMatQARec + OrigQA5mmResults = OrigWOMatQARec + OrigQAOutOfSpecs = OrigWOMatQARec + OrigQAFailReasons = OrigWOMatQARec + + FOR WOStepNo = 1 TO StepCnt + PSNo = Database_Services('ReadDataColumn', 'WO_STEP', WOStepKeys<1,WOStepNo>, WO_STEP_PROD_SPEC_ID$) + If Error_Services('NoError') then + PSRec = Database_Services('ReadDataRow', 'PROD_SPEC', PSNo) + If Error_Services('NoError') then + QAMetData = obj_Prod_Spec('GetQAMet',PSNo:@RM:PSRec:@RM:@RM:True$) + QAStages = QAMetData + StageCnt = DCount(QAStages,@VM) + + If (ReactNo NE '') then + WOReactKey = WONo:'*':WOStepNo:'*':ReactNo + end else + WOReactKey = '' + end + + If (WOReactKey NE '') then + WOReactRDSNos = Database_Services('ReadDataColumn', 'WO_REACT', WOReactKey, WO_REACT_RDS_NO$) + If Error_Services('HasError') then + ErrorMsg = 'Error in ':Service:' service. Error message: ':Error_Services('GetMessage') + end + end + + If (ErrorMsg EQ '') then + For StageNo = 1 to StageCnt + Stage = QAMetData + MetTest = QAMetData ;* StageRec + Interval = QAMetData ;* StageRec + Start = QAMetData ;* StageRec + ReactSched = QAMetData ;* StageRec + TestFlag = False$ + + If ( (Interval NE '') and (Start NE '') ) then + // Add Work Order scheduled tests (i.e., not reactor scheduled tests) + If Not(ReactSched) then + If Interval = Start then + If ( Rem(CassNo, Interval) EQ 0 ) then TestFlag = True$ + end else + If ( Abs( (Start + Int(CassNo / Interval)*Interval) - CassNo ) EQ 0) then TestFlag = True$ + end + end else + Locate RDSNo in WOReactRDSNos using @VM setting TestSeq then + If ( Rem( (TestSeq - Start), Interval) EQ 0 ) then TestFlag = True$ + end + end + If TestFlag then + WOMatQARec = WOStepNo:MetTest + WOMatQARec = QAMetData + WOMatQARec = QAMetData + WOMatQARec = Stage + WOMatQARec = QAMetData + WOMatQARec = QAMetData + WOMatQARec = QAMetData + WOMatQARec = QAMetData + WOMatQARec = QAMetData + WOMatQARec = QAMetData + WOMatQARec = QAMetData + WOMatQARec = ReactSched + WOMatQARec = QAMetData + WOMatQARec = QAMetData + + If OrigWOMatQARec NE '' then + CurrStage = QAMetData + CurrProfile = WOStepNo:MetTest + CurrSlot = QAMetData + // Copy any existing results from the original WO_MAT_QA record. + If OrigQAStages NE '' then + Found = False$ + For each OrigQAStage in OrigQAStages using @VM setting sPos + OrigQAProfile = OrigQAProfiles<0, sPos> + OrigQASlot = OrigQASlots<0, sPos> + If ( (CurrStage EQ OrigQAStage) and (CurrProfile EQ OrigQAProfile) and (CurrSlot EQ OrigQASlot) ) then + Found = True$ + WOMatQARec = OrigQASlotTests<0, sPos> + WOMatQARec = OrigQAResults<0, sPos> + WOMatQARec = OrigQASigs<0, sPos> + WOMatQARec = OrigQASigDtms<0, sPos> + WOMatQARec = OrigQAStdResults<0, sPos> + WOMatQARec = OrigQADataPoints<0, sPos> + WOMatQARec = OrigQAMinResults<0, sPos> + WOMatQARec = OrigQAMaxResults<0, sPos> + WOMatQARec = OrigQARangeResults<0, sPos> + WOMatQARec = OrigQAEdgeResults<0, sPos> + WOMatQARec = OrigQA5mmResults<0, sPos> + WOMatQARec = OrigQAOutOfSpecs<0, sPos> + WOMatQARec = OrigQAFailReasons<0, sPos> + end + Until Found + Next OrigQAStage + end + end + MetLine += 1 + end + end + Next StageNo + end + end else + ErrorMsg = 'Error in ':Service:' service. Error message: ':Error_Services('GetMessage') + end + end else + ErrorMsg = 'Error in ':Service:' service. Error message: ':Error_Services('GetMessage') + end + Until (ErrorMsg NE '') + Next WOStepNo + If (ErrorMsg EQ '') then + Database_Services('WriteDataRow', 'WO_MAT_QA', WONo:'*':CassNo, WOMatQARec) + If Error_Services('HasError') then ErrorMsg = 'Error in ':Service:' service. Error message: ':Error_Services('GetMessage') + end + end else + ErrorMsg = 'Error in ':Service:' service. Error message: ':Error_Services('GetMessage') + end + end + end else + ErrorMsg = 'Error in ':Service:' service. Error message: ':Error_Services('GetMessage') + end end else ErrorMsg = 'Error in ':Service:' service. Null WOMatKey passed in.' end - If ErrorMsg NE '' then + If (ErrorMsg NE '') then Error_Services('Add', ErrorMsg) end else Response = WOMatQARec @@ -469,7 +509,7 @@ end service Service GetMUWaferQAComplete(WOMatKey) - + ErrorMsg = '' If WOMatKey NE '' then @@ -521,4 +561,3 @@ Service GetMUWaferQAComplete(WOMatKey) end service -