Compare commits

...

10 Commits

Author SHA1 Message Date
4037b2fa45 Merged PR 15668: Refactored Lot Event
Refactored Lot Event methods.
1. Moved all lot event methods to a new LOT_EVENT_SERVICES service module.
2. Simplified CreateLotEvent routine
3. Updated all calling stored procedures.
2025-04-28 21:02:24 +02:00
b2edf6f288 Merged PR 15600: Switch to InfinityQS server messa04ec.infineon.com to allow the SPC MI to sav...
Switch to InfinityQS server messa04ec.infineon.com to allow the SPC MI to save locally
2025-04-28 18:13:16 +02:00
d626ebdf3c Merged PR 15381: EPP BioRad Data Import BugFix 2025-04-21 22:26:15 +02:00
e0b3557068 Merged PR 15380: Added logging for when a network error is encountered
Added logging for when a network error is encountered
2025-04-21 21:10:54 +02:00
8a44de0075 Merged PR 15375: Added in missing CHANGED event on CMB_EQUIP_TYPE. Also fixed initialization o...
Needed Friday bugfix. Added in missing CHANGED event on CMB_EQUIP_TYPE. Also fixed initialization of this field. Cleaned up formatting

Related work items: #255186
2025-04-19 00:29:24 +02:00
fc40b9b654 Merged PR 15341: Added timer data collection using SRP_Stopwatch to each verb method. Logging...
Added timer data collection using SRP_Stopwatch to each verb method. Logging all time metrics
2025-04-18 02:12:30 +02:00
59f7461a13 Remove commented out code from
NDW_MAKEUP_WAFERS_EVENTS.
2025-04-17 23:46:43 +02:00
17d6f68c00 UAT complete. Ready for deployment. 2025-04-17 23:46:43 +02:00
e876d6a8ac Commit to switch branches again 2025-04-17 23:46:43 +02:00
e8b73d30c8 WIP to switch branches 2025-04-17 23:46:43 +02:00
20 changed files with 1336 additions and 875 deletions

File diff suppressed because it is too large Load Diff

View File

@ -58,7 +58,7 @@ $INSERT NOTIFICATION_EQU
Declare function Database_Services, Error_Services, Obj_Wm_In, Obj_Wm_Out, Unassigned, Wm_In_Services, Wm_Out_Services
Declare function PSN_Services, SRP_Rotate_Array, Datetime, Hold_Services, Memberof, Error_Services, Rds_Services
Declare subroutine Database_Services, Error_Services, Obj_notes, Hold_Services, Obj_Wm_In, Obj_Wm_Out, Wm_In_Services
Declare subroutine Wm_Out_Services, Rds_Services, Lot_Services
Declare subroutine Wm_Out_Services, Rds_Services, Lot_Event_Services
GoToService else
Error_Services('Add', Service : ' is not a valid service request within the ' : ServiceModule : ' module.')
@ -371,18 +371,18 @@ Service OnHold(WOMatKey, HoldEntity, HoldEntityID, HoldType, HoldData, OperatorI
StepNo = 1
CassNo = Field(WOMatKey, '*', 2)
WMInKey = WONo : '*' : StepNo : '*' : CassNo
Lot_Services('CreateLotEvent', WMInKey, 'WM_IN', CurrDTM, 'HOLD_ON', 'Placed on hold', '', '', '', '', UserId)
Lot_Event_Services('CreateLotEvent', WMInKey, CurrDTM, 'HOLD_ON', 'Lot placed on hold.', '', UserId, True$, 'WM_IN')
Case HoldEntity EQ 'WM_OUT'
WONo = Field(WOMatKey, '*', 1)
StepNo = 1
CassNo = Field(WOMatKey, '*', 2)
WMOutKey = WONo : '*' : StepNo : '*' : CassNo
Lot_Services('CreateLotEvent', WMOutKey, 'WM_OUT', CurrDTM, 'HOLD_ON', 'Placed on hold', '', '', '', '', UserId)
Lot_Event_Services('CreateLotEvent', WMOutKey, CurrDTM, 'HOLD_ON', 'Lot placed on hold.', '', UserId, True$, 'WM_OUT')
Case HoldEntity EQ 'RDS'
RDSNo = Xlate('WO_MAT', WOMatKey, WO_MAT_RDS_NO$, 'X')
Lot_Services('CreateLotEvent', RDSNo, 'RDS', CurrDTM, 'HOLD_ON', 'Placed on hold', '', '', '', '', UserId)
Lot_Event_Services('CreateLotEvent', RDSNo, CurrDTM, 'HOLD_ON', 'Lot placed on hold.', '', UserId, True$, 'RDS')
Case HoldEntity EQ 'WO_MAT'
Lot_Services('CreateLotEvent', WOMatKey, 'RDS', CurrDTM, 'HOLD_ON', 'Placed on hold', '', '', '', '', UserId)
Lot_Event_Services('CreateLotEvent', WOMatKey, CurrDTM, 'HOLD_ON', 'Lot placed on hold.', '', UserId, True$, 'WO_MAT')
End Case
end
end else
@ -507,18 +507,18 @@ Service OffHold(WOMatKey, HoldEntity, HoldEntityID, HoldType, HoldData, Operator
StepNo = 1
CassNo = Field(WOMatKey, '*', 2)
WMInKey = WONo : '*' : StepNo : '*' : CassNo
Lot_Services('CreateLotEvent', WMInKey, 'WM_IN', CurrDTM, 'HOLD_OFF', 'Placed on hold', '', '', '', '', UserID)
Lot_Event_Services('CreateLotEvent', WMInKey, CurrDTM, 'HOLD_OFF', 'Lot taken off hold.', '', UserId, True$, 'WM_IN')
Case HoldEntity EQ 'WM_OUT'
WONo = Field(WOMatKey, '*', 1)
StepNo = 1
CassNo = Field(WOMatKey, '*', 2)
WMOutKey = WONo : '*' : StepNo : '*' : CassNo
Lot_Services('CreateLotEvent', WMOutKey, 'WM_OUT', CurrDTM, 'HOLD_OFF', 'Placed on hold', '', '', '', '', UserID)
Lot_Event_Services('CreateLotEvent', WMOutKey, CurrDTM, 'HOLD_OFF', 'Lot taken off hold.', '', UserId, True$, 'WM_OUT')
Case HoldEntity EQ 'RDS'
RDSNo = Xlate('WO_MAT', WOMatKey, WO_MAT_RDS_NO$, 'X')
Lot_Services('CreateLotEvent', RDSNo, 'RDS', CurrDTM, 'HOLD_OFF', 'Placed on hold', '', '', '', '', UserID)
Lot_Event_Services('CreateLotEvent', RDSNo, CurrDTM, 'HOLD_OFF', 'Lot taken off hold.', '', UserId, True$, 'RDS')
Case HoldEntity EQ 'WO_MAT'
Lot_Services('CreateLotEvent', WOMatKey, 'RDS', CurrDTM, 'HOLD_OFF', 'Placed on hold', '', '', '', '', UserID)
Lot_Event_Services('CreateLotEvent', WOMatKey, CurrDTM, 'HOLD_OFF', 'Lot taken off hold.', '', UserId, True$, 'WO_MAT')
End Case
end
end else
@ -815,3 +815,4 @@ Service CreateComment(HoldEntity, HoldEntityID, Reason, Transition, HoldType, Op
end service

View File

@ -3,7 +3,7 @@ Compile function Labeling_Services(@Service, @Params)
Declare Function Database_Services, Environment_Services, Set_Printer, Direct_Print, Printer_Select, Error_Services
Declare Function Logging_Services, Datetime
Declare subroutine Error_Services, Labeling_Services, Lot_Services, SRP_Set_Clipboard
Declare subroutine Error_Services, Labeling_Services, Lot_Event_Services, SRP_Set_Clipboard
$insert LOGICAL
$Insert LOT_EQUATES
@ -330,7 +330,7 @@ Service PrintTestWaferLotLabel(LotId, Username, PrinterId)
ErrorMessage = 'Error printing label for lot ' : LotId : '. LotId was null or did not exist in database.'
end
If ErrorMessage EQ '' then
Lot_Services('CreateLotEvent', LotId, 'TW', Datetime(), 'COMMENT', 'Lot Labels Printed', '', 0, 0, '', Username)
Lot_Event_Services('CreateLotEvent', LotId, Datetime(), 'COMMENT', 'Lot Labels Printed', '', Username)
end else
Error_Services('Add', ErrorMessage)
end
@ -461,3 +461,4 @@ Service GetReturnToFabLabelZPL(RTFId)
end service

View File

@ -0,0 +1,172 @@
Compile function Lot_Event_Services(@Service, @Params)
#pragma precomp SRP_PreCompiler
Declare function Error_Services, Logging_Services, Environment_Services, Database_Services, RTI_CreateGUID, Lot_Services
Declare function Lot_Event_Services
Declare subroutine Error_Services, Logging_Services, Database_Services, Lot_Services, Service_Services
$insert LOGICAL
$Insert LOT_EVENT_EQUATES
$Insert LOT_EQUATES
$Insert LOT_OPERATION_EQUATES
Options EVENT_TYPES = 'MOVE_IN', 'MOVE_OUT', 'HOLD_ON', 'HOLD_OFF', 'REDUCE_WAFER_QTY', 'BONUS_WAFER_QTY', 'COMMENT', 'LOCATION', 'LOAD', 'UNSIGN_LOAD', 'TW_USE', 'CLOSE'
Options LOT_TYPES = 'TW', 'RDS', 'WM_OUT', 'WM_IN', 'WO_MAT', 'LOT'
Options LEGACY_LOT_TYPES = 'RDS', 'WM_OUT', 'WM_IN'
Options BOOLEAN = 'True', 'False'
GoToService
Return Response or ""
//-----------------------------------------------------------------------------
// SERVICES
//-----------------------------------------------------------------------------
Service CreateLotEvent(LotId, EventDateTime, EventType=EVENT_TYPES, EventNote, EventEquipmentId, OperatorId, IsLegacyLotId=BOOLEAN, LegacyLotType=LEGACY_LOT_TYPES)
GoSub InitEventLog
ErrorMessage = ''
//Handle Legacy Lots
If IsLegacyLotId then
If LegacyLotType NE '' then
LegacyLotId = LotId
LotId = Lot_Services('GetLotIdByLegacyLotIdAndType', LotId, LegacyLotType)
If LotID EQ '' then
LotId = Lot_Services('CreateNewLot', LegacyLotType, '', '', '', '', '', OperatorId, '', LegacyLotId)
end
end else
LotId = ''
end
end
If RowExists('LOT', LotId) then
NewEventId = RTI_CreateGUID()
If NewEventId NE '' then
NewEventSequence = Lot_Event_Services('GetLotEventNextSequence', LotId)
If Error_Services('NoError') then
NewEventRec = ''
NewEventRec<LOT_EVENT_LOT_ID$> = LotId
NewEventRec<LOT_EVENT_LOT_EVENT_TYPE$> = EventType
NewEventRec<LOT_EVENT_EVENT_DATETIME$> = EventDatetime
NewEventRec<LOT_EVENT_EVENT_NOTE$> = EventNote
NewEventRec<LOT_EVENT_EQUIPMENT_ID$> = EventEquipmentId
NewEventRec<LOT_EVENT_EVENT_OPERATOR_ID$> = OperatorId
NewEventRec<LOT_EVENT_SEQUENCE$> = NewEventSequence
Database_Services('WriteDataRow', 'LOT_EVENT', NewEventId, NewEventRec)
If Error_Services('NoError') then
Service_Services('PostProcedure', 'LOT_EVENT_SERVICES', 'SetLatestLotEvent':@VM:LotId:@VM:NewEventId, True$)
end else
ErrorMessage = 'Error creating new event : ' : Error_Services('GetMessage')
end
end else
ErrorMessage = Error_Services('GetMessage')
end
end else
ErrorMessage = 'Error creating an event Id.'
end
end else
ErrorMessage = 'Error in Create Lot Event routine, Lot id was not found.'
end
If ErrorMessage EQ '' then
LogData = ''
LogData<1> = LoggingDTM
LogData<2> = LotId
LogData<3> = EventType
LogData<4> = OperatorId
LogData<9> = 'Successfully logged event.'
Logging_Services('AppendLog', objLotEventLog, LogData, @RM, @FM, False$)
end else
LogData = ''
LogData<1> = LoggingDTM
LogData<2> = LotId
LogData<3> = EventType
LogData<4> = OperatorId
LogData<9> = ErrorMessage
Logging_Services('AppendLog', objLotEventLog, LogData, @RM, @FM, False$)
Error_Services('Add', ErrorMessage)
end
end service
Service GetLotEventNextSequence(LotId)
ErrorMessage = ''
NextSequence = 1
If LotID NE '' then
If RowExists('LOT', LotId) then
LotEvents = XLATE('LOT', LotId, LOT_LOT_EVENTS$, 'X')
for each LotEvent in LotEvents using @VM
ThisEventSequence = XLATE('LOT_EVENT', LotEvent, LOT_EVENT_SEQUENCE$, 'X')
If ThisEventSequence GE NextSequence then NextSequence = ThisEventSequence + 1
Next LotEvent
end else
ErrorMessage = 'Unable to get lot event sequence: Lot ID not found.'
end
end else
ErrorMessage = 'Unable to get lot event sequence: Lot ID was null.'
end
If ErrorMessage EQ '' then
Response = NextSequence
end else
Error_Services('Add', ErrorMessage)
end
end service
//Returns a @FM delimited list of events in sequence
Service GetLotEventsInSequence(LotId)
LotEventsUnsorted = ''
LotEventsSorted = ''
LotEventsToReturn = ''
If LotID NE '' then
//Get Operations
LotEvents = Xlate('LOT', LotId, LOT_LOT_EVENTS$, 'X')
for each LotEvent in LotEvents using @VM
ThisEventSequence = XLATE('LOT_EVENT', LotEvent, LOT_EVENT_SEQUENCE$, 'X')
LotEventsToReturn<ThisEventSequence> = LotEvent
Next LotOperation
end else
//error: lot id was null
end
Response = LotEventsToReturn
end service
Service SetLatestLotEvent(LotId, LotEventId)
ErrorMessage = ''
If RowExists('LOT', LotId) then
If RowExists('LOT_EVENT', LotEventId) then
LotRec = Database_Services('ReadDataRow', 'LOT', LotId, True$, 0, False$)
LotRec<LOT_MOST_RECENT_LOT_EVENT_ID$> = LotEventId
Database_Services('WriteDataRow', 'LOT', LotId, LotRec)
If Error_Services('HasError') then
ErrorMessage = Error_Services('GetMessage')
end
end else
ErrorMessage = 'Lot event ' : LotEventId : ' for lot ' : LotId : ' not found in LOT_EVENT table'
end
end else
ErrorMessage = 'Lot Id ' : LotId : ' not found in LOT table.'
end
If ErrorMessage NE '' then
Error_Services('Add', ErrorMessage)
end
end service
/* * * * * * * * * *
* INTERNAL GOSUBS
* * * * * * * * * */
InitEventLog:
LogPath = Environment_Services('GetApplicationRootPath') : '\LogFiles\Lot'
LogDate = Oconv(Date(), 'D4/')
LogTime = Oconv(Time(), 'MTS')
LoggingDTM = LogDate : ' ' : LogTime ; // Logging DTM
LogFileName = LogDate[7, 4] : '-' : LogDate[1, 2] : '-' : LogDate[4, 2] : ' LotEvent.csv'
Headers = 'Logging DTM' : @FM : 'Lot Id' : @FM : 'Event Type' : @FM : 'Operator' : @FM : 'Begin Wafer Qty' : @FM : 'End Wafer Qty' : @FM : 'Bonus Wafer Qty' : @FM : 'Reduce Wafer Qty' : @FM : 'Message'
objLotEventLog = Logging_Services('NewLog', LogPath, LogFileName, CRLF$, ',', Headers, '', False$, False$)
return

View File

@ -2,9 +2,9 @@ Compile function Lot_Services(@Service, @Params)
#pragma precomp SRP_PreCompiler
Declare function TEST_WAFER_PROD_SERVICES, SRP_Datetime, Datetime, Database_Services, Lot_Services, Error_Services, RTI_CREATEGUID
Declare function SRP_Array, SRP_Json, Environment_Services, Logging_Services, MemberOf
Declare function SRP_Array, SRP_Json, Environment_Services, Logging_Services, MemberOf, Lot_Event_Services
Declare subroutine Database_Services, Btree.Extract, Lot_Services, Error_Services, Labeling_Services, SRP_Json, Logging_Services
Declare subroutine SRP_Run_Command, Service_Services, obj_notes
Declare subroutine SRP_Run_Command, Service_Services, obj_notes, Lot_Event_Services
$insert APP_INSERTS
$Insert LOT_EQUATES
$Insert TEST_WAFER_PROD_EQUATES
@ -194,10 +194,11 @@ Service CreateNewLot(LotType, ProdName, LotQty, VendorPartNo, VendorLotNo, Vendo
//Get Curr Operation(Should be first one in sequence)
ThisLotCurrOpId = Lot_Services('GetLotCurrOperationId', CreatedLotNumber)
If ThisLotCurrOpId NE '' then
Lot_Services('CreateLotEvent', CreatedLotNumber, 'TW', Datetime(), 'MOVE_IN', 'Move Lot in.', '', 0, 0, ThisLotCurrOpId, Username)
if Error_Services('NoError') then
//Set lot to open
Lot_Services('CreateLotEvent', CreatedLotNumber, 'TW', Datetime(), 'OPEN', 'Setting lot to open.', '', 0, 0, '', Username)
//Set lot to open
Lot_Services('OpenLot', CreatedLotNumber)
if Error_Services('NoError') then
//Move lot in
Lot_Services('MoveInLot', CreatedLotNumber, Username)
if Error_Services('NoError') then
If PrinterID NE 'WEB' then
//If PrinterID is set to WEB this means the request comes from OI_Wizard and the client is going to handle printing.
@ -206,11 +207,9 @@ Service CreateNewLot(LotType, ProdName, LotQty, VendorPartNo, VendorLotNo, Vendo
ErrorMessage = 'Error in Create New Test Wafer Lot Process, lot id: ' : CreatedLotNumber : ' , ' : Error_Services('GetMessage')
end
end
Lot_Services('CreateLotEvent', CreatedLotNumber, 'TW', Datetime(), 'MOVE_OUT', 'Move Lot out.', '', 0, 0, '', Username)
//Lot_Services('MoveOutLot', NewLotId, Username)
Lot_Services('MoveOutLot', NewLotId, Username)
If Error_Services('NoError') then
//Lot_Services('MoveInLot', NewLotId, Username)
Lot_Services('CreateLotEvent', CreatedLotNumber, 'TW', Datetime(), 'MOVE_IN', 'Move in out.', '', 0, 0, '', Username)
Lot_Services('MoveInLot', NewLotId, Username)
If Error_Services('HasError') then
ErrorMessage = 'Error in Create New Test Wafer Lot Process, lot id: ' : NewLotId : ' , ' : Error_Services('GetMessage')
end
@ -222,18 +221,18 @@ Service CreateNewLot(LotType, ProdName, LotQty, VendorPartNo, VendorLotNo, Vendo
end
end else
//Close LOT record as there was an error
Lot_Services('CreateLotEvent', NewLotId, 'TW', Datetime(), 'CLOSE', 'Error occured while created lot. Automatically setting to close', '', 0, 0, '', 'SYSTEM')
ErrorMessage = 'Error in Create New Test Wafer Lot Process, lot id: ' : NewLotId : ' , ' : Error_Services('GetMessage')
Lot_Services('CloseLot', NewLotId)
ErrorMessage = 'Error in Create New Test Wafer Lot Process, lot id: ' : NewLotId : ' , ' : Error_Services('GetMessage')
end
end else
//Close LOT record as there was an error
Lot_Services('CreateLotEvent', NewLotId, 'TW', Datetime(), 'CLOSE', 'Error occured while created lot. Automatically setting to close', '', 0, 0, '', 'SYSTEM')
Lot_Services('CloseLot', NewLotId)
ErrorMessage = 'Error in Create New Test Wafer Lot Process, error getting current operation for lot: ' : NewLotId
end
end else
//Close LOT record as there was an error
//Database_Services('DeleteDataRow', 'LOT', NewLotId, True$, False$)
Lot_Services('CreateLotEvent', NewLotId, 'TW', Datetime(), 'CLOSE', 'Error occured while created lot. Automatically setting to close', '', 0, 0, '', 'SYSTEM')
Lot_Services('CloseLot', NewLotId)
ErrorMessage = 'Error in Create New Test Wafer Lot Process, lot id: ' : NewLotId : ' , ' : Error_Services('GetMessage')
end
end
@ -499,25 +498,6 @@ Service GetLotOperationSequence(LotId)
Response = LotOperationsInSequence
end service
//Returns a @FM delimited list of events in sequence
Service GetLotEventsInSequence(LotId)
LotEventsUnsorted = ''
LotEventsSorted = ''
LotEventsToReturn = ''
If LotID NE '' then
//Get Operations
LotEvents = Xlate('LOT', LotId, LOT_LOT_EVENTS$, 'X')
for each LotEvent in LotEvents using @VM
ThisEventSequence = XLATE('LOT_EVENT', LotEvent, LOT_EVENT_SEQUENCE$, 'X')
LotEventsToReturn<ThisEventSequence> = LotEvent
Next LotOperation
end else
//error: lot id was null
end
Response = LotEventsToReturn
end service
Service GetLotCurrOperationId(LotId)
CurrOperation = ''
If LotID NE '' then
@ -639,6 +619,7 @@ Service IsOperationCompleted(LotOperationId)
end service
Service MoveInLot(LotID, Operator)
ErrorMessage = ''
ThisLotCurrOperationID = ''
If LotId NE '' then
@ -657,7 +638,9 @@ Service MoveInLot(LotID, Operator)
If Error_Services('NoError') then
LotType = XLATE('LOT', LotId, LOT_TYPE$, 'X')
CurrOperation = XLATE('LOT_OPERATION', ThisLotCurrOperationID, LOT_OPERATION_OPERATION_ID$, 'X')
If Error_Services('HasError') then
If Error_Services('NoError') then
Lot_Event_Services('CreateLotEvent', LotId, Datetime(), 'MOVE_IN', 'Lot moved into operation ' : CurrOperation : '.', '', Operator)
end else
ErrorMessage = 'Error in Move In process for Lot id ' : LotId : '. ' : Error_Services('GetMessage')
end
end else
@ -705,8 +688,10 @@ Service MoveOutLot(LotID, Operator)
If Error_Services('NoError') then
LotType = XLATE('LOT', LotId, LOT_TYPE$, 'X')
CurrOperation = XLATE('LOT_OPERATION', ThisLotCurrOperationID, LOT_OPERATION_OPERATION_ID$, 'X')
If Error_Services('HasError') then
ErrorMessage = 'Error in Move In process for Lot id ' : LotId : '. ' : Error_Services('GetMessage')
If Error_Services('NoError') then
Lot_Event_Services('CreateLotEvent', LotId, Datetime(), 'MOVE_OUT', 'Lot moved out of operation ' : CurrOperation : '.', '', Operator)
end else
ErrorMessage = 'Error in Move In process for Lot id ' : LotId : '. ' : Error_Services('GetMessage')
end
end else
ErrorMessage = 'Error in Move Out process for Lot id ' : LotId : '. Error writing to lot operation record. ' : Error_Services('GetMessage')
@ -746,262 +731,6 @@ Service MoveOutLot(LotID, Operator)
end
end service
Service CreateLotEvent(LotId, LotType=LOT_TYPES, EventDatetime, EventType=EVENT_TYPES, EventNote, EventEquipmentId, ReduceWaferQty, BonusWaferQty, OperationId, OperatorId)
ErrorMessage = ''
BeginWaferQty = 0
EndWaferQty = 0
WaferQtyChange = 0
If LotId NE '' then
Begin Case
Case LotType EQ 'TW'
If OperatorId NE '' then
If RowExists('LOT', LotId) then
ValidId = False$
NewEventId = ''
Loop
NewEventId = RTI_CreateGUID()
If Not(RowExists('LOT_EVENT', NewEventId)) then
ValidId = True$
end
Until ValidId EQ True$
Repeat
BeginWaferQty = Xlate('LOT', LotId, LOT_WAFER_QTY$, 'X')
If OperationID EQ '' then
OperationID = Lot_Services('GetLotCurrOperationId', LotId)
end
If OperationID NE '' then
Begin Case
Case EventType EQ 'MOVE_IN'
Lot_Services('MoveInLot', LotId, OperatorId)
If Error_Services('NoError') then
end else
ErrorMessage = Error_Services('GetMessage')
end
Case EventType EQ 'MOVE_OUT'
Lot_Services('MoveOutLot', LotId, OperatorId)
If Error_Services('NoError') then
end else
ErrorMessage = Error_Services('GetMessage')
end
Case EventType EQ 'HOLD_ON'
Lot_Services('HoldLot', LotId, OperatorId)
If Error_Services('NoError') then
end else
ErrorMessage = Error_Services('GetMessage')
end
Case EventType EQ 'HOLD_OFF'
Lot_Services('UnholdLot', LotId, OperatorId)
If Error_Services('NoError') then
end else
ErrorMessage = Error_Services('GetMessage')
end
Case EventType EQ 'REDUCE_WAFER_QTY'
Lot_Services('ReduceLotWaferCount', LotId, ReduceWaferQty, OperatorId)
If Error_Services('NoError') then
end else
ErrorMessage = Error_Services('GetMessage')
end
Case EventType EQ 'BONUS_WAFER_QTY'
Lot_Services('IncreaseLotWaferCount', LotId, BonusWaferQty)
If Error_Services('NoError') then
end else
ErrorMessage = Error_Services('GetMessage')
end
Case EventType EQ 'COMMENT'
//Do Nothing Extra
Case EventType EQ 'LOCATION'
//Do nothing for now.
Case EventType EQ 'CLOSE'
Lot_Services('CloseLot', LotId, OperatorId)
If Error_Services('HasError') then
ErrorMessage = 'Error in Create Lot Event routine, ' : Error_Services('GetMessage')
end
Case EventType EQ 'OPEN'
Lot_Services('OpenLot', LotId)
If Error_Services('HasError') then
ErrorMessage = 'Error in Create Lot Event routine, ' : Error_Services('GetMessage')
end
Case Otherwise$
ErrorMessage = 'Error in Create Lot Event routine, event type of ' : EventType : ' passed to routine is not valid for a lot of type TW.'
End Case
If ErrorMessage EQ '' then
EndWaferQty = (BeginWaferQty + BonusWaferQty) - ReduceWaferQty
NewEventRec = ''
NewEventRec<LOT_EVENT_LOT_ID$> = LotId
NewEventRec<LOT_EVENT_LOT_EVENT_TYPE$> = EventType
NewEventRec<LOT_EVENT_EVENT_DATETIME$> = EventDatetime
NewEventRec<LOT_EVENT_EVENT_NOTE$> = EventNote
NewEventRec<LOT_EVENT_EQUIPMENT_ID$> = EventEquipmentId
NewEventRec<LOT_EVENT_EVENT_REDUCE_WAFER_QTY$> = ReduceWaferQty
NewEventRec<LOT_EVENT_EVENT_BONUS_WAFER_QTY$> = BonusWaferQty
NewEventRec<LOT_EVENT_EVENT_BEGIN_WAFER_QTY$> = BeginWaferQty
NewEventRec<LOT_EVENT_EVENT_END_WAFER_QTY$> = EndWaferQty
NewEventRec<LOT_EVENT_EVENT_OPERATION_ID$> = OperationId
NewEventRec<LOT_EVENT_EVENT_OPERATOR_ID$> = OperatorId
NewEventSequence = Lot_Services('GetLotEventNextSequence', LotId)
NewEventRec<LOT_EVENT_SEQUENCE$> = NewEventSequence
Database_Services('WriteDataRow', 'LOT_EVENT', NewEventId, NewEventRec)
if Error_Services('NoError') then
If BeginWaferQty NE EndWaferQty then
//Adjust LOT wafer qty
LotRecord = Database_Services('ReadDataRow', 'LOT', LotId, True$, 0, False$)
If LotRecord NE '' then
LotRecord<LOT_WAFER_QTY$> = EndWaferQty
Database_Services('WriteDataRow', 'LOT', LotId, LotRecord, True$, False$, False$)
If Error_Services('HasError') then
ErrorMessage = 'Error in CreateLotEvent routine, failed attempt to close lot ':LotId:'. Failed to write to LOT record.'
end
end
end
end else
ErrorMessage = 'Error in Create Lot Event routine, Error writing Lot Event record, ' : Error_Services('GetMessage')
end
end
end else
ErrorMessage = 'Error in Create Lot Event routine, Current Operation for lot id ' : LotId : ' could not be determined.'
end
end else
ErrorMessage = 'Error in Create Lot Event routine, Lot Id passed to routine was not found in LOT table.'
end
end else
ErrorMessage = 'Error in Create Lot Event routine, Operator ID was null.'
end
Case LotType EQ 'RDS' OR LotType EQ 'WO_MAT' OR LotType EQ 'WM_IN' OR LotType EQ 'WM_OUT'
ExistingLotId = Lot_Services('GetLotIdByLegacyLotIdAndType', LotId, LotType)
LegacyLotId = LotId
If ExistingLotId NE '' then
LotId = ExistingLotId
end else
LotId = Lot_Services('CreateNewLot', LotType, '', '', '', '', '', OperatorId, '', LegacyLotId)
end
If RowExists('LOT', LotId) then
If EventType NE '' AND OperatorId NE '' then
ValidId = False$
NewEventId = ''
Loop
NewEventId = RTI_CreateGUID()
If Not(RowExists('LOT_EVENT', NewEventId)) then
ValidId = True$
end
Until ValidId EQ True$
Repeat
BeginWaferQty = Xlate('LOT', LotId, LOT_WAFER_QTY$, 'X')
If ReduceWaferQty NE '' then
If Num(ReduceWaferQty) then
EndWaferQty = BeginWaferQty - ReduceWaferQty
end
end
If BonusWaferQty NE '' then
If Num(BonusWaferQty) then
EndWaferQty = BeginWaferQty + BonusWaferQty
end
end
If Not(Num(EventDatetime)) then EventDatetime = IConv(EventDatetime, 'DT')
Begin Case
Case EventType EQ 'VOID'
Lot_Services('CreateNewVoidedLotRecord', LotId, LegacyLotId, LotType, OperatorId)
If Error_Services('HasError') then
ErrorMessage = Error_Services('GetMessage')
end
Case Otherwise$
//Do Nothing extra
End Case
If ErrorMessage EQ '' then
NewEventRec = ''
NewEventRec<LOT_EVENT_LOT_ID$> = LotId
NewEventRec<LOT_EVENT_LOT_EVENT_TYPE$> = EventType
NewEventRec<LOT_EVENT_EVENT_DATETIME$> = EventDatetime
NewEventRec<LOT_EVENT_EVENT_NOTE$> = EventNote
NewEventRec<LOT_EVENT_EQUIPMENT_ID$> = EventEquipmentId
NewEventRec<LOT_EVENT_EVENT_REDUCE_WAFER_QTY$> = ReduceWaferQty
NewEventRec<LOT_EVENT_EVENT_BONUS_WAFER_QTY$> = BonusWaferQty
NewEventRec<LOT_EVENT_EVENT_BEGIN_WAFER_QTY$> = BeginWaferQty
NewEventRec<LOT_EVENT_EVENT_END_WAFER_QTY$> = EndWaferQty
NewEventRec<LOT_EVENT_EVENT_OPERATION_ID$> = OperationId
NewEventRec<LOT_EVENT_EVENT_OPERATOR_ID$> = OperatorId
NewEventSequence = Lot_Services('GetLotEventNextSequence', LotId)
NewEventRec<LOT_EVENT_SEQUENCE$> = NewEventSequence
Database_Services('WriteDataRow', 'LOT_EVENT', NewEventId, NewEventRec)
end
end else
ErrorMessage = 'Operator ID was null.'
end
end else
ErrorMessage = 'Error in Create Lot Event routine, Lot Id passed to routine was not found in LOT table.'
end
Case Otherwise$
ErrorMessage = 'Error in Create Lot Event routine, An invalid lot type was passed to routine.'
End Case
If Assigned(NewEventId) AND Assigned(LotId) then
If RowExists('LOT_EVENT', NewEventId) AND RowExists('LOT', LotId) then
LotRec = Database_Services('ReadDataRow', 'LOT', LotId, True$, 0, False$)
LotRec<LOT_MOST_RECENT_LOT_EVENT_ID$> = NewEventId
Database_Services('WriteDataRow', 'LOT', LotId, LotRec)
end
end
end else
ErrorMessage = 'Error in Create Lot Event routine, A null value for Lot Id was passed to routine.'
end
If ErrorMessage EQ '' then
LogData = ''
LogData<1> = LoggingDTM
LogData<2> = LotId
LogData<3> = EventType
LogData<4> = OperatorId
LogData<5> = BeginWaferQty
LogData<6> = EndWaferQty
LogData<7> = BonusWaferQty
LogData<8> = ReduceWaferQty
LogData<9> = 'Successfully logged event.'
Logging_Services('AppendLog', objLotEventLog, LogData, @RM, @FM, False$)
end else
LogData = ''
LogData<1> = LoggingDTM
LogData<2> = LotId
LogData<3> = EventType
LogData<4> = OperatorId
LogData<5> = BeginWaferQty
LogData<6> = EndWaferQty
LogData<7> = BonusWaferQty
LogData<8> = ReduceWaferQty
LogData<9> = ErrorMessage
Logging_Services('AppendLog', objLotEventLog, LogData, @RM, @FM, False$)
Error_Services('Add', ErrorMessage)
end
end service
Service GetLotEventNextSequence(LotId)
ErrorMessage = ''
NextSequence = 1
If LotID NE '' then
If RowExists('LOT', LotId) then
LotEvents = XLATE('LOT', LotId, LOT_LOT_EVENTS$, 'X')
for each LotEvent in LotEvents using @VM
ThisEventSequence = XLATE('LOT_EVENT', LotEvent, LOT_EVENT_SEQUENCE$, 'X')
If ThisEventSequence GE NextSequence then NextSequence = ThisEventSequence + 1
Next LotEvent
end else
ErrorMessage = 'Unable to get lot event sequence: Lot ID not found.'
end
end else
ErrorMessage = 'Unable to get lot event sequence: Lot ID was null.'
end
If ErrorMessage EQ '' then
Response = NextSequence
end else
Error_Services('Add', ErrorMessage)
end
end service
Service ConvertLotRecordToJson(LotId, ItemURL, CurrUser, FullObject=BOOLEAN)
ErrorMessage = ''
@ -1042,7 +771,7 @@ Service ConvertLotRecordToJson(LotId, ItemURL, CurrUser, FullObject=BOOLEAN)
//Events Array
EventsArrayJson = ''
If SRP_Json(EventsArrayJson, 'New', 'Array') then
LotEventKeys = Lot_Services('GetLotEventsInSequence', LotId)
LotEventKeys = Lot_Event_Services('GetLotEventsInSequence', LotId)
for each LotEventKey in LotEventKeys using @FM
objEvent = ''
EventRec = Database_Services('ReadDataRow', 'LOT_EVENT', LotEventKey)
@ -1131,8 +860,10 @@ Service OpenLot(LotId)
LotRec = Database_Services('ReadDataRow', 'LOT', LotId, True$, 0, False$)
LotRec<LOT_OPEN$> = True$
Database_Services('WriteDataRow', 'LOT', LotId, LotRec, True$, False$, False$)
If Error_Services('HasError') then
ErrorMessage = 'Error setting lot ' : LotId : ' to open.' : Error_Services('GetMessage')
If Error_Services('NoError') then
Lot_Event_Services('CreateLotEvent', LotId, Datetime(), 'OPEN', 'Lot status set to Open.', '', 'SYSTEM')
end else
ErrorMessage = 'Error setting lot ' : LotId : ' to open.' : Error_Services('GetMessage')
end
end else
ErrorMessage = 'Unable to Open Lot ' : LotId : '. Lot ID was not found in LOT table.'
@ -1148,8 +879,10 @@ Service CloseLot(LotId)
LotRec = Database_Services('ReadDataRow', 'LOT', LotId, True$, 0, False$)
LotRec<LOT_OPEN$> = False$
Database_Services('WriteDataRow', 'LOT', LotId, LotRec, True$, False$, False$)
If Error_Services('HasError') then
ErrorMessage = 'Error setting lot ' : LotId : ' to closed.' : Error_Services('GetMessage')
If Error_Services('NoError') then
Lot_Event_Services('CreateLotEvent', LotId, Datetime(), 'CLOSE', 'Lot status set to Closed', '', 'SYSTEM')
end else
ErrorMessage = 'Error setting lot ' : LotId : ' to closed.' : Error_Services('GetMessage')
end
end else
ErrorMessage = 'Unable to Close Lot ' : LotId : '. Lot ID was not found in LOT table.'
@ -1212,7 +945,8 @@ Service AutoCloseTestWaferLot(LotId, CloseUserId)
ErrorMessage = CloseUserId : ' does not have permission to close this lot.'
end
If ErrorMessage EQ '' then
Lot_Services('CreateLotEvent', LotId, 'TW', AutoCloseTime, 'CLOSE', 'Close action performed by ' : CloseUserId, '', '', '', ThisLotOperationId, CloseUserId)
//Close Lot as there were no validation failures.
Lot_Services('CloseLot', LotId)
If Error_Services('NoError') then
LogData = ''
LogData<1> = LoggingDTM
@ -1276,7 +1010,9 @@ Service ReduceLotWaferCount(LotId, ReductionQty, OperatorId)
LotRec<LOT_WAFER_QTY$> = LotNewWfrQty
Database_Services('WriteDataRow', 'LOT', LotId, LotRec, True$, False$, False$)
If Error_Services('NoError') then
if LotNewWfrQty EQ 0 AND LotType EQ 'TW' then
//Write Lot Event
Lot_Event_Services('CreateLotEvent', LotId, Datetime(), 'REDUCE_WAFER_QTY', 'Reduced wafer count by ' : ReductionQty, '', OperatorId, False$, '')
if LotNewWfrQty EQ 0 AND LotType EQ 'TW' then
ServiceParms = 'AutoCloseTestWaferLot' : @VM : LotId : @VM : 'SYSTEM'
Service_Services('PostProcedure', 'LOT_SERVICES', ServiceParms)
If Error_Services('HasError') then
@ -1291,7 +1027,7 @@ Service ReduceLotWaferCount(LotId, ReductionQty, OperatorId)
end
end
end else
ErrorMessage = 'Error in Increase Lot Wafer Count service, Error writing Lot Id ' : LotId : ' with new quantity.'
ErrorMessage = 'Error in Increase Lot Wafer Count service, Error writing Lot Id ' : LotId : ' with new quantity.'
end
end else
Begin Case
@ -1309,7 +1045,7 @@ Service ReduceLotWaferCount(LotId, ReductionQty, OperatorId)
end
end service
Service IncreaseLotWaferCount(LotId, IncreaseQty)
Service IncreaseLotWaferCount(LotId, IncreaseQty, OperatorId)
ErrorMessage = ''
If RowExists('LOT', LotId) then
LotRec = Database_Services('ReadDataRow', 'LOT', LotId, True$, 0, False$)
@ -1323,8 +1059,11 @@ Service IncreaseLotWaferCount(LotId, IncreaseQty)
If LotNewWfrQty LE 25 AND LotNewWfrQty GT 0 then
LotRec<LOT_WAFER_QTY$> = LotNewWfrQty
Database_Services('WriteDataRow', 'LOT', LotId, LotRec, True$, False$, False$)
If Error_Services('HasError') then
ErrorMessage = 'Error in Increase Lot Wafer Count service, Error writing Lot Id ' : LotId : ' with new quantity.'
If Error_Services('NoError') then
//Write Lot Event
Lot_Event_Services('CreateLotEvent', LotId, Datetime(), 'INCREASE_WAFER_QTY', 'Increased wafer count by ' : IncreaseQty, '', OperatorId, False$, '')
end else
ErrorMessage = 'Error in Increase Lot Wafer Count service, Error writing Lot Id ' : LotId : ' with new quantity.'
end
end else
Begin Case
@ -1347,6 +1086,7 @@ Service IncreaseLotWaferCount(LotId, IncreaseQty)
if ErrorMessage NE '' then
Error_Services('Add', ErrorMessage)
end
end service
Service OpenOIWizardCreateTWLotInBrowser()
@ -1436,3 +1176,4 @@ end service

View File

@ -548,3 +548,4 @@ Service UpdateSecurityGroups()
end service

View File

@ -60,7 +60,7 @@ Common /EnvironmentServices/ Unused1@, Unused2@, Unused3@, Unused4@, Unused5@, U
Declare function Material_Services, Memory_Services, Database_Services, SRP_Array, obj_WO_Mat, obj_WM_Out
Declare function Logging_Services, Environment_Services, Datetime, obj_WO_Step, Database_Services, SQL_Services
Declare function SRP_Rotate_Array, SRP_DateTime, obj_WO_Log, obj_Shipment, SRP_Date
Declare function SRP_Rotate_Array, SRP_DateTime, obj_WO_Log, obj_Shipment, SRP_Date, Rds_Services
Declare subroutine Material_Services, Memory_Services, Database_Services, SRP_Array, Btree.Extract, Logging_Services
Declare subroutine SRP_Stopwatch, Set_Status, RList, Work_Order_Services, SQL_Services, obj_WO_Mat, obj_Notes
Declare subroutine SRP_Rotate_Array, SRP_DateTime, obj_WO_Log, Hold_Services
@ -617,7 +617,7 @@ end service
// Data within each field mark will be @VM row and @SVM column limited.
//----------------------------------------------------------------------------------------------------------------------
Service GetAvailableMakeupWafers(WorkOrderNo, KeysOnly=BOOLEAN)
AvailableMakeupWafers = ''
If WorkOrderNo NE '' then
@ -703,6 +703,7 @@ Service GetAvailableMakeupWafers(WorkOrderNo, KeysOnly=BOOLEAN)
ProdSpecID = Xlate('RDS', RDSKeyIDs, RDS_PROD_SPEC_ID$, 'X')
end
ActiveStatus = XLATE('PROD_SPEC', ProdSpecID, PROD_SPEC_STATUS$, 'X')
LabelCheck = Count(WOMatRow<WO_MAT_INV_ACTION$>, 'LBLCHK')
// JRO Added the extra condition for Active Status 5/8/2020
If ActiveStatus EQ 'A' then
Begin Case
@ -711,7 +712,7 @@ Service GetAvailableMakeupWafers(WorkOrderNo, KeysOnly=BOOLEAN)
// Cassette has not received a batch number from SAP, so it is not yet eligible to be used.
FieldPos = 3
Case ( (ReactorType NE 'EPP') and (RDSRow<RDS_SUP_VER_SIG$> NE '') ) OR ( (ReactorType EQ 'EPP') and (WMOFQASig NE '') )
Case ( (ReactorType NE 'EPP') and (RDSRow<RDS_SUP_VER_SIG$> NE '') and (LabelCheck NE FALSE$) ) OR ( (ReactorType EQ 'EPP') and (WMOFQASig NE '') and (LabelCheck NE FALSE$) )
// Cassette has a final signature, so it is eligible to be used.
FieldPos = 1
@ -719,6 +720,10 @@ Service GetAvailableMakeupWafers(WorkOrderNo, KeysOnly=BOOLEAN)
// Cassette does not yet have a final signature, so it is not yet eligible to be used.
FieldPos = 2
Case ( (ReactorType NE 'EPP') and (RDSRow<RDS_SUP_VER_SIG$> NE '') and (LabelCheck EQ False$)) OR ( (ReactorType EQ 'EPP') and (WMOFQASig NE '') and (LabelCheck EQ False$))
// Cassette does not yet have a packing label check, so it is not yet eligible to be used.
FieldPos = 4
Case Otherwise$
// Log these cassettes as we should never end up here.
Null
@ -1477,3 +1482,5 @@ ClearCursors:
return

View File

@ -98,7 +98,7 @@ Declare function SRP_Sort_Array, Metrology_Services, obj_RDS_Test, obj_Test_P
Declare function Work_Order_Services, SRP_JSON, Logging_Services, Environment_Services, SRP_Trim, Min, Max
Declare function QA_Services, SRP_Join_Arrays, Get_Status, Obj_Clean_Insp, Datetime, SRP_Datetime
Declare function Httpclient_Services, PM_Services, Signature_Services, SRP_Array, Math_Services
Declare function Tool_Class_Services
Declare function Tool_Class_Services, obj_wo_mat
LogPath = Environment_Services('GetApplicationRootPath') : '\LogFiles\Metrology'
LogDate = Oconv(Date(), 'D4/')
@ -567,6 +567,7 @@ Service ImportStratusData(RunData)
Slots = WOMatQARec<WO_MAT_QA_SLOT$>
SpecQty = WOMatQARec<WO_MAT_QA_WFR_QTY$>
pPos = ''
WOMatSlotProfile = obj_WO_Mat('SlotWaferIDs',WOMatKey:@RM:WOMatRec)
For each Profile in Profiles using @VM setting pPos
Stage = Stages<0, pPos>
If ( (Profile EQ '1ADE') and ( (Stage EQ 'QA') or (Stage EQ 'MO_QA') ) ) then
@ -581,9 +582,15 @@ Service ImportStratusData(RunData)
end
Begin Case
Case Slot EQ '1'
WaferIndex = 1
For WaferIndex = 1 to 25
SlotIsEmpty = WOMatSlotProfile<1, WaferIndex> EQ ''
Until SlotIsEmpty EQ False$
Next WaferIndex
Case Slot EQ 'L'
WaferIndex = 25
For WaferIndex = 25 to 1 Step -1
SlotIsEmpty = WOMatSlotProfile<1, WaferIndex> EQ ''
Until SlotIsEmpty EQ False$
Next WaferIndex
Case Slot EQ 'A'
WaferIndex = 1
Case Otherwise$
@ -2221,9 +2228,27 @@ Service RemoveOldMetrology()
end service
/*
ImportBioRadEPPFQAData
Modified and annotated by JRO 4/18/2025
Written to import data specifically for EpiPro QA/FQA Thickness.
Note: Due to the nature of the forms used to validate EpiPro FQA, we currently only support single value data import.
If we wish to extend this to multi value data import than we need to write the values with Sub Value Marks at the Value Mark position of the test profile.
Then we also need to modify the form usage to support parsing those multi-values.
I am leaving the iterating methods in here with the possibility that we can extend this to support multi valued data should the business need it.
This service requires the following parameters:
1. RunData, The internal delimited run data from the parent calling routine ImportBioRadData.
The service does the following actions:
1. Parses through the run data to extract the WMO Lot id, reactor id, recipe id, and slot id.
2. Writes the data point to the slot position in the WM_OUT record - > MU_WAFER_THK_RESULT field, for all wafers whether they are MU wafers or not.
This allows us to detect that Any and all MU wafers have thickness data.
3. Reads the WO_MAT_QA record.
4. Iterates through WO_MAT_QA record -> PROFILE fields @VM values, IF the profile is 1ADE, or QA, or MO_QA then
5. Determines the spec slot by reading the WO_MAT_QA record -> SLOT field
6. If the detected RunDataSlot matches the spec slot, writes the datapoint to the WO_MAT_QA record - > RESULT field in the same @VM that the iterator is currently set to.
*/
Service ImportBioRadEPPFQAData(RunData)
Service ImportBioRadEPPFQAData(RunData, FileName)
Timestamp = RunData<2>
WMOKeyID = RunData<6>
Swap '.' with '*' in WMOKeyID
@ -2232,12 +2257,15 @@ Service ImportBioRadEPPFQAData(RunData, FileName)
RunDataLayer = RunData<8>
ReactorID = RunData<5>
ScanRecipe = RunData<4>
DataSlotId = RunData<11>
DataSlotId = SRP_Trim(DataSlotId, 'F', 0)
FieldPos = 13
FieldPosIncrement = 2
Offset = 1
Decimals = 2
Positions = ''
DataPoints = ''
WMORec = Database_Services('ReadDataRow', 'WM_OUT', WMOKeyID)
WOMatQAKey = Field(WMOKeyID, '*', 1) : '*' : Field(WMOKeyID, '*', 3)
Loop
@ -2257,9 +2285,7 @@ Service ImportBioRadEPPFQAData(RunData, FileName)
Metrology_Services('LogResults', RDSNo@, Machine, 'UID001', Service : ' : ' : Error_Services('GetMessage'))
end
//Update the WM_OUT record for EpiPro
for each wafer in Positions using @VM setting dPos
WMORec<WM_OUT_MU_WAFER_THK_RESULT$, wafer> = DataPoints<0, dPos>
Next wafer
WMORec<WM_OUT_MU_WAFER_THK_RESULT$, DataSlotId> = DataPoints
Database_Services('WriteDataRow', 'WM_OUT', WMOKeyID, WMORec, True$, False$, True$)
end else
Metrology_Services('LogResults', RDSNo@, Machine, 'UID001', Service : ' : ' : Error_Services('GetMessage'))
@ -2279,19 +2305,28 @@ Service ImportBioRadEPPFQAData(RunData, FileName)
Stage = Stages<0, pPos>
If ( (Profile EQ '1ADE') and ( (Stage EQ 'QA') or (Stage EQ 'MO_QA') ) ) then
Slot = Slots<0, pPos>
//There is a specific scenario where when the spec wafers are 1 and L, and there is a makeup wafer in each of the first and last slots, they would then want to
//measure the next open slot, either incremented down from the last wafer position or incremented up from the first wafer position.
//We may need to add that in when the definition becomes clearer.
Begin Case
Case Slot EQ '1'
WaferIndex = 1
Case Slot EQ '1'
For WaferIndex = 1 to 25
SlotIsEmpty = Database_Services('ReadDataColumn', 'WM_OUT', WMOKeyID, WM_OUT_RDS$, True$, 0, False$)<1, WaferIndex> EQ ''
Until SlotIsEmpty EQ False$
Next WaferIndex
Case Slot EQ 'L'
WaferIndex = 25
For WaferIndex = 25 to 1 Step -1
SlotIsEmpty = Database_Services('ReadDataColumn', 'WM_OUT', WMOKeyID, WM_OUT_RDS$, True$, 0, False$)<1, WaferIndex> EQ ''
Until SlotIsEmpty EQ False$
Next WaferIndex
Case Slot EQ 'A'
WaferIndex = 1
Case Otherwise$
WaferIndex = Slot
End Case
Locate WaferIndex in Positions using @VM setting dPos then
WOMatQARec<WO_MAT_QA_RESULT$, pPos> = DataPoints<0, dPos>
end
If DataSlotId EQ WaferIndex then
WOMatQARec<WO_MAT_QA_RESULT$, pPos> = DataPoints
end
end
Next Profile
Database_Services('WriteDataRow', 'WO_MAT_QA', WOMatQAID, WOMatQARec, True$, False$, True$)
@ -2371,8 +2406,7 @@ Service GetIQSViolations()
Response = 0
ParsedIQSData = ''
Pass = 1
//URL = "https://oi-metrology-viewer-prod.mes.infineon.com:4432/product-thick-and-res-health-reduced-web.html"
URL = "https://messa020ec.infineon.com:4438/product-thick-and-res-health-reduced-web.html"
URL = "https://messa04ec.infineon.com/product-thick-and-res-health-reduced-web.html"
TimeoutDuration = HTTPClient_Services('GetTimeoutDuration')
If TimeoutDuration NE 30 then Httpclient_Services('SetTimeoutDuration', 30)
IQSResponse = Httpclient_Services('SendHTTPRequest', 'GET', URL, '', '', '', '', '', '', '')
@ -2967,3 +3001,4 @@ LoadRunDataToDatabase:
return

View File

@ -125,10 +125,10 @@ Event PUB_SUBMIT.CLICK()
Begin Case
Case NewWfrQty LT CurrWfrQty
AmountToDecrease = CurrWfrQty - NewWfrQty
Lot_Services('CreateLotEvent', LotId, LotType, Datetime(), 'REDUCE_WAFER_QTY', 'Adjust wafer count by ' : AmountToDecrease, '', AmountToDecrease, 0, '', @User4)
Lot_Services('ReduceLotWaferCount', LotId, AmountToDecrease, @User4)
Case NewWfrQty GT CurrWfrQty
AmountToIncrease = NewWfrQty - CurrWfrQty
Lot_Services('CreateLotEvent', LotId, LotType, Datetime(), 'BONUS_WAFER_QTY', 'Adjust wafer count by ' : AmountToIncrease, '', 0, AmountToIncrease, '', @User4)
Lot_Services('IncreaseLotWaferCount', LotId, AmountToIncrease, @User4)
End Case
If Error_Services('NoError') then
msg(@Window, 'Wafer quantity adjusted successfully!')
@ -175,3 +175,4 @@ return

View File

@ -24,6 +24,7 @@ Return EventFlow or 1
//-----------------------------------------------------------------------------
Event WINDOW.CREATE(CreateParam)
PlaceDialog(-2, -2)
Set_Property(@Window, 'VISIBLE', 1)
NewTWSystemActive = XLATE('APP_INFO', 'NEW_TW_SYSTEM_ACTIVE_SWITCH', 1, 'X')
@ -84,12 +85,15 @@ Event WINDOW.CREATE(CreateParam)
End Event
Event Window.CLOSE(CancelFlag, CloseFlags)
Result = ''
Result<1> = False$
End_Dialog(@Window, Result)
end event
Event EDL_LOT_ID.LOSTFOCUS(Flag, FocusID)
LotIdString = UCASE(Get_Property(@Window : '.EDL_LOT_ID', 'TEXT'))
If LotIdString NE '' then
If LotIdString[1, 4] EQ '1TTW' then
@ -102,7 +106,21 @@ Event EDL_LOT_ID.LOSTFOCUS(Flag, FocusID)
end event
Event CMB_EQUIP_TYPE.CHANGED(NewData)
ReactorOpts = Get_Property(@Window, '@REACTOR_OPTS')
NonReactorOpts = Get_Property(@Window, '@NON_REACTOR_OPTS')
Begin Case
Case NewData EQ 'Non-Reactor'
Set_Property(@Window : '.CMB_EQUIPMENT_ID', 'LIST', NonReactorOpts)
Case NewData EQ 'Reactor'
Set_Property(@Window : '.CMB_EQUIPMENT_ID', 'LIST', ReactorOpts)
End Case
end event
Event EDL_RDS.LOSTFOCUS(Flag, FocusID)
RDSNo = Get_Property(@Window : '.EDL_RDS', 'TEXT')
If Len(RDSNo) GE 6 then
If RowExists('RDS', RDSNo) then
@ -127,9 +145,11 @@ Event EDL_RDS.LOSTFOCUS(Flag, FocusID)
Set_Property(@Window : '.CMB_EQUIPMENT_ID', 'ENABLED', True$)
Set_Property(@Window : '.CMB_EQUIP_TYPE', 'ENABLED', True$)
end
end event
Event PUB_ADD_LOT.CLICK()
TWLotUseArray = Get_Property(@Window: '.EDT_TW_USAGE', 'LIST')
LotId = Get_Property(@Window : '.EDL_LOT_ID', 'TEXT')
If LotId NE '' then
@ -191,27 +211,34 @@ Event PUB_ADD_LOT.CLICK()
end event
Event EDT_TW_USAGE.ROWSELCHANGED(SelRow, SelState)
If SelRow NE '' then
Set_Property(@Window: '.PUB_REMOVE_SELECTED', 'ENABLED', True$)
end else
Set_Property(@Window: '.PUB_REMOVE_SELECTED', 'ENABLED', False$)
end
end event
Event PUB_REMOVE_SELECTED.CLICK()
SelectedRow = Get_Property(@Window : '.EDT_TW_USAGE', 'SELPOS')<2>
TWLotUseArray = Get_Property(@Window: '.EDT_TW_USAGE', 'LIST')
If SelectedRow LE DCount(TWLotUseArray, @FM) then
TWLotUseArray = Delete(TWLotUseArray, SelectedRow , 0, 0)
end
Set_Property(@Window : '.EDT_TW_USAGE', 'LIST', TWLotUseArray)
end event
Event PUB_CLEAR.CLICK()
GoSub ClearFormData
end event
Event PUB_SUBMIT.CLICK()
NotReadyReason = ''
//Gather all field information
ReasonForTest = Get_Property(@Window : '.CMB_TEST_TYPE', 'TEXT')
@ -285,6 +312,7 @@ Event PUB_SUBMIT.CLICK()
end else
Msg(@Window, NotReadyReason)
end
end event
//-----------------------------------------------------------------------------
@ -292,6 +320,7 @@ end event
//-----------------------------------------------------------------------------
FillFormMasterData:
//Get Test run type options. Populate to CMB_TEST_TYPE
TestRunTypeList = Test_Run_Services('GetAllTestRunTypes')
Set_Property(@Window, '@RUN_TYPE_OPTS', TestRunTypeList)
@ -313,16 +342,18 @@ FillFormMasterData:
Set_Property(@Window : '.EDT_NON_REACTORS', 'TEXT', NonReactorOpts)
Set_Property(@Window, '@NON_REACTOR_OPTS', NonReactorOpts)
//Then set the inital combo list to be filled with reactors because that is the default.
Set_Property(@Window : '.CMB_EQUIP_TYPE', 'DEFPROP', 'Reactor')
Set_Property(@Window : '.CMB_EQUIPMENT_ID', 'LIST', ReactorOpts)
//Get TW Products and store them in user defined window property @TW_PROD_OPTS
Prods = Test_Run_Services('GetAllTWProdKeys', 1)
Set_Property(@Window, '@TW_PROD_OPTS', Prods)
Return
ClearFormData:
Set_Property(@Window : '.EDL_LOT_ID', 'TEXT', '')
Set_Property(@Window : '.EDL_RDS', 'TEXT', '')
Set_Property(@Window : '.EDL_PSN', 'TEXT', '')
Set_Property(@Window : '.EDL_PSN', 'ENABLED', True$)
Set_Property(@Window : '.CMB_EQUIP_TYPE', 'TEXT', '')
@ -331,11 +362,6 @@ ClearFormData:
Set_Property(@Window : '.CMB_EQUIPMENT_ID', 'ENABLED', True$)
Set_Property(@Window : 'CMB_TEST_TYPE', 'TEXT', '')
Set_Property(@Window : '.EDT_TW_USAGE', 'LIST', '')
return

View File

@ -85,19 +85,45 @@ Event WINDOW.CREATE(CreateParam)
MsgUp = Msg(@Window, MsgDef)
MakeupWafers = Material_Services('GetAvailableMakeupWafers', ThisWorkOrderNo, False$)
// Remove cassette being backfilled from available list
MakeupWafersClean = ''
NumMUCass = DCount(MakeupWafers, @VM)
If NumMUCass GT 0 then
For CassIndex = 1 to NumMUCass
Row = MakeupWafers<0, CassIndex>
MuWoMatKey = Row<0, 0, 1> : '*' : Row<0, 0, 2>
If (MuWoMatKey NE ThisWOMatKey) then MakeupWafersClean<0, -1> = Row
Next CassIndex
AvailMuCass = ''
NoFQAMuCass = ''
NoBatchMuCass = ''
NoLabelMuCass = ''
If MakeupWafers<1> NE '' then
For each Row in MakeupWafers<1> using @VM setting RowPos
MuWoMatKey = Row<0, 0, 1> : '*' : Row<0, 0, 2>
If (MuWoMatKey NE ThisWOMatKey) then AvailMuCass<0, -1> = Row
Next Row
end
MakeupWafers = MakeupWafersClean
If MakeupWafers<2> NE '' then
For each Row in MakeupWafers<2> using @VM setting RowPos
MuWoMatKey = Row<0, 0, 1> : '*' : Row<0, 0, 2>
If (MuWoMatKey NE ThisWOMatKey) then NoFQAMuCass<0, -1> = Row
Next Row
end
If MakeupWafers<3> NE '' then
For each Row in MakeupWafers<3> using @VM setting RowPos
MuWoMatKey = Row<0, 0, 1> : '*' : Row<0, 0, 2>
If (MuWoMatKey NE ThisWOMatKey) then NoBatchMuCass<0, -1> = Row
Next Row
end
If MakeupWafers<4> NE '' then
For each Row in MakeupWafers<4> using @VM setting RowPos
MuWoMatKey = Row<0, 0, 1> : '*' : Row<0, 0, 2>
If (MuWoMatKey NE ThisWOMatKey) then NoLabelMuCass<0, -1> = Row
Next Row
end
MakeupWafers<1> = AvailMuCass
MakeupWafers<2> = NoFQAMuCass
MakeupWafers<3> = NoBatchMuCass
MakeupWafers<4> = NoLabelMuCass
Msg(@Window, MsgUp)
@ -186,6 +212,9 @@ Setup_OLE_Controls:
PicUnsignedCtrl = @Window : '.OLE_PIC_UNAVAILABLE_DIVIDER'
RptNoBatchCtrl = @Window : '.OLE_RPT_NO_BATCH_WAFERS'
PicNoBatchCtrl = @Window : '.OLE_PIC_NO_BATCH_DIVIDER'
RptNoLabelCtrl = @Window : '.OLE_RPT_NO_PACK_LABEL'
PicNoLabelCtrl = @Window : '.OLE_PIC_NO_PACK_LABEL'
ColumnList = ''
ColumnList<1> = 'WO No' : @VM : 'TEXT' : @VM : 100 : @VM : @VM : @VM : @VM : @VM : @VM : @VM : 'Center' : @VM : @VM : @VM : @VM : 'Segoe UI,9'
@ -198,10 +227,12 @@ Setup_OLE_Controls:
Set_Property(RptSignedCtrl, 'OLE.ColumnList', ColumnList)
Set_Property(RptUnsignedCtrl, 'OLE.ColumnList', ColumnList)
Set_Property(RptNoBatchCtrl, 'OLE.ColumnList', ColumnList)
Set_Property(RptNoLabelCtrl, 'OLE.ColumnList', ColumnList)
SignedWafers = ''
UnsignedWafers = ''
NoBatchWafers = ''
NoLabelWafers = ''
If MakeupWafers NE '' then
SignedWafers = MakeupWafers<1>
Convert @VM to @FM in SignedWafers
@ -212,6 +243,9 @@ Setup_OLE_Controls:
NoBatchWafers = MakeupWafers<3>
Convert @VM to @FM in NoBatchWafers
Convert @SVM to @VM in NoBatchWafers
NoLabelWafers = MakeupWafers<4>
Convert @VM to @FM in NoLabelWafers
Convert @SVM to @VM in NoLabelWafers
end
// Get the design time form size. This will be adjusted based on various conditions.
@ -222,9 +256,12 @@ Setup_OLE_Controls:
PicUnsignedCtrlSize = Get_Property(PicUnsignedCtrl, 'SIZE')
RptNoBatchCtrlSize = Get_Property(RptNoBatchCtrl, 'SIZE')
PicNoBatchCtrlSize = Get_Property(PicNoBatchCtrl, 'SIZE')
RptNoLabelCtrlSize = Get_Property(RptNoLabelCtrl, 'SIZE')
PicNoLabelCtrlSize = Get_Property(PicNoLabelCtrl, 'SIZE')
NumSignedWafers = DCount(SignedWafers, @FM)
NumUnsignedWafers = DCount(UnsignedWafers, @FM)
NumNoBatchWafers = DCount(NoBatchWafers, @FM)
NumNoLabelWafers = DCount(NoLabelWafers, @FM)
If NumSignedWafers EQ 0 then
// If there are no signed wafers are available, display the prompt that asks the user to convert to a makeup box.
@ -249,6 +286,15 @@ Setup_OLE_Controls:
Set_Property(RptNoBatchCtrl, 'SIZE', RptNoBatchCtrlSize)
Set_Property(PicNoBatchCtrl, 'SIZE', PicNoBatchCtrlSize)
end
If NumNoBatchWafers GT 0 then
// Increase the height of the form to display the no label wafers ReportTable control. Move the controls
// down to display below the makeup box message.
FormSize<4> = FormSize<4> + 72
RptNoLabelCtrlSize<2> = RptNoLabelCtrlSize<2> + 146
PicNoLabelCtrlSize<2> = PicNoLabelCtrlSize<2> + 146
Set_Property(RptNoLabelCtrl, 'SIZE', RptNoLabelCtrlSize)
Set_Property(PicNoLabelCtrl, 'SIZE', PicNoLabelCtrlSize)
end
end else
Set_Property(RptSignedCtrl, 'OLE.List', SignedWafers)
If NumSignedWafers GT 1 then
@ -321,7 +367,54 @@ Setup_OLE_Controls:
Set_Property(RptNoBatchCtrl, 'SIZE', RptNoBatchCtrlSize)
Set_Property(PicNoBatchCtrl, 'SIZE', PicNoBatchCtrlSize)
end
// Adjust no Label ReportTable
If NumNoLabelWafers EQ 0 then
Set_Property(PicNoLabelCtrl, 'VISIBLE', False$)
Set_Property(RptNoLabelCtrl, 'VISIBLE', False$)
FormSize<4> = FormSize<4> - 74
end else
Set_Property(RptNoLabelCtrl, 'OLE.List', NoLabelWafers)
If NumNoLabelWafers GT 1 then
// Add more height to display extra rows.
RptNoLabelCtrlSize<4> = RptNoLabelCtrlSize<4> + (20 * (NumNoLabelWafers - 1))
end
If NumSignedWafers EQ 0 then
// There are no signed wafers. Move the no Label ReportTable up.
RptNoLabelCtrlSize<2> = RptNoLabelCtrlSize<2> - 74
PicNoLabelCtrlSize<2> = PicNoLabelCtrlSize<2> - 74
end else
If NumSignedWafers GT 1 then
// Signed wafers has been made taller. Move the no Label ReportTable down further.
RptNoLabelCtrlSize<2> = RptNoLabelCtrlSize<2> + (20 * (NumSignedWafers - 1))
PicNoLabelCtrlSize<2> = PicNoLabelCtrlSize<2> + (20 * (NumSignedWafers - 1))
end
end
If NumUnsignedWafers EQ 0 then
// There are no unsigned wafers. Move the no Label ReportTable up.
RptNoLabelCtrlSize<2> = RptNoLabelCtrlSize<2> - 74
PicNoLabelCtrlSize<2> = PicNoLabelCtrlSize<2> - 74
end else
If NumUnsignedWafers GT 1 then
// Unsigned wafers has been made taller. Move the no Label ReportTable down further.
RptNoLabelCtrlSize<2> = RptNoLabelCtrlSize<2> + (20 * (NumUnsignedWafers - 1))
PicNoLabelCtrlSize<2> = PicNoLabelCtrlSize<2> + (20 * (NumUnsignedWafers - 1))
end
end
If NumNoBatchWafers EQ 0 then
RptNoLabelCtrlSize<2> = RptNoLabelCtrlSize<2> - 74
PicNoLabelCtrlSize<2> = PicNoLabelCtrlSize<2> - 74
end else
If NumNoBatchWafers GT 1 then
// Unsigned wafers has been made taller. Move the no Label ReportTable down further.
RptNoLabelCtrlSize<2> = RptNoLabelCtrlSize<2> + (20 * (NumNoBatchWafers - 1))
PicNoLabelCtrlSize<2> = PicNoLabelCtrlSize<2> + (20 * (NumNoBatchWafers - 1))
end
end
Set_Property(RptNoLabelCtrl, 'SIZE', RptNoLabelCtrlSize)
Set_Property(PicNoLabelCtrl, 'SIZE', PicNoLabelCtrlSize)
end
AdditionalRowsAdj = 0
If NumSignedWafers GT 1 then AdditionalRowsAdj += (NumSignedWafers - 1) * 20
If NumUnsignedWafers GT 1 then AdditionalRowsAdj += (NumUnsignedWafers - 1) * 20
@ -352,3 +445,6 @@ Setup_OLE_Controls:
return

View File

@ -2,7 +2,7 @@ Compile function NDW_VIEW_LOT_EVENTS(CtrlEntId, Event, @PARAMS)
#pragma precomp SRP_PreCompiler
#window NDW_VIEW_LOT
Declare function Get_Property, Lot_Services, Database_Services
Declare function Get_Property, Lot_Services, Database_Services, Lot_Event_Services
Declare subroutine Set_Property
$Insert APP_INSERTS
@ -80,7 +80,7 @@ GetLot:
Next LotOperation
//Lot Event Status'
LotEventsInSequence = Lot_Services('GetLotEventsInSequence', ThisLotId)
LotEventsInSequence = Lot_Event_Services('GetLotEventsInSequence', ThisLotId)
LotEventTableData = ''
For each LotEvent in LotEventsInSequence using @FM
LotEventRec = Database_Services('ReadDataRow', 'LOT_EVENT', LotEvent)
@ -111,3 +111,4 @@ ResetForm:
Set_Property(@Window : '.EDT_LOT_OPERATIONS', 'ARRAY', '')
Set_Property(@Window : '.EDT_LOT_EVENTS', 'ARRAY', '')
return

View File

@ -19,7 +19,7 @@ COMPILE FUNCTION obj_WO_Mat_Log(Method,Parms)
DECLARE FUNCTION Get_Status, Msg, Utility, obj_Tables, Dialog_Box, NextKey, Popup, Get_Property, obj_RDS, Database_Services
Declare function Logging_Services, Environment_Services, RTI_CreateGUID, Error_Services, Datetime
DECLARE SUBROUTINE Set_Status, Msg, obj_Tables, Send_Dyn, Btree.Extract, ErrMsg, Send_Dyn, RList, obj_WO_Log, Send_Event, obj_RDS
DECLARE SUBROUTINE obj_WO_Mat, Send_Info, obj_Notes, Logging_Services, Database_Services, Lot_Services
DECLARE SUBROUTINE obj_WO_Mat, Send_Info, obj_Notes, Logging_Services, Database_Services, Lot_Event_Services
$INSERT MSG_EQUATES
$INSERT WO_MAT_LOG_EQUATES
@ -166,8 +166,7 @@ Create:
CassNo = CassNos
WOMatKey = WONo : '*' : CassNo
RDSKey = XLATE('WO_MAT', WOMatKey, WO_MAT_RDS_NO$, 'X')
Lot_Services('CreateLotEvent', RDSKey, 'RDS', Datetime(), Action, '', '', 0, 0, '', UserID)
Lot_Services('CreateLotEvent', WOMatKey, 'WO_MAT', Datetime(), Action, '', '', 0, 0, '', UserID)
Lot_Event_Services('CreateLotEvent', RDSKey, Datetime(), Action, '', '', UserId, True$, 'RDS')
end else
Begin Case
Case Action EQ 'RCVD'
@ -176,14 +175,14 @@ Create:
StepNo = 1
CassNo = CassNos
WMInKey = WONo : '*' : StepNo : '*' : CassNo
Lot_Services('CreateLotEvent', WMInKey, 'WM_IN', Datetime(), Action, '', '', 0, 0, '', UserID)
Lot_Event_Services('CreateLotEvent', WMInKey, Datetime(), Action, '', '', UserId, True$, 'WM_IN')
Case Action EQ 'REL'
//WMI
WONo = WoNos
StepNo = 1
CassNo = CassNos
WMInKey = WONo : '*' : StepNo : '*' : CassNo
Lot_Services('CreateLotEvent', WMInKey, 'WM_IN', Datetime(), Action, '', '', 0, 0, '', UserID)
Lot_Event_Services('CreateLotEvent', WMInKey, Datetime(), Action, '', '', UserId, True$, 'WM_IN')
Case Action EQ '1VER'
//RDS action, do nothing for now
Case Action EQ '1LOAD'
@ -195,38 +194,38 @@ Create:
StepNo = 1
CassNo = CassNos
WMOutKey = WONo : '*' : StepNo : '*' : CassNo
Lot_Services('CreateLotEvent', WMOutKey, 'WM_OUT', Datetime(), Action, '', '', 0, 0, '', UserID)
Lot_Event_Services('CreateLotEvent', WMOutKey, Datetime(), Action, '', '', UserId, True$, 'WM_OUT')
Case Action EQ '1MO_QA'
WONo = WoNos
StepNo = 1
CassNo = CassNos
WMOutKey = WONo : '*' : StepNo : '*' : CassNo
Lot_Services('CreateLotEvent', WMOutKey, 'WM_OUT', Datetime(), Action, '', '', 0, 0, '', UserID)
Lot_Event_Services('CreateLotEvent', WMOutKey, Datetime(), Action, '', '', UserId, True$, 'WM_OUT')
Case Action EQ 'PACK'
WONo = WoNos
StepNo = 1
CassNo = CassNos
WMOutKey = WONo : '*' : StepNo : '*' : CassNo
Lot_Services('CreateLotEvent', WMOutKey, 'WM_OUT', Datetime(), Action, '', '', 0, 0, '', UserID)
Lot_Event_Services('CreateLotEvent', WMOutKey, Datetime(), Action, '', '', UserId, True$, 'WM_OUT')
Case Action EQ 'PSVER'
WONo = WoNos
StepNo = 1
CassNo = CassNos
WMOutKey = WONo : '*' : StepNo : '*' : CassNo
Lot_Services('CreateLotEvent', WMOutKey, 'WM_OUT', Datetime(), Action, '', '', 0, 0, '', UserID)
Lot_Event_Services('CreateLotEvent', WMOutKey, Datetime(), Action, '', '', UserId, True$, 'WM_OUT')
Case Action EQ 'SHIP'
WONo = WoNos
StepNo = 1
CassNo = CassNos
WMOutKey = WONo : '*' : StepNo : '*' : CassNo
Lot_Services('CreateLotEvent', WMOutKey, 'WM_OUT', Datetime(), Action, '', '', 0, 0, '', UserID)
Lot_Event_Services('CreateLotEvent', WMOutKey, Datetime(), Action, '', '', UserId, True$, 'WM_OUT')
Case Action EQ 'LBLCHK'
//WMO
WONo = WoNos
StepNo = 1
CassNo = CassNos
WMOutKey = WONo : '*' : StepNo : '*' : CassNo
Lot_Services('CreateLotEvent', WMOutKey, 'WM_OUT', Datetime(), Action, '', '', 0, 0, '', UserID)
Lot_Event_Services('CreateLotEvent', WMOutKey, Datetime(), Action, '', '', UserId, True$, 'WM_OUT')
End Case
end
ErrorMsg = ''
@ -364,3 +363,4 @@ Post:
end
RETURN

View File

@ -1,108 +0,0 @@
Compile function OPERATION_TW_CREATE(LotId, Action, Operator)
//Action: IN, OUT, PROCESS
Declare function Lot_Services, Error_Services, Datetime, Database_Services
Declare subroutine Database_Services, Lot_Services
#pragma precomp SRP_PreCompiler
$insert LOGICAL
$Insert APP_INSERTS
$Insert Lot_Operation_Equates
$Insert LOT_EQUATES
Success = False$
debug
If RowExists('LOT', LotId) then
If Operator NE '' and RowExists('LSL_USERS', Operator) then
Begin Case
Case Action = 'IN'
GoSub MoveIn
Case Action = 'OUT'
GoSub MoveOut
Case Action = 'PROCESS'
GoSub Process
Case Otherwise$
null
End Case
end else
Error_Services('Add', 'Operator ID was null')
end
end else
Error_Services('Add', 'Invalid lot passed to Operation routine.')
Success = False$
end
Return Success
MoveIn:
debug
//Get TW Create Operation ID
ThisOperationID = Lot_Services('GetLotCurrOperationId', LotId)
If Field(ThisOperationId, '*', 1) EQ 'TW_CREATE' then
ThisLotCurrOperationRec = Database_Services('ReadDataRow', 'LOT_OPERATION', ThisOperationID)
ThisLotCurrOperationRec<LOT_OPERATION_DATETIME_IN$> = Datetime()
ThisLotCurrOperationRec<LOT_OPERATION_WAFER_IN_QTY$> = Xlate('LOT', LotId, LOT_WAFER_QTY$, 'X')
ThisLotCurrOperationRec<LOT_OPERATION_OPERATOR_IN_ID$> = Operator
Database_Services('WriteDataRow', 'LOT_OPERATION', ThisLotCurrOperationID, ThisOperationID)
If Error_Services('NoError') then
LotType = XLATE('LOT', LotId, LOT_TYPE$, 'X')
CurrOperation = XLATE('LOT_OPERATION', ThisLotCurrOperationID, LOT_OPERATION_OPERATION_ID$, 'X')
Lot_Services('CreateLotEvent', LotId, LotType, Datetime(), 'MOVE_IN', '', '', 0, 0, CurrOperation, Operator)
end
end else
Error_Services('Add', 'Failed to move in lot. Lot is not currently at TW_CREATE. Detected Operation is ' : Field(ThisOperationId, '*', 1))
end
return
MoveOut:
ThisOperationID = Lot_Services('GetLotCurrOperationID', LotId)
If Field(ThisOperationId, '*', 1) EQ 'TW_CREATE' then
ThisLotCurrOperationRec = Database_Services('ReadDataRow', 'LOT_OPERATION', ThisLotCurrOperationID)
LotMovedIn = ThisLotCurrOperationRec<LOT_OPERATION_DATETIME_IN$>
If LotMovedIn then
ThisOperationSteps = ThisLotCurrOperationRec<LOT_OPERATION_STEPS$>
AllStepsCompleted = False$
for each OperationStepId in ThisOperationSteps using @VM
ThisStepComplete = Xlate('LOT_OPERATION_STEP', OperationStepId, LOT_OPERATION_STEP_STEP_COMPLETED$, 'X')
If ThisStepComplete then
AllStepsComplete = True$
end else
AllStepsComplete = False$
end
until AllStepsCompleted = False$
Next OperationStep
If AllStepsCompleted then
ThisLotCurrOperationRec<LOT_OPERATION_DATETIME_OUT$> = Datetime()
ThisLotCurrOperationRec<LOT_OPERATION_WAFER_OUT_QTY$> = Xlate('LOT', LotId, LOT_WAFER_QTY$, 'X')
ThisLotCurrOperationRec<LOT_OPERATION_OPERATOR_OUT_ID$> = Operator
Database_Services('WriteDataRow', 'LOT_OPERATION', ThisLotCurrOperationID, ThisLotCurrOperationRec)
If Error_Services('NoError') then
LotType = XLATE('LOT', LotId, LOT_TYPE$, 'X')
CurrOperation = XLATE('LOT_OPERATION', ThisLotCurrOperationID, LOT_OPERATION_OPERATION_ID$, 'X')
Lot_Services('CreateLotEvent', LotId, LotType, Datetime(), 'MOVE_OUT', '', '', ReduceQty, BonusQty, CurrOperation, Operator)
end
end else
Error_Services('Add', 'Failed to move out lot. Not all steps completed.')
end
end else
Error_Services('Add', 'Failed to move out lot. Lot was not moved in.')
end
end
return
Process:
//Get Current Step and proceed from that step onward
return
OpenLot:
return
PrintLabel:
return

View File

@ -65,6 +65,7 @@ Equ COMMA$ to ','
Declare function Error_Services, Database_Services, obj_RDS_Test, Logging_Services, Environment_Services
Declare function Tool_Parms_Services, Signature_Services, obj_WO_Mat_QA, Datetime, Override_Services
Declare function Rds_Services, SRP_DateTime, SRP_Math, obj_WO_Mat, Lot_Services, SRP_Array
Declare function Lot_Event_Services
Declare subroutine Error_Services, Database_Services, Logging_Services, Service_Services
LogPath = Environment_Services('GetApplicationRootPath') : '\LogFiles\RDS'
@ -689,7 +690,7 @@ WRITE_RECORD_PRE:
// Audit the LOT_EVENT table for missing LOAD event (i.e., signature)
ExistingNGLotId = Lot_Services('GetLotIdByLegacyLotIdAndType', RDSNo, 'RDS')
If RowExists('LOT', ExistingNGLotId) then
LotEvents = Lot_Services('GetLotEventsInSequence', ExistingNGLotId)
LotEvents = Lot_Event_Services('GetLotEventsInSequence', ExistingNGLotId)
If LotEvents NE '' then
LotEventsRev = SRP_Array('Reverse', LotEvents, @FM)
LotEventsTypesRev = Xlate('LOT_EVENT', LotEventsRev, LOT_EVENT_LOT_EVENT_TYPE$, 'X')
@ -1043,3 +1044,4 @@ Restore_System_Variables:
return

View File

@ -86,7 +86,7 @@ EQU READONLY_GREEN$ TO 192 + (220*256) + (192*65536)
Declare subroutine ErrMsg, Set_Status, obj_WO_Mat, obj_WO_Mat_Log, obj_RDS, Set_Property, Send_Event, Database_Services
Declare subroutine Dialog_Box, Qa_Services, Obj_React_Ll, Start_Window, obj_React_Status, Reactor_Services, Rds_Services
Declare subroutine Lot_Services, Override_Log_Services
Declare subroutine Lot_Event_Services, Override_Log_Services
Declare function Dialog_Box, Msg, MemberOf, obj_WO_Mat, Database_Services, Get_Property, obj_React_Status, Get_Status
Declare function QA_Services, Database_Services, Rds_Services, Obj_Calendar, Override_Log_Services, Max, Supplement_Services
Declare function Datetime, Test_Run_Services
@ -463,8 +463,7 @@ Event PUB_SIGN.CLICK()
OverrideUser = Response<2>
If Valid then
Lot_Services('CreateLotEvent', RDSNo, 'RDS', Datetime(), 'UNSIGN_LOAD', 'Load stage unsigned', Reactor, '', '', '', @User4)
Lot_Event_Services('CreateLotEvent', RDSNo, Datetime(), 'UNSIGN_LOAD', 'Load stage unsigned', 'Reactor', @User4, True$, 'RDS')
// 4. Remove WO_MAT Unload signature, date, and time
WOMatRec = Database_Services('ReadDataRow', 'WO_MAT', WOMatKey)
@ -729,3 +728,4 @@ OLE_LL_Status:
return

View File

@ -44,9 +44,20 @@ $insert SCANS_EQUATES
$insert RDS_EQUATES
$insert SCAN_SETUP
Declare Function Scan_Services, Database_Services, QA_Services, Datetime, RDS_Services, SRP_Array
Declare Subroutine Scan_Services, Database_Services, QA_Services, obj_WO_Mat_Log
Declare Function Scan_Services, Database_Services, QA_Services, Datetime, RDS_Services, SRP_Array, SRP_Stopwatch
Declare function Logging_Services, Environment_Services
Declare Subroutine Scan_Services, Database_Services, QA_Services, obj_WO_Mat_Log, SRP_Stopwatch
Declare Subroutine Logging_Services
LogPath = Environment_Services('GetApplicationRootPath') : '\LogFiles\ScanAPI\APIResponseTime'; //Define the directory where the log will be saved to. This happens the first time of the day that the log is written to.
LogDate = Oconv(Date(), 'D4/')
LogTime = Oconv(Time(), 'MTS')
LoggingDTM = LogDate : ' ' : LogTime ; // Logging DTM
LogFileName = LogDate[7, 4] : '-' : LogDate[1, 2] : '-' : LogDate[4, 2] : ' ScanAPIResponseTimes.csv'; //Define the file name that will get created.
Headers = 'Logging DTM' : @FM : 'API' : @FM : 'ResponseTime' : @FM : 'ScanID' : @FM : 'ScanData' : @VM : 'StatusCode' ; //Define the column names in the log file, delimited by a Field Mark.
objLog = Logging_Services('NewLog', LogPath, LogFileName, CRLF$, ',', Headers, '', False$, False$); //Actually creates the log.
GoToAPI else
// The specific resource endpoint doesn't have a API handler yet.
HTTP_Services('SetResponseStatus', 200, 'This is a valid endpoint but a web API handler has not yet been created.')
@ -61,7 +72,8 @@ Return Response OR ''
API scan.POST
SRP_Stopwatch('Reset')
SRP_Stopwatch('Start', 'SCAN_POST_RESPONSE_TIME')
ScanID = Scan_Services('CreateScansRow')
If Error_Services('NoError') then
StatusCode = 201
@ -70,46 +82,92 @@ API scan.POST
Message = Error_Services('GetMessage')
HTTP_Services('SetResponseStatus', 500, Message)
end
SRP_Stopwatch('Stop', 'SCAN_POST_RESPONSE_TIME')
TotalPostResponseTime = SRP_Stopwatch('GetData', 'SCAN_POST_RESPONSE_TIME')
LogData = ''
LogData<1> = LoggingDTM;//Defined at entry of subroutine
LogData<2> = 'SCAN.POST'
LogData<3> = TotalPostResponseTime
LogData<4> = ScanID
LogData<5> = ''
ResponseStatusCode = ''
If Assigned(StatusCode) then
ResponseStatusCode = StatusCode
end
LogData<6> = ResponseStatusCode
Logging_Services('AppendLog', objLog, LogData, @RM, @FM, False$)
end api
API scan.ID.POST
SRP_Stopwatch('Reset')
SRP_Stopwatch('Start', 'SCAN_ID_POST_RESPONSE_TIME')
ScanID = EndpointSegment
// The resource will have been put into the POST string.
Body = HTTP_Services('GetHTTPPostString')
If Body NE '' then
// The POST string will have been encoded so use percent (URL) decoding.
ScanJSON = HTTP_Services('DecodePercentString', Body)
Scan_Services('ProcessScanData', ScanID, ScanJSON)
Scan_Services('ProcessScanData', ScanID, ScanJSON)
If Error_Services('NoError') then
StatusCode = 200
GoSub CreateHALItem
end else
Message = Error_Services('GetMessage')
HTTP_Services('SetResponseStatus', 400, Message)
end
end
end else
HTTP_Services('SetResponseStatus', 400, 'JSON object is missing from the request.')
end
SRP_Stopwatch('Stop', 'SCAN_ID_POST_RESPONSE_TIME')
TotalPostResponseTime = SRP_Stopwatch('GetData', 'SCAN_ID_POST_RESPONSE_TIME')
LogData = ''
LogData<1> = LoggingDTM;//Defined at entry of subroutine
LogData<2> = 'SCAN.ID.POST'
LogData<3> = TotalPostResponseTime
LogData<4> = ScanID
If Assigned(ScanJson) then
ThisScanDataToLog = ScanJson
end else
ThisScanDataToLog = Body
end
LogData<5> = ThisScanDataToLog
ResponseStatusCode = ''
If Assigned(StatusCode) then
ResponseStatusCode = StatusCode
end
LogData<6> = ResponseStatusCode
Logging_Services('AppendLog', objLog, LogData, @RM, @FM, False$)
end api
API scan.ID.HEAD
API scan.ID.GET
SRP_Stopwatch('Reset')
SRP_Stopwatch('Start', 'SCAN_ID_GET_RESPONSE_TIME')
ScanID = EndpointSegment
StatusCode = 200
GoSub CreateHALItem
SRP_Stopwatch('Stop', 'SCAN_ID_POST_RESPONSE_TIME')
TotalGetResponseTime = SRP_Stopwatch('GetData', 'SCAN_ID_GET_RESPONSE_TIME')
LogData = ''
LogData<1> = LoggingDTM;//Defined at entry of subroutine
LogData<2> = 'SCAN.ID.GET'
LogData<3> = TotalGetResponseTime
LogData<4> = ScanID
LogData<5> = ''
ResponseStatusCode = ''
If Assigned(StatusCode) then
ResponseStatusCode = StatusCode
end
LogData<6> = ResponseStatusCode
Logging_Services('AppendLog', objLog, LogData, @RM, @FM, False$)
end api
API scan.ID.DELETE
SRP_Stopwatch('Reset')
SRP_Stopwatch('Start', 'SCAN_ID_DELETE_RESPONSE_TIME')
ScanID = EndpointSegment
ScanRow = Database_Services('ReadDataRow', 'SCANS', ScanID)
@ -129,7 +187,20 @@ API scan.ID.DELETE
Message = Error_Services('GetMessage')
HTTP_Services('SetResponseStatus', 404, Message)
end
SRP_Stopwatch('Stop', 'SCAN_ID_DELETE_RESPONSE_TIME')
TotalDeleteResponseTime = SRP_Stopwatch('GetData', 'SCAN_ID_DELETE_RESPONSE_TIME')
LogData = ''
LogData<1> = LoggingDTM;//Defined at entry of subroutine
LogData<2> = 'SCAN.ID.DELETE'
LogData<3> = TotalDeleteResponseTime
LogData<4> = ScanID
LogData<5> = ''
ResponseStatusCode = ''
If Assigned(StatusCode) then
ResponseStatusCode = StatusCode
end
LogData<6> = ResponseStatusCode
Logging_Services('AppendLog', objLog, LogData, @RM, @FM, False$)
end api
@ -138,9 +209,11 @@ API scan.ID.PATCH
// This is where scans are ultimately accepted for final processing. We will need to determine which type
// of scan this is (i.e. Location, Pre-Epi + Load, or Unload). This will be determined by the data coming in and the
// current status of the lot. For example a Location scan would only have an RDS, location code, and username.
SRP_Stopwatch('Reset')
SRP_Stopwatch('Start', 'SCAN_ID_PATCH_RESPONSE_TIME')
ScanID = EndpointSegment
SRP_Stopwatch('Start', 'IDPatchResponseTime')
// First confirm that this is a valid Scan ID.
jsonScan = Scan_Services('GetScansRow', ScanID, True$)
If Error_Services('NoError') then
@ -181,12 +254,27 @@ API scan.ID.PATCH
Message = Error_Services('GetMessage')
HTTP_Services('SetResponseStatus', 404, Message)
end
SRP_Stopwatch('Stop', 'SCAN_ID_PATCH_RESPONSE_TIME')
TotalPatchResponseTime = SRP_Stopwatch('GetData', 'SCAN_ID_PATCH_RESPONSE_TIME')
LogData = ''
LogData<1> = LoggingDTM;//Defined at entry of subroutine
LogData<2> = 'SCAN.ID.PATCH'
LogData<3> = TotalPatchResponseTime
LogData<4> = ScanID
LogData<5> = ''
ResponseStatusCode = ''
If Assigned(StatusCode) then
ResponseStatusCode = StatusCode
end
LogData<6> = ResponseStatusCode
Logging_Services('AppendLog', objLog, LogData, @RM, @FM, False$)
end api
API scan.ID.PUT
SRP_Stopwatch('Reset')
SRP_Stopwatch('Start', 'SCAN_ID_PUT_RESPONSE_TIME')
ScanID = EndpointSegment
// The resource will have been put into the POST string.
@ -237,6 +325,20 @@ API scan.ID.PUT
end else
HTTP_Services('SetResponseStatus', 400, 'JSON object is missing from the request.')
end
SRP_Stopwatch('Stop', 'SCAN_ID_PUT_RESPONSE_TIME')
TotalPutResponseTime = SRP_Stopwatch('GetData', 'SCAN_ID_PUT_RESPONSE_TIME')
LogData = ''
LogData<1> = LoggingDTM;//Defined at entry of subroutine
LogData<2> = 'SCAN.ID.PUT'
LogData<3> = TotalPutResponseTime
LogData<4> = ScanID
LogData<5> = ''
ResponseStatusCode = ''
If Assigned(StatusCode) then
ResponseStatusCode = StatusCode
end
LogData<6> = ResponseStatusCode
Logging_Services('AppendLog', objLog, LogData, @RM, @FM, False$)
end api

View File

@ -258,3 +258,4 @@ return
/// Internal GoSubs
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

View File

@ -34,6 +34,15 @@ Declare subroutine Shipment_Services, OBJ_Notes
Equ CRLF$ to \0D0A\
LogPath = Environment_Services('GetApplicationRootPath') : '\LogFiles\COC_Availability'
LogDate = Oconv(Date(), 'D4/')
LogTime = Oconv(Time(), 'MTS')
LogFileName = LogDate[7, 4] : '-' : LogDate[1, 2] : '-' : LogDate[4, 2] : '_NETWORK.log'
Headers = 'Logging DTM' : @FM : 'Message'
ColumnWidths = 30 : @FM : 300
objLogNetwork = Logging_Services('NewLog', LogPath, LogFileName, CRLF$, ' ', Headers, ColumnWidths, False$, False$)
LoggingDTM = LogDate : ' ' : LogTime ; // Logging DTM
GoToService
Return Response or ""
@ -53,7 +62,7 @@ Options MonaResources = 'FILE_GENERATION', 'FILE_TRANSMISSION', 'FILE_AVAILABILI
//
//----------------------------------------------------------------------------------------------------------------------
Service CycleRetentionDates()
hSysLists = Database_Services('GetTableHandle', 'SYSLISTS')
Lock hSysLists, ServiceKeyID then
CycleRec = Xlate('APP_INFO', 'COC_AVAILABILITY', '', 'X')
@ -165,7 +174,11 @@ Service CheckFileAvailability(StartDate, EndDate)
end
// Code to run COC SELECT and change MONA Status
If NetworkError EQ False$ then
//Log that there were no network errors detected.
NetworkLogMessage = 'No network errors detected.'
GoSub LogNetworkStatus
Shipment_Services('ClearMONACritical', 'FTP_SERVER_REACHABLE')
EarliestDate = Shipment_Services('GetEarliestDate')
EarliestDate = OConv(EarliestDate, 'D4-')
SelectQuery = 'SELECT COC BY ENTRY_DATE WITH ENTRY_DATE GE ' : Quote(EarliestDate) : ' AND WITH FTP_SHOULD_EXIST EQ 1 AND WITH FTP_EXISTS EQ 0'
@ -185,6 +198,12 @@ Service CheckFileAvailability(StartDate, EndDate)
Shipment_Services('ClearMONACritical', 'FILE_AVAILABILITY')
end
end else
//Log that there were network errors detected.
If Assigned(ErrTest) then
NetworkLogMessage = ErrTest
swap CRLF$ with ' , ' in NetworkLogMessage
GoSub LogNetworkStatus
end
Shipment_Services('SetMONAWarning', 'FTP_SERVER_REACHABLE')
Error_Services('Add', Service : 'service failed. ''An issue connecting to the FTP server has occured.')
end
@ -339,6 +358,33 @@ InitCocLog:
return
InitNetworkLog:
LogPath = Environment_Services('GetApplicationRootPath') : '\LogFiles\COC_Availability'
LogDate = Oconv(Date(), 'D4/')
LogTime = Oconv(Time(), 'MTS')
LogFileName = LogDate[7, 4] : '-' : LogDate[1, 2] : '-' : LogDate[4, 2] : '_NETWORK.log'
Headers = 'Logging DTM' : @FM : 'Message'
ColumnWidths = 30 : @FM : 300
objLogNetwork = Logging_Services('NewLog', LogPath, LogFileName, CRLF$, ' ', Headers, ColumnWidths, False$, False$)
LoggingDTM = LogDate : ' ' : LogTime ; // Logging DTM
return
LogNetworkStatus:
If Assigned(NetworkLogMessage) then
ErrorLogMessage = NetworkLogMessage
end else
ErrorLogMessage = 'Unspecified network error'
end
GoSub InitNetworkLog
LogData = ''
LogData<1> = LoggingDTM
LogData<2> = ErrorLogMessage
Logging_Services('AppendLog', objLogNetwork, LogData, @RM, @FM)
return
LogMissingFile:
@ -400,3 +446,4 @@ CompanyExceptionCheck:
return

View File

@ -388,7 +388,7 @@ Service CreateTestRunRecord(RunTypeID, EqpType, EqpID, PSNo, RDSNo, UserID, TWLo
Case ThisLotCurrOperation EQ 'TW_IN_USE'
If Not(LotMovedIn) then
Lot_Services('CreateLotEvent', TWLotId, 'TW', Datetime(), 'MOVE_IN', 'Move into TW_IN_USE', '', 0, 0, '', UserID)
Lot_Services('MoveInLot', TWLotId, UserId)
If Error_Services('HasError') then
ErrorMessage = Error_Services('GetMessage')
end
@ -399,9 +399,9 @@ Service CreateTestRunRecord(RunTypeID, EqpType, EqpID, PSNo, RDSNo, UserID, TWLo
Case ThisLotCurrOperation EQ 'TW_READY_TO_USE'
If Not(LotMovedIn) then
Lot_Services('CreateLotEvent', TWLotId, 'TW', Datetime(), 'MOVE_IN', 'Move into TW_READY_TO_USE', '', 0, 0, '', UserID)
Lot_Services('MoveInLot', TWLotId, UserId)
end else
Lot_Services('CreateLotEvent', TWLotId, 'TW', Datetime(), 'MOVE_OUT', 'Move out of TW_READY_TO_USE', '', 0, 0, '', UserID)
Lot_Services('MoveOutLot', TWLotId, UserId)
end
If Error_Services('HasError') then
ErrorMessage = Error_Services('GetMessage')
@ -427,7 +427,7 @@ Service CreateTestRunRecord(RunTypeID, EqpType, EqpID, PSNo, RDSNo, UserID, TWLo
until ErrorMessage NE ''
Next i
If ErrorMessage EQ '' then
Lot_Services('CreateLotEvent', TWLotId, 'TW', Datetime(), 'REDUCE_WAFER_QTY', ThisUsageQty : ' wafers consumed from lot.', EqpID, ThisUsageQty, 0, '', UserID)
Lot_Services('ReduceLotWaferCount', TWLotId, ThisUsageQty, UserID)
end
end else
ErrorMessage = 'Error in Create Test Run Record routine, ' : TWLotId : ' does not have enough wafers.'
@ -542,7 +542,7 @@ end service
Service UseTWFromLot(LotId, UsageQty, Username)
ErrorMessage = ''
If RowExists('LOT', LotId) then
Lot_Services('CreateLotEvent', LotId, 'TW', Datetime(), 'REDUCE_WAFER_QTY', 'Consumed test wafer.', '', UsageQty, 0, '', Username)
Lot_Services('ReduceLotWaferCount', LotId, UsageQty, Username)
end else
ErrorMessage = 'Error logging wafer consumption from Lot # ' : LotId : '. Lot does not exist in LOT table.'
end
@ -798,3 +798,4 @@ end service