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

@ -4266,6 +4266,9 @@ SetWfrQty:
CurrWfrQty = WOMatRec<WO_MAT_WAFER_QTY$>
CurrSlots = WOMatRec<WO_MAT_SLOT_NO$>
ReactorType = Xlate('WO_MAT', WOMatKey, 'REACTOR_TYPE', 'X')
EpiPro = ( (ReactorType EQ 'EPP') or (ReactorType EQ 'EpiPro') )
BEGIN CASE
CASE WfrQty > CurrWfrQty
@ -4282,6 +4285,7 @@ SetWfrQty:
NEXT I
CASE WfrQty < CurrWfrQty
// Removing wafers
EligibleWfrList = ''
@ -4295,7 +4299,10 @@ SetWfrQty:
NEXT I
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
Loop
@ -4306,17 +4313,33 @@ SetWfrQty:
CurrWfrQty -= 1
NumEligibleWfrs -= 1
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
WOMatRec<WO_MAT_WAFER_QTY$> = WfrQty ;* Update Wafer Qty
END CASE
otParms = FIELDSTORE(otParms,@RM,4,0,WOMatRec)
obj_Tables('WriteRec',otParms)
Result = CurrWfrQty
If ErrorMsg EQ '' then
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
end else
RecordLocked = Database_Services('IsKeyIDLocked', 'WO_MAT', WOMatKey, False$)
If RecordLocked then Database_Services('ReleaseKeyIDLock', 'WO_MAT', WOMatKey)
end
RETURN