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
******************** ********************
@ -374,6 +375,8 @@ WRITE_RECORD:
WOMatKey = WONo:'*':CassNo WOMatKey = WONo:'*':CassNo
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 *
@ -498,12 +501,7 @@ WRITE_RECORD:
END END
END END
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 *
@ -651,12 +649,7 @@ WRITE_RECORD:
END END
END END
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

@ -117,160 +117,160 @@ RETURN Result
* * * * * * * * * * * * * *
OpenTable: OpenTable:
* * * * * * * * * * * * * *
IF TableName = '' THEN ErrorMsg = 'Null parameter "TableName" passed to subroutine' IF TableName = '' THEN ErrorMsg = 'Null parameter "TableName" passed to subroutine'
IF ErrorMsg = '' THEN IF ErrorMsg = '' THEN
OPEN TableName TO TableVar THEN OPEN TableName TO TableVar THEN
Result = TableVar Result = TableVar
Parms = FieldStore(Parms,@RM,3,1,TableVar) ;* Added 1/22/2007 JCH Parms = FieldStore(Parms,@RM,3,1,TableVar) ;* Added 1/22/2007 JCH
END ELSE END ELSE
ErrorMsg = 'Unable to open Table ':QUOTE(TableName) ErrorMsg = 'Unable to open Table ':QUOTE(TableName)
END
END END
END
RETURN RETURN
* * * * * * * * * * * * * *
ReadRec: ReadRec:
* * * * * * * * * * * * * *
GOSUB LockRec GOSUB LockRec
IF ErrorMsg NE '' THEN RETURN IF ErrorMsg NE '' THEN RETURN
* * * * * * * * * * * * * *
ReadOnlyRec: ReadOnlyRec:
* * * * * * * * * * * * * *
IF TableName = '' THEN ErrorMsg = 'Null parameter "TableName" passed to subroutine' IF TableName = '' THEN ErrorMsg = 'Null parameter "TableName" passed to subroutine'
IF TableKey = '' THEN ErrorMsg = 'Null parameter "TableKey" passed to subroutine' IF TableKey = '' THEN ErrorMsg = 'Null parameter "TableKey" passed to subroutine'
IF TableVar = '' THEN IF TableVar = '' THEN
GOSUB OpenTable GOSUB OpenTable
IF ErrorMsg THEN RETURN IF ErrorMsg THEN RETURN
END
READ TableRec FROM TableVar,TableKey THEN
Result = TableRec
END ELSE
// Log failure to read
LogData = ''
LogData<1> = LoggingDTM
LogData<2> = @User4
LogData<3> = Method
LogData<4> = TableName
LogData<5> = TableKey
LogData<6> = 'Error code: ':@FILE_ERROR<1>:' Error message: ':@FILE_ERROR<2>:' Error detail: ':@FILE_ERROR<3>
Logging_Services('AppendLog', objLog, LogData, @RM, @FM)
IF @FILE_ERROR<1> = 100 THEN
* Record doesn't exist
* 04/20/2021 - DJS - Moved unlock call outside of this specific error condition so that the record is always
* unlocked if the record fails to be read.
* GOSUB UnlockRec
Null
END ELSE
Set_FSError()
ErrorMsg = 'Record ':QUOTE(TableKey):' not found in Table ':QUOTE(TableName)
END END
Result = ''
READ TableRec FROM TableVar,TableKey THEN
If ( (TableName NE '') and (TableKey NE '') ) then Result = TableRec
RecordLocked = Database_Services('IsKeyIDLocked', TableName, TableKey, False$) END ELSE
If RecordLocked EQ True$ then Database_Services('ReleaseKeyIDLock', TableName, TableKey) // Log failure to read
end LogData = ''
LogData<1> = LoggingDTM
END LogData<2> = @User4
LogData<3> = Method
LogData<4> = TableName
LogData<5> = TableKey
LogData<6> = 'Error code: ':@FILE_ERROR<1>:' Error message: ':@FILE_ERROR<2>:' Error detail: ':@FILE_ERROR<3>
Logging_Services('AppendLog', objLog, LogData, @RM, @FM)
IF @FILE_ERROR<1> = 100 THEN
* Record doesn't exist
* 04/20/2021 - DJS - Moved unlock call outside of this specific error condition so that the record is always
* unlocked if the record fails to be read.
* GOSUB UnlockRec
Null
END ELSE
Set_FSError()
ErrorMsg = 'Record ':QUOTE(TableKey):' not found in Table ':QUOTE(TableName)
END
Result = ''
If ( (TableName NE '') and (TableKey NE '') ) then
RecordLocked = Database_Services('IsKeyIDLocked', TableName, TableKey, False$)
If RecordLocked EQ True$ then Database_Services('ReleaseKeyIDLock', TableName, TableKey)
end
END
RETURN RETURN
* * * * * * * * * * * * * *
WriteRec: WriteRec:
* * * * * * * * * * * * * *
IF TableName = '' THEN ErrorMsg = 'Null parameter "TableName" passed to subroutine'
IF TableKey = '' THEN ErrorMsg = 'Null parameter "TableKey" passed to subroutine'
IF TableVar = '' THEN GOSUB OpenTable
IF ErrorMsg THEN RETURN
IF ErrorMsg = '' THEN
TestRec = TableRec
CONVERT @SVM:@VM:@FM TO '' IN TestRec IF TableName = '' THEN ErrorMsg = 'Null parameter "TableName" passed to subroutine'
IF TableKey = '' THEN ErrorMsg = 'Null parameter "TableKey" passed to subroutine'
IF TableVar = '' THEN GOSUB OpenTable
IF TestRec = '' THEN IF ErrorMsg THEN RETURN
DELETE TableVar,TableKey ELSE Null
* ErrorMsg = 'Blank table rec with ':QUOTE(TableKey):' on ':QUOTE(TableName):' table.'; *added 4/9/21 for debugging IF ErrorMsg = '' THEN
* Set_FSError()
END ELSE TestRec = TableRec
Set_Status(0)
rv = Get_Status(errCode) CONVERT @SVM:@VM:@FM TO '' IN TestRec
WRITE TableRec ON TableVar,TableKey THEN
rv = Get_Status(errCode) IF TestRec = '' THEN
DELETE TableVar,TableKey ELSE Null
* ErrorMsg = 'Blank table rec with ':QUOTE(TableKey):' on ':QUOTE(TableName):' table.'; *added 4/9/21 for debugging
* Set_FSError()
END ELSE END ELSE
ErrorMsg = 'Unable to write ':QUOTE(TableKey):' on ':QUOTE(TableName):' table.' Set_Status(0)
rv = Get_Status(errCode)
WRITE TableRec ON TableVar,TableKey THEN
rv = Get_Status(errCode)
END ELSE
ErrorMsg = 'Unable to write ':QUOTE(TableKey):' on ':QUOTE(TableName):' table.'
END
END END
If ( (TableName NE '') and (TableKey NE '') ) then
RecordLocked = Database_Services('IsKeyIDLocked', TableName, TableKey, False$)
If RecordLocked EQ True$ then Database_Services('ReleaseKeyIDLock', TableName, TableKey)
end
END END
If ( (TableName NE '') and (TableKey NE '') ) then
RecordLocked = Database_Services('IsKeyIDLocked', TableName, TableKey, False$)
If RecordLocked EQ True$ then Database_Services('ReleaseKeyIDLock', TableName, TableKey)
end
END
RETURN RETURN
* * * * * * * * * * * * * *
WriteOnlyRec: WriteOnlyRec:
* * * * * * * * * * * * * *
IF TableName = '' THEN ErrorMsg = 'Null parameter "TableName" passed to subroutine'
IF TableKey = '' THEN ErrorMsg = 'Null parameter "TableKey" passed to subroutine'
IF TableVar = '' THEN GOSUB OpenTable
IF ErrorMsg THEN RETURN
IF ErrorMsg = '' THEN
TestRec = TableRec
CONVERT @SVM:@VM:@FM TO '' IN TestRec IF TableName = '' THEN ErrorMsg = 'Null parameter "TableName" passed to subroutine'
IF TableKey = '' THEN ErrorMsg = 'Null parameter "TableKey" passed to subroutine'
IF TableVar = '' THEN GOSUB OpenTable
IF TestRec = '' THEN IF ErrorMsg THEN RETURN
DELETE TableVar,TableKey ELSE Null
END ELSE IF ErrorMsg = '' THEN
WRITE TableRec ON TableVar,TableKey ELSE
ErrorMsg = 'Unable to write ':QUOTE(TableKey):' on ':QUOTE(TableName):' table.' TestRec = TableRec
CONVERT @SVM:@VM:@FM TO '' IN TestRec
IF TestRec = '' THEN
DELETE TableVar,TableKey ELSE Null
END ELSE
WRITE TableRec ON TableVar,TableKey ELSE
ErrorMsg = 'Unable to write ':QUOTE(TableKey):' on ':QUOTE(TableName):' table.'
END
END END
END END
END
RETURN RETURN
* * * * * * * * * * * * * *
DeleteRec: DeleteRec:
* * * * * * * * * * * * * *
IF TableName = '' THEN ErrorMsg = 'Null parameter "TableName" passed to subroutine' IF TableName = '' THEN ErrorMsg = 'Null parameter "TableName" passed to subroutine'
IF TableKey = '' THEN ErrorMsg = 'Null parameter "TableKey" passed to subroutine' IF TableKey = '' THEN ErrorMsg = 'Null parameter "TableKey" passed to subroutine'
IF TableVar = '' THEN GOSUB OpenTable IF TableVar = '' THEN GOSUB OpenTable
IF ErrorMsg THEN RETURN IF ErrorMsg THEN RETURN
IF ErrorMsg = '' THEN IF ErrorMsg = '' THEN
DELETE TableVar,TableKey THEN DELETE TableVar,TableKey THEN
GOSUB UnlockRec GOSUB UnlockRec
END
END END
END
RETURN RETURN
@ -278,117 +278,114 @@ RETURN
* * * * * * * * * * * * * *
LockRec: LockRec:
* * * * * * * * * * * * * *
IF TableName = '' THEN ErrorMsg = 'Null parameter "TableName" passed to subroutine' IF TableName = '' THEN ErrorMsg = 'Null parameter "TableName" passed to subroutine'
IF TableKey = '' THEN ErrorMsg = 'Null parameter "TableKey" passed to subroutine' IF TableKey = '' THEN ErrorMsg = 'Null parameter "TableKey" passed to subroutine'
IF TableVar = '' THEN GOSUB OpenTable IF TableVar = '' THEN GOSUB OpenTable
IF ErrorMsg THEN RETURN IF ErrorMsg THEN RETURN
LockData = '' LockData = ''
Locked = FALSE$ Locked = FALSE$
RetryCnt = 0 RetryCnt = 0
LOOP LOOP
LOCK TableVar,TableKey THEN
Locked = TRUE$
END ELSE
BEGIN CASE
CASE @FILE_ERROR NE ''
Set_FSError()
ErrorMsg = 'Unable to Lock ':QUOTE(TableKey):' in Table ':QUOTE(TableName)
CASE Get_Status(errCode)
ErrorMsg = QUOTE(TableKey):' in Table ':QUOTE(TableName):' Locked by another workstation.'
CASE 1
ErrorMsg = QUOTE(TableKey):' in Table ':QUOTE(TableName):' Locked by This workstation.'
END CASE
RetryCnt += 1 LOCK TableVar,TableKey THEN
END Locked = TRUE$
END ELSE
UNTIL Locked OR RetryCnt = 10 REPEAT
BEGIN CASE
CASE @FILE_ERROR NE ''
Set_FSError()
ErrorMsg = 'Unable to Lock ':QUOTE(TableKey):' in Table ':QUOTE(TableName)
CASE Get_Status(errCode)
ErrorMsg = QUOTE(TableKey):' in Table ':QUOTE(TableName):' Locked by another workstation.'
CASE 1
ErrorMsg = QUOTE(TableKey):' in Table ':QUOTE(TableName):' Locked by This workstation.'
END CASE
RetryCnt += 1
END
UNTIL Locked OR RetryCnt = 10 REPEAT
RETURN RETURN
* * * * * * * * * * * * * *
UnlockRec: UnlockRec:
* * * * * * * * * * * * * *
RecordLocked = Database_Services('IsKeyIDLocked', TableName, TableKey, False$) RecordLocked = Database_Services('IsKeyIDLocked', TableName, TableKey, False$)
If RecordLocked EQ True$ then Database_Services('ReleaseKeyIDLock', TableName, TableKey) If RecordLocked EQ True$ then Database_Services('ReleaseKeyIDLock', TableName, TableKey)
RETURN RETURN
* * * * * * * * * * * * * *
LockSet: LockSet:
* * * * * * * * * * * * * *
IF TableName = '' THEN ErrorMsg = 'Null parameter "TableName" passed to subroutine'
IF TableKey = '' THEN ErrorMsg = 'Null parameter "TableKey" passed to subroutine'
IF TableVar = '' THEN GOSUB OpenTable
TableKeys = TableKey ;* Pass in @VM'd list of keys In TableKey
IF ErrorMsg THEN RETURN
IF TableKeys = '' THEN RETURN
Set_Status(0)
LockedTableKeys = ''
FOR I = 1 TO COUNT(TableKeys,@VM) + (TableKeys NE '')
TableKey = TableKeys<1,I>
GOSUB LockRec
If Locked THEN IF TableName = '' THEN ErrorMsg = 'Null parameter "TableName" passed to subroutine'
LockedTableKeys<1,-1> = TableKey IF TableKey = '' THEN ErrorMsg = 'Null parameter "TableKey" passed to subroutine'
End ELSE IF TableVar = '' THEN GOSUB OpenTable
For N = 1 To Count(LockedTableKeys,@VM) + (LockedTableKeys NE '')
TableKey = LockedTableKeys<1,N> TableKeys = TableKey ;* Pass in @VM'd list of keys In TableKey
Gosub UnlockRec
Next N IF ErrorMsg THEN RETURN
End
IF TableKeys = '' THEN RETURN
Set_Status(0)
LockedTableKeys = ''
FOR I = 1 TO COUNT(TableKeys,@VM) + (TableKeys NE '')
TableKey = TableKeys<1,I>
GOSUB LockRec
If Locked THEN
LockedTableKeys<1,-1> = TableKey
End ELSE
For N = 1 To Count(LockedTableKeys,@VM) + (LockedTableKeys NE '')
TableKey = LockedTableKeys<1,N>
Gosub UnlockRec
Next N
End
NEXT I
Result = TableVar
NEXT I
Result = TableVar
RETURN RETURN
* * * * * * * * * * * * * *
UnlockSet: UnlockSet:
* * * * * * * * * * * * * *
IF TableName = '' THEN ErrorMsg = 'Null parameter "TableName" passed to subroutine' IF TableName = '' THEN ErrorMsg = 'Null parameter "TableName" passed to subroutine'
IF TableKey = '' THEN ErrorMsg = 'Null parameter "TableKey" passed to subroutine' IF TableKey = '' THEN ErrorMsg = 'Null parameter "TableKey" passed to subroutine'
IF TableVar = '' THEN ErrorMsg = 'Null parameter "TableVar" passed to subroutine' IF TableVar = '' THEN ErrorMsg = 'Null parameter "TableVar" passed to subroutine'
LockedTableKeys = TableKey ;* Pass in @VM'd list of keys In TableKey LockedTableKeys = TableKey ;* Pass in @VM'd list of keys In TableKey
IF ErrorMsg THEN RETURN IF ErrorMsg THEN RETURN
IF LockedTableKeys = '' THEN RETURN IF LockedTableKeys = '' THEN RETURN
Set_Status(0) Set_Status(0)
FOR I = 1 TO COUNT(LockedTableKeys,@VM) + (LockedTableKeys NE '') FOR I = 1 TO COUNT(LockedTableKeys,@VM) + (LockedTableKeys NE '')
TableKey = LockedTableKeys<1,I> TableKey = LockedTableKeys<1,I>
GOSUB UnlockRec GOSUB UnlockRec
NEXT I NEXT I
RETURN RETURN

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

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,17 +4313,33 @@ SetWfrQty:
CurrWfrQty -= 1 CurrWfrQty -= 1
NumEligibleWfrs -= 1 NumEligibleWfrs -= 1
Repeat Repeat
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
WOMatRec<WO_MAT_WAFER_QTY$> = WfrQty ;* Update Wafer Qty
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$>
Result = CurrWfrQty 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
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/')
@ -690,7 +690,7 @@ WRITE_RECORD:
end end
end end
//Original MU wafer transaction // Original MU wafer transaction
IF OrigSAPBatchNo EQ '' AND NewSAPBatchNo NE '' then IF OrigSAPBatchNo EQ '' AND NewSAPBatchNo NE '' then
MULotFlag = False$ MULotFlag = False$
If {REACTOR_TYPE} NE 'EPP' then If {REACTOR_TYPE} NE 'EPP' then
@ -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: