updated WO_MAT and WM_IN actions to mark cassettes as processed when cassettes have a quantity of zero

This commit is contained in:
Infineon\StieberD 2024-11-11 13:24:05 -07:00
parent 8282b5a7d4
commit 19fb71d733
13 changed files with 3414 additions and 3484 deletions

View File

@ -245,7 +245,7 @@ end service
Service DeployHGCV() Service DeployHGCV()
debug
! Get list of work orders in production today. ! Get list of work orders in production today.
SchedEvents = Schedule_Services('GetScheduleEvents', (date() - 7), (date() + 7)) SchedEvents = Schedule_Services('GetScheduleEvents', (date() - 7), (date() + 7))
WOList = '' WOList = ''
@ -350,7 +350,7 @@ Service DeployHGCV()
HgCVList = Database_Services('ReadDataRow', 'SYSLISTS', 'HGCV_UAT') HgCVList = Database_Services('ReadDataRow', 'SYSLISTS', 'HGCV_UAT')
For each WoMatQAKey in HgCVList using @VM For each WoMatQAKey in HgCVList using @VM
If WOMatQAKey EQ '167798*67' then debug
Database_Services('ActivateRecord', 'WO_MAT_QA', WoMatQAKey) Database_Services('ActivateRecord', 'WO_MAT_QA', WoMatQAKey)
Profiles = {PROFILE} Profiles = {PROFILE}
ThickRecipeFound = False$ ThickRecipeFound = False$
@ -586,7 +586,8 @@ Service SetupDevServices()
DevDBServices = 'Update Material Logs':@VM:'Log Transaction Postings':@VM:'Process Wafer Image Queue':@VM DevDBServices = 'Update Material Logs':@VM:'Log Transaction Postings':@VM:'Process Wafer Image Queue':@VM
DevDBServices := 'Process UCL Requests':@VM:'Process ROTR Requests':@VM:'Process Wafer Image Requests':@VM DevDBServices := 'Process UCL Requests':@VM:'Process ROTR Requests':@VM:'Process Wafer Image Requests':@VM
DevDBServices := 'Process SQL Requests':@VM:'Send Notes':@VM:'Update Notification Groups' DevDBServices := 'Process SQL Requests':@VM:'Send Notes':@VM:'Update Notification Groups':@VM
DevDBServices := 'Update Security Groups':@VM:'Auto Scheduler'
Query = "SELECT SERVICES" Query = "SELECT SERVICES"

View File

@ -74,7 +74,7 @@ EQU COL$TAGS TO 9
EQU COL$TOOL_ID TO 10 EQU COL$TOOL_ID TO 10
Declare function Database_Services, obj_NCR, obj_SAP, Environment_Services, Logging_Services, obj_Tables Declare function Database_Services, obj_NCR, obj_SAP, Environment_Services, Logging_Services, obj_Tables
Declare function obj_WO_Mat, obj_RDS, Error_Services, MemberOf Declare function obj_WO_Mat, obj_RDS, Error_Services, MemberOf, SRP_Array
Declare subroutine Error_Services, Database_Services, obj_NCR, obj_SAP, Material_Services, Work_Order_Services Declare subroutine Error_Services, Database_Services, obj_NCR, obj_SAP, Material_Services, Work_Order_Services
Declare subroutine Logging_Services, Set_Status, obj_WO_Mat, obj_WO_Mat_Log, Schedule_Services, obj_Tables Declare subroutine Logging_Services, Set_Status, obj_WO_Mat, obj_WO_Mat_Log, Schedule_Services, obj_Tables
Declare subroutine obj_RDS, SAP_Services, Pass_To_SQL, NCR_Services Declare subroutine obj_RDS, SAP_Services, Pass_To_SQL, NCR_Services
@ -331,6 +331,7 @@ WRITE_RECORD:
OrigStatus = OrigRecord<NCR_STATUS$> OrigStatus = OrigRecord<NCR_STATUS$>
NewStatus = Record<NCR_STATUS$> NewStatus = Record<NCR_STATUS$>
If ( (OrigStatus NE NewStatus) and (NewStatus EQ 'C') ) then If ( (OrigStatus NE NewStatus) and (NewStatus EQ 'C') ) then
******************** ********************
@ -375,6 +376,8 @@ WRITE_RECORD:
If (ReactorType EQ 'EPP') then If (ReactorType EQ 'EPP') then
InCassNos = {CASS_NO}
**************************************************************************** ****************************************************************************
* Verify the need to "Auto-Sign" the box after returning from the NCR form * * Verify the need to "Auto-Sign" the box after returning from the NCR form *
**************************************************************************** ****************************************************************************
@ -500,11 +503,6 @@ WRITE_RECORD:
END END
END END
***********************************************************
* Mark the cassette as "processed" for scheduler purposes *
***********************************************************
Schedule_Services('MarkCassProcessed', WONo, CassNo, SigDTM)
*********************************************************************** ***********************************************************************
* Send CASS_COMP transaction to SAP to inform SAP of the rejected box * * Send CASS_COMP transaction to SAP to inform SAP of the rejected box *
*********************************************************************** ***********************************************************************
@ -653,11 +651,6 @@ WRITE_RECORD:
END END
END END
***********************************************************
* Mark the cassette as "processed" for scheduler purposes *
***********************************************************
Schedule_Services('MarkCassProcessed', WONo, CassNo, SigDTM)
*********************************************************************** ***********************************************************************
* Send CASS_COMP transaction to SAP to inform SAP of the rejected box * * Send CASS_COMP transaction to SAP to inform SAP of the rejected box *
*********************************************************************** ***********************************************************************

View File

@ -846,7 +846,15 @@ Event PUB_CHANGE_CASS_QTY.CLICK()
IF Get_Status(errCode) THEN ErrMsg(errCode) IF Get_Status(errCode) THEN ErrMsg(errCode)
// Set CtrlMap variable to the control(s) that need to be updated // Set CtrlMap variable to the control(s) that need to be updated
CtrlMap = 'EDT_CASS_NO' CtrlMap = ''
CtrlMap<1> = @Window:'.EDL_WO_QTY'
CtrlMap<2> = @Window:'.EDL_RX_QTY'
CtrlMap<3> = @Window:'.EDL_REL_QTY'
CtrlMap<4> = @Window:'.EDL_UNREL_QTY'
CtrlMap<5> = @Window:'.EDL_SAP_CONFIRM_SCRAP_QTY'
CtrlMap<6> = @Window:'.EDL_SAP_YIELD_QTY'
CtrlMap<7> = @Window:'.EDL_SHIP_QTY'
CtrlMap<8> = @Window:'.EDT_CASS_NO'
GoSub PopulateControls GoSub PopulateControls
END END
@ -2155,4 +2163,3 @@ StartStopDate:
return return

View File

@ -1473,4 +1473,3 @@ CalcThickTarget:
RETURN RETURN

View File

@ -389,6 +389,3 @@ NEXT I
RETURN RETURN

View File

@ -49,6 +49,7 @@ $INSERT PRS_STAGE_EQUATES
$INSERT PRS_LAYER_EQUATES $INSERT PRS_LAYER_EQUATES
$INSERT LOGICAL $INSERT LOGICAL
$INSERT APPCOLORS $INSERT APPCOLORS
$INSERT WM_IN_EQUATES
EQU CRLF$ TO \0D0A\ EQU CRLF$ TO \0D0A\
EQU COMMA$ TO ',' EQU COMMA$ TO ','
@ -1543,7 +1544,6 @@ If FirstRDS NE '' then
end end
CurrWfrCnt = WOMatRec<WO_MAT_WAFER_QTY$> CurrWfrCnt = WOMatRec<WO_MAT_WAFER_QTY$>
PrevWfrCnt = obj_WO_Mat('SetWfrQty',WONo:'*':CassNo:@RM:NewCassQty) PrevWfrCnt = obj_WO_Mat('SetWfrQty',WONo:'*':CassNo:@RM:NewCassQty)
IF Get_Status(errCode) THEN IF Get_Status(errCode) THEN
@ -2971,51 +2971,5 @@ SchedReacts:
END END
END END
* OPEN 'DICT.SCHED_DET' TO DictVar THEN
* SearchString = 'WO_NO':@VM:WONo:@FM
* SchedDetKeys = ''
* Btree.Extract(SearchString,'SCHED_DET',DictVar,SchedDetKeys,'' ,'')
* IF Get_Status(errCode) THEN
* RETURN
* END
*
* IF SchedDetKeys NE '' THEN
* Reactors = ''
* StartDts = ''
* EndDts = ''
*
* sdkCnt = COUNT(SchedDetKeys,@VM) + (SchedDetKeys NE '')
*
* FOR I = 1 TO sdkCnt
* SchedDetKey = SchedDetKeys<1,I>
* Reactor = SchedDetKey[1,'*']
* SchedDt = SchedDetKey[COL2()+1,'*']
*
* LOCATE Reactor IN Reactors BY 'AR' SETTING Pos THEN
* IF SchedDt < StartDts<1,I> THEN
* StartDts<1,Pos> = SchedDt
* END
*
* IF SchedDt > EndDts<1,I> THEN
* EndDts<1,Pos> = SchedDt
* END
* END ELSE
*
* Reactors = INSERT(Reactors,1,Pos,0,Reactor)
* StartDts = INSERT(StartDts,1,Pos,0,SchedDt)
* EndDts = INSERT(EndDts,1,Pos,0,SchedDt)
*
* END
*
* NEXT I
*
* Result = Reactors:@FM:StartDts:@FM:EndDts
* END
* END
RETURN RETURN

View File

@ -4266,6 +4266,9 @@ SetWfrQty:
CurrWfrQty = WOMatRec<WO_MAT_WAFER_QTY$> CurrWfrQty = WOMatRec<WO_MAT_WAFER_QTY$>
CurrSlots = WOMatRec<WO_MAT_SLOT_NO$> CurrSlots = WOMatRec<WO_MAT_SLOT_NO$>
ReactorType = Xlate('WO_MAT', WOMatKey, 'REACTOR_TYPE', 'X')
EpiPro = ( (ReactorType EQ 'EPP') or (ReactorType EQ 'EpiPro') )
BEGIN CASE BEGIN CASE
CASE WfrQty > CurrWfrQty CASE WfrQty > CurrWfrQty
@ -4282,6 +4285,7 @@ SetWfrQty:
NEXT I NEXT I
CASE WfrQty < CurrWfrQty CASE WfrQty < CurrWfrQty
// Removing wafers // Removing wafers
EligibleWfrList = '' EligibleWfrList = ''
@ -4295,7 +4299,10 @@ SetWfrQty:
NEXT I NEXT I
NumEligibleWfrs = DCount(EligibleWfrList, @FM) NumEligibleWfrs = DCount(EligibleWfrList, @FM)
If NumEligibleWfrs GE WfrQty then
DiffQty = CurrWfrQty - WfrQty
If NumEligibleWfrs GE DiffQty then
// We have enough wafers, so remove enough to make cassette quantity equal the desired quantity // We have enough wafers, so remove enough to make cassette quantity equal the desired quantity
Loop Loop
@ -4306,16 +4313,32 @@ SetWfrQty:
CurrWfrQty -= 1 CurrWfrQty -= 1
NumEligibleWfrs -= 1 NumEligibleWfrs -= 1
Repeat Repeat
end
WOMatRec<WO_MAT_WAFER_QTY$> = WfrQty ;* Update Wafer Qty WOMatRec<WO_MAT_WAFER_QTY$> = WfrQty ;* Update Wafer Qty
end else
ErrorMsg = 'This cassette cannot be reduced to ':WfrQty:' wafers because only ':NumEligibleWfrs:' are eligible to be removed. '
end
END CASE END CASE
otParms = FIELDSTORE(otParms,@RM,4,0,WOMatRec) If ErrorMsg EQ '' then
obj_Tables('WriteRec',otParms) If EpiPro then
WMIKey = WOMatRec<WO_MAT_WMI_KEY$>
If WMIKey NE '' then
WMIRec = Database_Services('ReadDataRow', 'WM_IN', WMIKey)
If Error_Services('NoError') then
WMIRec<WM_IN_SLOT_NO$> = WOMatRec<WO_MAT_SLOT_NO$>
Database_Services('WriteDataRow', 'WM_IN', WMIKey, WMIRec, True$, False$, True$)
end
end
end
otParms = FIELDSTORE(otParms,@RM,4,0,WOMatRec)
obj_Tables('WriteRec',otParms) ; // This will release the lock
Result = CurrWfrQty Result = CurrWfrQty
end else
RecordLocked = Database_Services('IsKeyIDLocked', 'WO_MAT', WOMatKey, False$)
If RecordLocked then Database_Services('ReleaseKeyIDLock', 'WO_MAT', WOMatKey)
end
RETURN RETURN

View File

@ -950,7 +950,8 @@ WRITE_RECORD:
OrigDateOut = OrigRecord<RDS_DATE_OUT$> OrigDateOut = OrigRecord<RDS_DATE_OUT$>
NewDateOut = Record<RDS_DATE_OUT$> NewDateOut = Record<RDS_DATE_OUT$>
If ( (OrigDateOut EQ '') and (NewDateOut NE '') ) then
If ( ( (OrigDateOut EQ '') and (NewDateOut NE '') ) ) then
// Mark this cassette as processed in the schedule event record // Mark this cassette as processed in the schedule event record
DatetimeOut = {DATETIME_OUT} DatetimeOut = {DATETIME_OUT}
If EpiPro then If EpiPro then

View File

@ -3002,6 +3002,9 @@ Service MarkCassProcessed(WONo, CassNo, ProcessedDTM)
CassComp = False$ CassComp = False$
ReactType = Xlate('WO_LOG', WONo, 'REACT_TYPE', 'X') ReactType = Xlate('WO_LOG', WONo, 'REACT_TYPE', 'X')
If ReactType EQ 'EPP' then If ReactType EQ 'EPP' then
// Since EpiPro splits WM_IN cassettes out into RDS runs, we need to determine if the
// cassette has been emptied out or if enough wafers have been consumed such that
// the wafer count equals the split work order event quantity.
StopDtm = SchedDetNGRec<SCHED_DET_NG.STOP_DTM$> StopDtm = SchedDetNGRec<SCHED_DET_NG.STOP_DTM$>
SchedWfrQty = Schedule_Services('GetScheduledWfrQty', WONo, StopDtm) SchedWfrQty = Schedule_Services('GetScheduledWfrQty', WONo, StopDtm)
// Determine the cassette and slot this event should end on. This will be used to identify // Determine the cassette and slot this event should end on. This will be used to identify
@ -3025,7 +3028,10 @@ Service MarkCassProcessed(WONo, CassNo, ProcessedDTM)
NumUnloadedWfrs += (UnloadDtm NE '') NumUnloadedWfrs += (UnloadDtm NE '')
Next UnloadDtm Next UnloadDtm
end end
If ( (NumUnloadedWfrs EQ 25) or ( (CassNo EQ EndCassNo) and (NumUnloadedWfrs GE EndSlotNo) ) ) then CassComp = True$ CassRemWfrs = Xlate('WM_IN', WMIKey, 'REM_WFRS', 'X')
If ( (NumUnloadedWfrs EQ 25) or ( (CassNo EQ EndCassNo) and (NumUnloadedWfrs GE EndSlotNo) ) or (CassRemWfrs EQ 0) ) then
CassComp = True$
end
end else end else
CassComp = True$ CassComp = True$
end end
@ -3041,17 +3047,6 @@ Service MarkCassProcessed(WONo, CassNo, ProcessedDTM)
Done = True$ Done = True$
end end
end end
// Mark previous cassette processed if it isn't already. This covers situations where users fail to
// sign the unload stage for a cassette.
PrevCassNo = CassNo - 1
Locate PrevCassNo in UnprocessedCassettes using @VM setting vPos then
UnprocessedCassettes = Delete(UnprocessedCassettes, 0, vPos, 0)
ProcessedCassettes = SchedDetNGRec<SCHED_DET_NG.PROCESSED_CASS$>
ProcessedCassettes<0, -1> = PrevCassNo
SchedDetNGRec<SCHED_DET_NG.UNPROCESSED_CASS$> = UnprocessedCassettes
SchedDetNGRec<SCHED_DET_NG.PROCESSED_CASS$> = ProcessedCassettes
Database_Services('WriteDataRow', 'SCHED_DET_NG', SchedDetNGKey, SchedDetNGRec, True$, False$, True$)
end
Until Done EQ True$ Until Done EQ True$
Repeat Repeat
end end
@ -3424,4 +3419,3 @@ CreateScheduleChangeNotification:
return return

View File

@ -59,7 +59,7 @@ Equ Comma$ to ','
Declare function Database_Services, obj_NCR, obj_SAP, Environment_Services, Logging_Services, Datetime Declare function Database_Services, obj_NCR, obj_SAP, Environment_Services, Logging_Services, Datetime
Declare subroutine Error_Services, Database_Services, obj_NCR, obj_SAP, Material_Services, Work_Order_Services Declare subroutine Error_Services, Database_Services, obj_NCR, obj_SAP, Material_Services, Work_Order_Services
Declare subroutine Logging_Services, obj_Notes Declare subroutine Logging_Services, obj_Notes, Schedule_Services
LogPath = Environment_Services('GetApplicationRootPath') : '\LogFiles\WM_IN' LogPath = Environment_Services('GetApplicationRootPath') : '\LogFiles\WM_IN'
LogDate = Oconv(Date(), 'D4/') LogDate = Oconv(Date(), 'D4/')
@ -160,48 +160,8 @@ WRITE_RECORD:
WONo = Field(Name, '*', 1) WONo = Field(Name, '*', 1)
CassNo = Field(Name, '*', 3) CassNo = Field(Name, '*', 3)
ProcessedDTM = Datetime() ProcessedDTM = Datetime()
// Find the SCHED_DET_NG event record that contains the cassette number. // This service will determine if the cassette needs to be marked as complete.
Query = 'SELECT SCHED_DET_NG WITH WO_NO EQ ':WONo:' AND WITH UNPROCESSED_CASS CONTAINING ':CassNo Schedule_Services('MarkCassProcessed', WONo, CassNo, ProcessedDtm)
GoSub ClearCursors
RList(Query, TARGET_ACTIVELIST$, '', '', '')
EOF = False$
Done = False$
Loop
Readnext SchedDetNGKey else EOF = True$
Until EOF = True$
SchedDetNGRec = Database_Services('ReadDataRow', 'SCHED_DET_NG', SchedDetNGKey)
ProcessedCassettes = SchedDetNGRec<SCHED_DET_NG.PROCESSED_CASS$>
ProcessedWfrQty = DCount(ProcessedCassettes, @VM) * 25
TotalWfrs = SchedDetNGRec<SCHED_DET_NG.EVENT_TOTAL_WFRS$>
CassRemWfrs = Xlate('WM_IN', Name, 'REM_WFRS', 'X')
ProcessedCassQty = 25 - CassRemWfrs
If (ProcessedWfrQty + ProcessedCassQty ) EQ TotalWfrs then
// Mark cassette complete.
UnprocessedCassettes = SchedDetNGRec<SCHED_DET_NG.UNPROCESSED_CASS$>
Locate CassNo in UnprocessedCassettes using @VM setting vPos then
UnprocessedCassettes = Delete(UnprocessedCassettes, 0, vPos, 0)
ProcessedCassettes = SchedDetNGRec<SCHED_DET_NG.PROCESSED_CASS$>
ProcessedCassettes<0, -1> = CassNo
SchedDetNGRec<SCHED_DET_NG.UNPROCESSED_CASS$> = UnprocessedCassettes
SchedDetNGRec<SCHED_DET_NG.PROCESSED_CASS$> = ProcessedCassettes
Database_Services('WriteDataRow', 'SCHED_DET_NG', SchedDetNGKey, SchedDetNGRec, True$, False$, True$)
Done = True$
end
// Mark previous cassette processed if it isn't already. This covers situations where users fail to
// sign the unload stage for a cassette.
PrevCassNo = CassNo - 1
Locate PrevCassNo in UnprocessedCassettes using @VM setting vPos then
UnprocessedCassettes = Delete(UnprocessedCassettes, 0, vPos, 0)
ProcessedCassettes = SchedDetNGRec<SCHED_DET_NG.PROCESSED_CASS$>
ProcessedCassettes<0, -1> = PrevCassNo
SchedDetNGRec<SCHED_DET_NG.UNPROCESSED_CASS$> = UnprocessedCassettes
SchedDetNGRec<SCHED_DET_NG.PROCESSED_CASS$> = ProcessedCassettes
Database_Services('WriteDataRow', 'SCHED_DET_NG', SchedDetNGKey, SchedDetNGRec, True$, False$, True$)
end
end
Until Done EQ True$
Repeat
WfrCount = DCount(Record<WM_IN_SLOT_NO$>, @VM) WfrCount = DCount(Record<WM_IN_SLOT_NO$>, @VM)
If WfrCount LT 25 then If WfrCount LT 25 then
@ -301,4 +261,3 @@ Restore_System_Variables:
@FILE.ERROR = OrigFileError @FILE.ERROR = OrigFileError
return return

View File

@ -1055,7 +1055,3 @@ ClearCursors:
Next counter Next counter
return return

View File

@ -56,9 +56,9 @@ $insert RLIST_EQUATES
Equ Comma$ to ',' Equ Comma$ to ','
Declare function Error_Services, Database_Services, Environment_Services, Logging_Services, obj_WO_Mat, Max Declare function Error_Services, Database_Services, Environment_Services, Logging_Services, obj_WO_Mat, Max
Declare function GaN_Services, Signature_Services, obj_WO_LOG, SRP_Array, MemberOf Declare function GaN_Services, Signature_Services, obj_WO_LOG, SRP_Array, MemberOf, Datetime
Declare subroutine Error_Services, Database_Services, Environment_Services, Logging_Services, Obj_SAP, obj_Notes Declare subroutine Error_Services, Database_Services, Environment_Services, Logging_Services, Obj_SAP, obj_Notes
Declare subroutine SAP_Services, Work_Order_Services, Material_Services, RList Declare subroutine SAP_Services, Work_Order_Services, Material_Services, RList, Schedule_Services
LogPath = Environment_Services('GetApplicationRootPath') : '\LogFiles\WO_Mat' LogPath = Environment_Services('GetApplicationRootPath') : '\LogFiles\WO_Mat'
LogDate = Oconv(Date(), 'D4/') LogDate = Oconv(Date(), 'D4/')
@ -825,6 +825,12 @@ WRITE_RECORD:
Work_Order_Services('UpdateReleasedQty', WONo) Work_Order_Services('UpdateReleasedQty', WONo)
end end
CurrWaferCount = obj_WO_Mat('CurrWaferCnt', WOMatKeyID)
If CurrWaferCount EQ 0 then
// This should catch cases where the entire cassette is "peeled off", NCR'ed, or used for destructive testing.
Schedule_Services('MarkCassProcessed', WONo, CassNo, Datetime())
end
return return
DELETE_RECORD_PRE: DELETE_RECORD_PRE: