diff --git a/LSL2/STPROC/OBJ_RDS.txt b/LSL2/STPROC/OBJ_RDS.txt index bb4a71e..ef0091a 100644 --- a/LSL2/STPROC/OBJ_RDS.txt +++ b/LSL2/STPROC/OBJ_RDS.txt @@ -18,10 +18,10 @@ COMPILE FUNCTION obj_RDS(Method,Parms) DECLARE FUNCTION Get_Status, Msg, Utility, obj_Tables, NextKey, obj_WO_Verify, obj_Prod_Spec, Send_Dyn, obj_RDS_Makeup DECLARE FUNCTION obj_RDS2, obj_RDS_Test, obj_WO_Mat, obj_Clean_Insp, obj_PRS_Prop, Database_Services -DECLARE FUNCTION Logging_Services, Environment_Services, Error_Services, Signature_Services +DECLARE FUNCTION Logging_Services, Environment_Services, Error_Services, Signature_Services, Supplement_Services DECLARE SUBROUTINE Set_Status, Msg, obj_Tables, Send_Dyn, obj_WO_Step, obj_RDS_Layer, obj_RDS_Test, obj_WM_In DECLARE SUBROUTINE Btree.Extract, RDS_React_Run, Environment_Services, Logging_Services, Error_Services, Send_Info -DECLARE SUBROUTINE SRP_Stopwatch, Database_Services, Lot_Services +DECLARE SUBROUTINE SRP_Stopwatch, Database_Services, Lot_Services, Supplement_Services $INSERT MSG_EQUATES $INSERT WO_VERIFY_EQU @@ -464,32 +464,7 @@ Create: NEXT I - ******************************** - *Automatically Apply Supplement* - ******************************** - // If first cassette in work order, then there is no supplement in place, therefore skip this step. - If RDSRec GT 1 then - WoStepKey = RDSRec - WoStepRec = Database_Services('ReadDataRow', 'WO_STEP', WoStepKey) - If Error_Services('NoError') then - LastRDSKey = WoStepRec[-1, 'B' : @VM] - LastRDSRec = Database_Services('ReadDataRow', 'RDS', LastRDSKey) - If Error_Services('NoError') then - HasSupplement = LastRDSRec - If HasSupplement then - RDSRec = True$ - RDSRec = LastRDSRec - RDSRec = LastRDSRec - RDSRec = LastRDSRec - RDSRec = LastRDSRec - end - end else - Logging_Services('AppendLog', objLog, LoggingDTM : ',' : @USER4 : ',' : RDSNo : ',' : 'Error automatically applying supplement to new RDS.') - end - end else - Logging_Services('AppendLog', objLog, LoggingDTM : ',' : @USER4 : ',' : RDSNo : ',' : 'Error automatically applying supplement to new RDS.') - end - end + Send_Info('Saving RDS record...') @@ -502,6 +477,29 @@ Create: END ELSE Lot_Services('CreateNewLot', 'RDS', '', WaferQty, SubPartNo, LotNo, SubVendCd, @User4, '', RDSNo) Result = RDSNo + ******************************** + *Automatically Apply Supplement* + ******************************** + // If first cassette in work order, then there is no supplement in place, therefore skip this step. + If RDSRec GT 1 then + WoStepKey = RDSRec + WoStepRec = Database_Services('ReadDataRow', 'WO_STEP', WoStepKey) + If Error_Services('NoError') then + RDSKeyCount = Dcount(WoStepRec, @VM) + LastRDSKey = WoStepRec + LastRDSRec = Database_Services('ReadDataRow', 'RDS', LastRDSKey) + If Error_Services('NoError') then + HasSupplement = Supplement_Services('HasSupplements', 'RDS', LastRDSKey, '') + If HasSupplement then + Supplement_Services('CopySupplementsToNewLot', 'RDS', LastRDSKey, RDSNo) + end + end else + Logging_Services('AppendLog', objLog, LoggingDTM : ',' : @USER4 : ',' : RDSNo : ',' : 'Error automatically applying supplement to new RDS.') + end + end else + Logging_Services('AppendLog', objLog, LoggingDTM : ',' : @USER4 : ',' : RDSNo : ',' : 'Error automatically applying supplement to new RDS.') + end + end END * * * * * * * @@ -1479,3 +1477,5 @@ CalcThickTarget: RETURN + + diff --git a/LSL2/STPROC/QA_SERVICES.txt b/LSL2/STPROC/QA_SERVICES.txt index 6f68e0b..f100997 100644 --- a/LSL2/STPROC/QA_SERVICES.txt +++ b/LSL2/STPROC/QA_SERVICES.txt @@ -2030,7 +2030,8 @@ Service LoadSignatureReady(RDSNo, Username, WaferQty, LLSide, PreFlag, ReactNoOp RunOrderNo = Xlate('RDS', RDSNo, 'RUN_ORDER_NUM', 'X') SchedQty = RDSRec ParamOutOfSpec = Xlate('RDS', RDSNo, 'PARAM_OUT_OF_SPEC', 'X') - Supplement = RDSRec +* Supplement = RDSRec + Supplement = Supplement_Services('HasSupplements', 'RDS', RDSNo, 'LOAD') ReactorCapacity = Reactor_Services('GetReactorAvailChamberCount', Reactor) If ReactorCapacity LE 0 then @@ -2092,8 +2093,7 @@ Service LoadSignatureReady(RDSNo, Username, WaferQty, LLSide, PreFlag, ReactNoOp end Locate True$ in ParamOutOfSpec using @VM setting oPos then - - IF Supplement NE True$ then + IF Supplement EQ False$ then ErrorMsg = 'Process Error: Recipe parameters are out of spec and no supplement has been set.' Error_Services('Set', ErrorMsg) Response = False$ @@ -2601,9 +2601,9 @@ Service UnloadSignatureReady(RDSNo, Username, Reactor) return END ParamOutOfSpec = Xlate('RDS', RDSNo, 'PARAM_OUT_OF_SPEC', 'X') - Supplement = RDSRec + Supplement = Supplement_Services('HasSupplements', 'RDS', RDSNo, '') Locate True$ in ParamOutOfSpec using @VM setting oPos then - IF Supplement NE True$ then + IF Supplement EQ False$ then ErrorMsg = 'Process Error: Recipe parameters are out of spec and no supplement has been set.' Error_Services('Set', ErrorMsg) Response = False$ @@ -3645,3 +3645,5 @@ ClearCursors: return + + diff --git a/LSL2/STPROC/RDS_REACT_RUN.txt b/LSL2/STPROC/RDS_REACT_RUN.txt index e7e087f..7337a11 100644 --- a/LSL2/STPROC/RDS_REACT_RUN.txt +++ b/LSL2/STPROC/RDS_REACT_RUN.txt @@ -80,14 +80,6 @@ READ RDSRec FROM RDSTable,RDSNo THEN RunRec = RDSRec RunRec = RDSRec - IF RDSRec = 1 THEN - RunRec = RDSRec - RunRec = RDSRec - RunRec = ICONV(OCONV(RDSRec,'D4/'):' ':OCONV(RDSRec,'MTS'),'DT') - RunRec = RDSRec - RunRec = ICONV(OCONV(RDSRec,'D4/'):' ':OCONV(RDSRec,'MTS'),'DT') - END - RunRec = RDSRec RunRec = ICONV(OCONV(RDSRec,'D4/'):' ':OCONV(RDSRec,'MTS'),'DT') RunRec = '' diff --git a/LSL2/STPROC/REACT_RUN_RDS.txt b/LSL2/STPROC/REACT_RUN_RDS.txt index 87c4140..83116d5 100644 --- a/LSL2/STPROC/REACT_RUN_RDS.txt +++ b/LSL2/STPROC/REACT_RUN_RDS.txt @@ -102,24 +102,6 @@ READ RunRec FROM RRTable,RDSNo THEN RDSRec = RunRec RDSRec = RunRec RDSRec = RunRec - - IF RunRec NE '' THEN - RDSRec = 1 - RDSRec = RunRec - RDSRec = RunRec - - SuppEntryDTM = OCONV(RunRec,'DT/4^HS') - - RDSRec = ICONV(FIELD(SuppEntryDTM,' ',1),'D') - RDSRec = ICONV(FIELD(SuppEntryDTM,' ',2),'MTS') - - RDSRec = RunRec - - SuppSigDTM = RunRec - - RDSRec = ICONV(FIELD(SuppSigDTM,' ',1),'D') - RDSRec = ICONV(FIELD(SuppSigDTM,' ',2),'MTS') - END RDSRec = RunRec diff --git a/LSL2/STPROC/SUPPLEMENT_SERVICES.txt b/LSL2/STPROC/SUPPLEMENT_SERVICES.txt index 9618aa5..a9bb837 100644 --- a/LSL2/STPROC/SUPPLEMENT_SERVICES.txt +++ b/LSL2/STPROC/SUPPLEMENT_SERVICES.txt @@ -239,6 +239,57 @@ Service GetLotsWithSupplements(LotType) end service +//---------------------------------------------------------------------------------------------------------------------- +// HasSupplements +// +// LotType - [Required] +// LotID - [Required] +// Stage = [Optional] +// +// Returns a boolean response for whether or not a lot has any supplements assigned. +// +//---------------------------------------------------------------------------------------------------------------------- +Service HasSupplements(LotType=LOTTYPES, LotID, Stage=STAGES) + + Response = '' + Supplements = Supplement_Services('GetSupplementsForLot', LotType, LotID, Stage) + If Supplements EQ False$ then + Response = Supplements + end else + Response = True$ + end + +end service + + +//---------------------------------------------------------------------------------------------------------------------- +// CopySupplementsToNewLot +// +// LotType - [Required] +// OldLotID - [Required] +// NewLotID - [Required] +// +// Returns a boolean response for whether or not a lot has any supplements assigned. +// +//---------------------------------------------------------------------------------------------------------------------- +Service CopySupplementsToNewLot(LotType=LOTTYPES, OldLotID, NewLotID) + + If Supplement_Services('HasSupplements', LotType, OldLotID, '') then + SupplementKeys = Supplement_Services('GetSupplementsForLot', LotType, OldLotID, '') + SuppCount = Dcount(SupplementKeys, @FM) + For I = 1 to SuppCount + OldSuppRec = Xlate('SUPPLEMENTS', SupplementKeys, '', 'X') + SupplText = OldSuppRec + EntryUser = OldSuppRec + Stage = OldSuppRec + Supplement_Services('CreateSupplement', LotType, NewLotID, Stage, SupplText, EntryUser) + Next I + end else + Error_Services('Add', 'The lot associatied with this OldLotID does not contain any supplements.') + end + +end service + //---------------------------------------------------------------------------------------------------------------------- // GetSupplementsForLot @@ -633,3 +684,5 @@ Service SendNotifications(RDSList, EditEvent, Instructions, EntryUser) end service + +