486 lines
23 KiB
Plaintext
486 lines
23 KiB
Plaintext
Compile function NDW_GAN_RETAIN_MANAGER_TASK_EVENTS(CtrlEntId, Event, @PARAMS)
|
|
/***********************************************************************************************************************
|
|
|
|
Name : NDW_GAN_RETAIN_MANAGER_TASK_EVENTS
|
|
|
|
Description : Commuter module for the NDW_GAN_RETAIN_MANAGER_TASK form.
|
|
|
|
Notes : Application errors should be logged using the Error Services module. There are a few methodological
|
|
assumptions built into way errors are managed which are important to understand in order to properly
|
|
work with Error Services:
|
|
|
|
- The term 'top' refers to the originating procedure of a call stack and the term 'bottom' refers to
|
|
the last routine (or the current routine) within a call stack. Within the OpenInsight Debugger
|
|
this will appear backwards since the originating procedure always appears at the bottom of the
|
|
list and the current routine appears at the top of the list. We are using this orientation because
|
|
it is common to refer to the process of calling other procedures as 'drilling down'.
|
|
|
|
- The reason for defining the orientation of the call stack is because Error_Services allows for
|
|
multiple error conditions to be appended to an original error. In most cases this will happen when
|
|
a procedure at the bottom of the stack generates an error condition and then returns to its
|
|
calling procedure. This higher level procedure can optionally add more information relevant to
|
|
itself. This continues as the call stack 'bubbles' its way back to the top to where the
|
|
originating procedure is waiting.
|
|
|
|
- Native OpenInsight commands that handle errors (e.g., Set_Status, Set_FSError, Set_EventStatus)
|
|
preserve their error state until explicitly cleared. This can hinder the normal execution of code
|
|
since subsequent procedures (usually SSPs) will fail if a pre-existing error condition exists.
|
|
Our philosophy is that error conditions should automatically be cleared before a new procedure
|
|
is executed to avoid this problem. However, the nature of Basic+ does not make this easy to
|
|
automate for any given stored procedure. Therefore, if a stored procedure wants to conform to our
|
|
philosophy then it should include a call into the 'Clear' service request at the top of the
|
|
program. Alternatively this can be done through a common insert (see SERVICE_SETUP for example.)
|
|
|
|
- Service modules will use the SERVICE_SETUP insert and therefore automatically clear out any
|
|
error conditions that were set before.
|
|
|
|
Parameters :
|
|
Service [in] -- Name of the service being requested
|
|
Param1-10 [in/out] -- Additional request parameter holders
|
|
Response [out] -- Response to be sent back to the Controller (MCP) or requesting procedure
|
|
|
|
Metadata :
|
|
|
|
History : (Date, Initials, Notes)
|
|
05/14/20 cn Original programmer.
|
|
|
|
***********************************************************************************************************************/
|
|
#pragma precomp SRP_PreCompiler
|
|
#window NDW_GAN_RETAIN_MANAGER_TASK
|
|
|
|
$Insert LOGICAL
|
|
$Insert APPCOLORS
|
|
$Insert RETAINED_WAFERS_EQUATES
|
|
$Insert MSG_EQUATES
|
|
|
|
// Control Name equates
|
|
Equ RetainedTable$ To @Window : '.OLE_EDT_RETAINED'
|
|
Equ DestroyedTable$ To @Window : '.OLE_EDT_DESTROYED'
|
|
Equ StatusBar$ To @Window : '.OLE_STATUSBAR'
|
|
|
|
// Reduce modes (for Select statement)
|
|
Equ NEW_EXIST$ To 0
|
|
Equ NEXT_CUR$ To 1
|
|
Equ ADD_EXIST$ To 2
|
|
|
|
// OLE Edit Table Columns
|
|
Equ RUN_ID$ To 1
|
|
Equ POCKET$ To 2
|
|
Equ SCRIBE$ To 3
|
|
Equ WO_NO$ To 4
|
|
Equ RETAIN_BOX$ To 5
|
|
Equ RETAIN_SLOT$ To 6
|
|
Equ Selection$ To 7
|
|
Equ WAFER_ID$ To 8
|
|
|
|
Declare Function Form_Services, Get_Property, Send_Message, SRP_Array, SRP_Sort_Array
|
|
Declare Function Gan_Services, Retain_Manager_Services, MSG, MemberOf
|
|
Declare Subroutine SRP_Show_Window, Set_Property, Send_Message, SRP_Set_MinMaxInfo
|
|
Declare Subroutine SRP_Edittable_Manager, Form_Services, Gan_Services, Retain_Manager_Services
|
|
|
|
SubclassInfo = Form_Services('FindSubclassControl')
|
|
Subclass = SubclassInfo<1>
|
|
|
|
If Assigned(Param8) else Param8 = ''
|
|
|
|
If Event EQ 'OLE' then
|
|
Transfer Event to OIEvent
|
|
Transfer Param1 to Event
|
|
Transfer Param2 to Param1
|
|
Transfer Param3 to Param2
|
|
Transfer Param4 to Param3
|
|
Transfer Param5 to Param4
|
|
Transfer Param6 to Param5
|
|
Transfer Param7 to Param6
|
|
Transfer Param8 to Param7
|
|
end
|
|
|
|
Type = Get_Property(CtrlEntId, 'TYPE')
|
|
If Type EQ 'RADIOBUTTON' then
|
|
Convert ' ' to '_' in CtrlEntID
|
|
end
|
|
|
|
GoToEvent Event for CtrlEntId else
|
|
// Event not implemented
|
|
end
|
|
|
|
Return EventFlow or 1
|
|
|
|
//-----------------------------------------------------------------------------
|
|
// EVENT HANDLERS
|
|
//-----------------------------------------------------------------------------
|
|
|
|
Event WINDOW.CREATE(CreateParam)
|
|
GoSub SetupOLEControls
|
|
SRP_Set_MinMaxInfo(@Window, 'DEF', 'DEF', 'DEF')
|
|
SRP_Show_Window(@Window, '', 'C', 'C', 1, '', False$, False$, '', 1)
|
|
End Event
|
|
|
|
|
|
Event RAG_WAFER_TYPE.150_MM_6_IN.CLICK()
|
|
Event RAG_WAFER_TYPE.200_MM_8_IN.CLICK()
|
|
GoSub UpdateServiceLastRunTime
|
|
Form_Services('DisplayWaitScreen', '', 'Refreshing Data')
|
|
GoSub LoadRetainedWaferData
|
|
GoSub LoadDestroyedWaferData
|
|
Form_Services('CloseWaitScreen')
|
|
end event
|
|
|
|
|
|
Event PUB_RETAIN.CLICK()
|
|
GoSub SignRetainedWafers
|
|
GoSub UpdateServiceLastRunTime
|
|
Set_Property(@Window, '@RETAINEDCHECKCOUNTER', '')
|
|
Set_Property(@Window : '.PUB_RETAIN', 'ENABLED', False$)
|
|
end event
|
|
|
|
|
|
Event PUB_DESTROY.CLICK()
|
|
GoSub SignDestroyedWafers
|
|
GoSub UpdateServiceLastRunTime
|
|
Set_Property(@Window, '@DESTROYEDCHECKCOUNTER', '')
|
|
Set_Property(@Window : '.PUB_DESTROY', 'ENABLED', False$)
|
|
end event
|
|
|
|
|
|
Event OLE_EDT_RETAINED.OnCheckChanged(Cell, OldValue, NewValue)
|
|
RetainedCheckCounter = Get_Property(@Window, '@RETAINEDCHECKCOUNTER')
|
|
If OldValue EQ True$ then
|
|
RetainedCheckCounter -= 1
|
|
end else
|
|
RetainedCheckCounter += 1
|
|
end
|
|
|
|
Set_Property(@Window, '@RETAINEDCHECKCOUNTER', RetainedCheckCounter)
|
|
|
|
If RetainedCheckCounter GT 0 then
|
|
Set_Property(@Window : '.PUB_RETAIN', 'ENABLED', True$)
|
|
end else
|
|
Set_Property(@Window : '.PUB_RETAIN', 'ENABLED', False$)
|
|
end
|
|
end event
|
|
|
|
|
|
Event OLE_EDT_DESTROYED.OnCheckChanged(Cell, OldValue, NewValue)
|
|
DestroyedCheckCounter = Get_Property(@Window, '@DESTROYEDCHECKCOUNTER')
|
|
If OldValue EQ True$ then
|
|
DestroyedCheckCounter -= 1
|
|
end else
|
|
DestroyedCheckCounter += 1
|
|
end
|
|
|
|
Set_Property(@Window, '@DESTROYEDCHECKCOUNTER', DestroyedCheckCounter)
|
|
|
|
If DestroyedCheckCounter GT 0 then
|
|
Set_Property(@Window : '.PUB_DESTROY', 'ENABLED', True$)
|
|
end else
|
|
Set_Property(@Window : '.PUB_DESTROY', 'ENABLED', False$)
|
|
end
|
|
end event
|
|
|
|
|
|
Event EDL_SCRAP_WAREHOUSE_RETENTION_PERIOD.LOSTFOCUS(Flag, FocusID)
|
|
RetainedPeriod = Retain_Manager_Services('GetRetentionPeriod')
|
|
NewRetainedPeriod = Get_Property(@Window : '.EDL_SCRAP_WAREHOUSE_RETENTION_PERIOD', 'TEXT')
|
|
If NewRetainedPeriod NE RetainedPeriod then
|
|
Message = ''
|
|
Message<MTEXT$> = 'Set ' : NewRetainedPeriod : ' days as new retain period?'
|
|
Message<MTYPE$> = "BNY"
|
|
Status = Msg(@Window, Message)
|
|
If Status EQ True$ then
|
|
Retain_Manager_Services('SetRetentionPeriod', NewRetainedPeriod)
|
|
end
|
|
end
|
|
end event
|
|
|
|
|
|
Event OLE_EDT_DESTROYED.OnClick(Cell, Point, Button, Shift, Ctrl)
|
|
If Button EQ 'Right' then
|
|
ColPos = Cell[1, ';']
|
|
RowPos = Cell[Col2() + 1, ';']
|
|
RetainBox = Get_Property(DestroyedTable$, 'OLE.CellText[' : RETAIN_BOX$ : ';' : RowPos : ']')
|
|
Menu = 'Select All Wafers in ' : RetainBox : @VM : 'Select All Wafers in ' : RetainBox : @VM : 1
|
|
Send_Message(DestroyedTable$, 'OLE.ShowContextMenu', Point, Menu, RetainBox)
|
|
end
|
|
end event
|
|
|
|
|
|
Event OLE_EDT_DESTROYED.OnContextMenuClick(Item, UserData)
|
|
RetainedBox = UserData
|
|
SelectionCounter = ''
|
|
DestroyedWaferArray = Get_Property(DestroyedTable$, 'OLE.ARRAY')
|
|
DestroyedWaferArray = SRP_Array('Rotate', DestroyedWaferArray, @FM, @VM)
|
|
For Each DestroyedWafer in DestroyedWaferArray using @FM setting WaferPos then
|
|
If RetainedBox EQ DestroyedWafer<1, RETAIN_BOX$> then
|
|
Set_Property(DestroyedTable$, 'OLE.CellCheck[' : Selection$ : ';' : WaferPos : ']', True$)
|
|
SelectionCounter += 1
|
|
end
|
|
Next DestroyedWafer
|
|
|
|
DestroyedCheckCounter = Get_Property(@Window, '@DESTROYEDCHECKCOUNTER')
|
|
DestroyedCheckCounter = DestroyedCheckCounter + SelectionCounter
|
|
Set_Property(@Window, '@DESTROYEDCHECKCOUNTER', DestroyedCheckCounter)
|
|
Set_Property(@Window : '.PUB_DESTROY', 'ENABLED', True$)
|
|
end event
|
|
|
|
|
|
Event WINDOW.CLOSE(CancelFlag)
|
|
end event
|
|
|
|
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
// Internal GoSubs
|
|
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
SetupOLEControls:
|
|
ArrayDimension = 8 : @FM : 50
|
|
TitleList = 'Run ID' : @VM : 'Pocket' : @VM : 'Scribe' : @VM : 'WO' : @VM : 'Retain Box' : @VM : 'Slot' : @VM : 'Select' : @VM : 'Wafer ID' : @VM
|
|
ColumnWidths = 'A' : @FM : '45' : @FM : '70' : @FM : '65' : @FM : '75' : @FM : '40' : @FM : '40' : @FM : '45' : @FM
|
|
ColumnAlignments = 'L' : @FM : 'C' : @FM : 'C' : @FM : 'C' : @FM : 'C' : @FM : 'C' : @FM : 'C' : @FM : 'L' : @FM
|
|
|
|
/////////////////////////////////
|
|
// Setup RetainedTable$ Table
|
|
/////////////////////////////////
|
|
|
|
VirtualPos = ''
|
|
RowsAsColumns = ''
|
|
CellsAsFields = ''
|
|
ClearFill = ''
|
|
OIEditTable = ''
|
|
SRP_EditTable_Manager('Setup1', RetainedTable$, ArrayDimension, TitleList, ColumnWidths, ColumnAlignments, VirtualPos, RowsAsColumns, CellsAsFields, ClearFill, OIEditTable)
|
|
Set_Property(RetainedTable$, 'OLE.SelectionStyle', 'Black' : @VM : OI_HOT_BLUE$ : ' L=70' : @FM : 'Black' : @VM : OI_HOT_BLUE$) ; // Automatically highlight the current row with one color and highlight the current row with another color.
|
|
Set_Property(RetainedTable$, 'OLE.HeaderFont[All; All]', 'Segoe UI' : @SVM : 8)
|
|
Set_Property(RetainedTable$, 'OLE.CellFont[All; All]', 'Segoe UI' : @SVM : 8)
|
|
Set_Property(RetainedTable$, 'OLE.HeaderColumn[1]', '' : @FM : False$ : @FM : False$ : @FM)
|
|
Set_Property(RetainedTable$, 'OLE.CellProtection[ALL; All]', 'SEL')
|
|
Set_Property(RetainedTable$, 'OLE.NewRowCount', 0)
|
|
Set_Property(RetainedTable$, 'OLE.HeaderRow[ALL]', '' : @FM : '' : @FM : False$ : @FM)
|
|
Set_Property(RetainedTable$, 'OLE.DataColumn[ALL]', '' : @FM : '' : @FM : False$ : @FM)
|
|
Set_Property(RetainedTable$, 'OLE.DataRow[ALL]', '' : @FM : '' : @FM : False$ : @FM)
|
|
Set_Property(RetainedTable$, 'OLE.HeaderColors[All; All]', 'Auto' : @FM : 'None' : @FM : 'None' : @FM : OI_HOT_BLUE$ : @FM : False$)
|
|
Set_Property(RetainedTable$, 'OLE.ResetSelPos', False$)
|
|
Set_Property(RetainedTable$, 'OLE.AllowDeletions', False$)
|
|
Set_Property(RetainedTable$, 'OLE.AllowInserts', False$)
|
|
Set_Property(RetainedTable$, 'OLE.CellType[' : Selection$ : ';ALL]', 'Check Box' : @FM : 0 : @VM : 1)
|
|
// Hide the Wafer ID for reference only
|
|
Set_Property(RetainedTable$, 'OLE.DataColumn[' : WAFER_ID$ : ']', '' : @FM : False$)
|
|
|
|
// Qualify OLE events that we want to intercept
|
|
Qualifier = ''
|
|
Qualifier<1> = 1
|
|
Qualifier<4> = 0 ; * process synchronously (i.e. immediately)
|
|
Send_Message(RetainedTable$, 'QUALIFY_EVENT', 'OLE.AfterUpdate', Qualifier)
|
|
Send_Message(RetainedTable$, 'QUALIFY_EVENT', 'OLE.OnClick', Qualifier)
|
|
Send_Message(RetainedTable$, 'QUALIFY_EVENT', 'OLE.OnButtonClick', Qualifier)
|
|
Send_Message(RetainedTable$, 'QUALIFY_EVENT', 'OLE.OnContextMenuClick', Qualifier)
|
|
Send_Message(RetainedTable$, 'QUALIFY_EVENT', 'OLE.PosChanged', Qualifier)
|
|
Send_Message(RetainedTable$, 'QUALIFY_EVENT', 'OLE.OnComboClicked', Qualifier)
|
|
Send_Message(RetainedTable$, 'QUALIFY_EVENT', 'OLE.OnHeaderClick', Qualifier)
|
|
Send_Message(RetainedTable$, 'QUALIFY_EVENT', 'OLE.OnCheckChanged', Qualifier)
|
|
Send_Message(RetainedTable$, 'QUALIFY_EVENT', 'OLE.OnDblClick', Qualifier)
|
|
|
|
/////////////////////////////////
|
|
// Setup DestroyedTable$ Table
|
|
/////////////////////////////////
|
|
|
|
ArrayDimension = 8 : @FM : 50
|
|
TitleList = 'Run ID' : @VM : 'Pocket' : @VM : 'Scribe' : @VM : 'WO' : @VM : 'Retain Box' : @VM : 'Slot' : @VM : 'Select' : @VM : 'Wafer ID' : @VM
|
|
ColumnWidths = 'A' : @FM : '45' : @FM : '70' : @FM : '65' : @FM : '75' : @FM : '40' : @FM : '40' : @FM : '45' : @FM
|
|
ColumnAlignments = 'L' : @FM : 'C' : @FM : 'C' : @FM : 'C' : @FM : 'C' : @FM : 'C' : @FM : 'C' : @FM : 'L' : @FM
|
|
|
|
VirtualPos = ''
|
|
RowsAsColumns = ''
|
|
CellsAsFields = ''
|
|
ClearFill = ''
|
|
OIEditTable = ''
|
|
SRP_EditTable_Manager('Setup1', DestroyedTable$, ArrayDimension, TitleList, ColumnWidths, ColumnAlignments, VirtualPos, RowsAsColumns, CellsAsFields, ClearFill, OIEditTable)
|
|
Set_Property(DestroyedTable$, 'OLE.SelectionStyle', 'Black' : @VM : OI_HOT_BLUE$ : ' L=70' : @FM : 'Black' : @VM : OI_HOT_BLUE$) ; // Automatically highlight the current row with one color and highlight the current row with another color.
|
|
Set_Property(DestroyedTable$, 'OLE.HeaderFont[All; All]', 'Segoe UI' : @SVM : 8)
|
|
Set_Property(DestroyedTable$, 'OLE.CellFont[All; All]', 'Segoe UI' : @SVM : 8)
|
|
Set_Property(DestroyedTable$, 'OLE.HeaderColumn[1]', '' : @FM : False$ : @FM : False$ : @FM)
|
|
Set_Property(DestroyedTable$, 'OLE.CellProtection[ALL; All]', 'SEL')
|
|
Set_Property(DestroyedTable$, 'OLE.NewRowCount', 0)
|
|
Set_Property(DestroyedTable$, 'OLE.HeaderRow[ALL]', '' : @FM : '' : @FM : False$ : @FM)
|
|
Set_Property(DestroyedTable$, 'OLE.DataColumn[ALL]', '' : @FM : '' : @FM : False$ : @FM)
|
|
Set_Property(DestroyedTable$, 'OLE.DataRow[ALL]', '' : @FM : '' : @FM : False$ : @FM)
|
|
Set_Property(DestroyedTable$, 'OLE.HeaderColors[All; All]', 'Auto' : @FM : 'None' : @FM : 'None' : @FM : OI_HOT_BLUE$ : @FM : False$)
|
|
Set_Property(DestroyedTable$, 'OLE.ResetSelPos', False$)
|
|
Set_Property(DestroyedTable$, 'OLE.AllowDeletions', False$)
|
|
Set_Property(DestroyedTable$, 'OLE.AllowInserts', False$)
|
|
Set_Property(DestroyedTable$, 'OLE.CellType[' : Selection$ : ';ALL]', 'Check Box' : @FM : 0 : @VM : 1)
|
|
// Hide the Wafer ID for reference only
|
|
Set_Property(DestroyedTable$, 'OLE.DataColumn[' : WAFER_ID$ : ']', '' : @FM : False$)
|
|
|
|
// Qualify OLE events that we want to intercept
|
|
Qualifier = ''
|
|
Qualifier<1> = 1
|
|
Qualifier<4> = 0 ; * process synchronously (i.e. immediately)
|
|
Send_Message(DestroyedTable$, 'QUALIFY_EVENT', 'OLE.AfterUpdate', Qualifier)
|
|
Send_Message(DestroyedTable$, 'QUALIFY_EVENT', 'OLE.OnClick', Qualifier)
|
|
Send_Message(DestroyedTable$, 'QUALIFY_EVENT', 'OLE.OnButtonClick', Qualifier)
|
|
Send_Message(DestroyedTable$, 'QUALIFY_EVENT', 'OLE.OnContextMenuClick', Qualifier)
|
|
Send_Message(DestroyedTable$, 'QUALIFY_EVENT', 'OLE.PosChanged', Qualifier)
|
|
Send_Message(DestroyedTable$, 'QUALIFY_EVENT', 'OLE.OnComboClicked', Qualifier)
|
|
Send_Message(DestroyedTable$, 'QUALIFY_EVENT', 'OLE.OnHeaderClick', Qualifier)
|
|
Send_Message(DestroyedTable$, 'QUALIFY_EVENT', 'OLE.OnCheckChanged', Qualifier)
|
|
Send_Message(DestroyedTable$, 'QUALIFY_EVENT', 'OLE.OnDblClick', Qualifier)
|
|
|
|
RetentionPeriod = Retain_Manager_Services('GetRetentionPeriod')
|
|
Set_Property(@Window : '.EDL_SCRAP_WAREHOUSE_RETENTION_PERIOD', 'TEXT', RetentionPeriod)
|
|
|
|
// APP_INFO RETAINED_WAFER Fields
|
|
Equ RETAIN_WAFER_RUN_ID$ To 1
|
|
Equ RETAIN_WAFER_RECIPE$ To 2
|
|
Equ RETAIN_WAFER_POCKET$ To 3
|
|
Equ RETAIN_WAFER_SCRIBE$ To 4
|
|
Equ RETAIN_WAFER_GRADE$ To 5
|
|
Equ RETAIN_WAFER_PART$ To 6
|
|
Equ RETAIN_WAFER_WO_NO$ To 7
|
|
Equ RETAIN_WAFER_RETAIN_BOX$ To 8
|
|
Equ RETAIN_WAFER_RETAIN_SLOT$ To 9
|
|
Equ RETAIN_WAFER_RETAIN_LOC$ To 10
|
|
Equ RETAIN_WAFER_STATUS$ To 11
|
|
Equ RETAIN_WAFER_COMMENT$ To 12
|
|
Equ RETAIN_WAFER_OPERATOR$ To 13
|
|
Equ RETAIN_WAFER_RETAIN_DATE$ To 14
|
|
Equ RETAIN_WAFER_DESTROY_SIG$ To 15
|
|
Equ RETAIN_WAFER_DESTROY_DATE$ To 16
|
|
Equ RETAIN_WAFER_WAFER_ID$ To 17
|
|
|
|
GoSub LoadRetainedWaferData
|
|
GoSub LoadDestroyedWaferData
|
|
|
|
If MemberOf(@USER4, 'GAN_PARAMETERS') then
|
|
Set_Property(@Window: '.EDL_SCRAP_WAREHOUSE_RETENTION_PERIOD', 'ENABLED', True$)
|
|
end
|
|
|
|
Set_Property(StatusBar$, 'OLE.PaneCount', 2)
|
|
Set_Property(StatusBar$, 'OLE.Resizable', False$)
|
|
Set_Property(StatusBar$, 'OLE.PaneType[1]', 'NOR')
|
|
Set_Property(StatusBar$, 'OLE.PaneCaption[1]', 'Retain Wafer Service last ran at:')
|
|
Set_Property(StatusBar$, 'OLE.PaneAlignment[2]', 'R')
|
|
GoSub UpdateServiceLastRunTime
|
|
|
|
return
|
|
|
|
|
|
SignRetainedWafers:
|
|
Set_Property(RetainedTable$, 'OLE.Redraw', False$)
|
|
WaferList = Get_Property(RetainedTable$, 'OLE.ARRAY')
|
|
WaferList = SRP_Array('Rotate', WaferList, @FM, @VM)
|
|
RemoveWaferList = ''
|
|
|
|
For Each Wafer in WaferList using @FM setting WaferPos then
|
|
SelectedWafer = Wafer<1, Selection$>
|
|
If SelectedWafer EQ True$ then
|
|
RemoveWaferList := WaferPos : @FM
|
|
InboundWfrID = Wafer<1, WAFER_ID$>
|
|
Gan_Services('SignRetainedWafer', InboundWfrID)
|
|
end
|
|
Next Wafer
|
|
|
|
RemoveWaferList[-1, 1] = ''
|
|
RemoveWaferList = SRP_Sort_Array(RemoveWaferList, 'DN1', 1)
|
|
|
|
For Each RemoveWaferPos in RemoveWaferList using @FM setting dummypos then
|
|
Send_Message(RetainedTable$, 'OLE.DeleteRecords', RemoveWaferPos, 1)
|
|
Next RemoveWaferPos
|
|
Set_Property(RetainedTable$, 'OLE.Redraw', True$)
|
|
return
|
|
|
|
|
|
SignDestroyedWafers:
|
|
Set_Property(DestroyedTable$, 'OLE.Redraw', False$)
|
|
WaferList = Get_Property(DestroyedTable$, 'OLE.ARRAY')
|
|
WaferList = SRP_Array('Rotate', WaferList, @FM, @VM)
|
|
DestroyWaferList = ''
|
|
|
|
For Each Wafer in WaferList using @FM setting WaferPos then
|
|
SelectedWafer = Wafer<1, Selection$>
|
|
If SelectedWafer EQ True$ then
|
|
DestroyWaferList := WaferPos : @FM
|
|
InboundWfrID = Wafer<1, WAFER_ID$>
|
|
Gan_Services('SignDestroyedWafer', InboundWfrID)
|
|
end
|
|
Next Wafer
|
|
|
|
DestroyWaferList[-1, 1] = ''
|
|
DestroyWaferList = SRP_Sort_Array(DestroyWaferList, 'DN1', 1)
|
|
|
|
For Each DestroyWaferPos in DestroyWaferList using @FM setting dummypos then
|
|
Send_Message(DestroyedTable$, 'OLE.DeleteRecords', DestroyWaferPos, 1)
|
|
Next DestroyWaferPos
|
|
Set_Property(DestroyedTable$, 'OLE.Redraw', True$)
|
|
return
|
|
|
|
|
|
LoadRetainedWaferData:
|
|
Set_Property(RetainedTable$, 'OLE.Redraw', False$)
|
|
WaferSize = Get_Property(@Window : '.RAG_WAFER_TYPE', 'VALUE')
|
|
RetainedWaferList = ''
|
|
FullWaferList = Retain_Manager_Services('GetWaferData', WaferSize)
|
|
|
|
For Each Wafer in FullWaferList using @FM setting WaferPos then
|
|
Convert @VM to @FM in Wafer
|
|
Location = Wafer<RETAIN_WAFER_RETAIN_LOC$>
|
|
Status = Wafer<RETAIN_WAFER_STATUS$>
|
|
RetainSig = Wafer<RETAIN_WAFER_OPERATOR$>
|
|
|
|
If Location _NEC 'Wafer Destroyed' AND Status _NEC 'Do Not Destroy' then
|
|
RetainBox = Wafer<RETAIN_WAFER_RETAIN_BOX$>
|
|
RetainedSlot = Wafer<RETAIN_WAFER_RETAIN_SLOT$>
|
|
RetainedDate = Wafer<RETAIN_WAFER_RETAIN_DATE$>
|
|
If RetainBox NE '' AND RetainedSlot NE '' AND RetainedDate EQ '' then
|
|
RetainedWaferList := Wafer<RETAIN_WAFER_RUN_ID$> : @VM : Wafer<RETAIN_WAFER_POCKET$> : @VM : Wafer<RETAIN_WAFER_SCRIBE$> : @VM
|
|
RetainedWaferList := Wafer<RETAIN_WAFER_WO_NO$> : @VM : Wafer<RETAIN_WAFER_RETAIN_BOX$> : @VM : Wafer<RETAIN_WAFER_RETAIN_SLOT$> : @VM
|
|
RetainedWaferList := False$ : @VM : Wafer<RETAIN_WAFER_WAFER_ID$> : @FM
|
|
end
|
|
end
|
|
Next Wafer
|
|
|
|
RetainedWaferList[-1, 1] = ''
|
|
RetainedWaferList = SRP_Array('Rotate', RetainedWaferList, @FM, @VM)
|
|
RetainedWaferList = SRP_Sort_Array(RetainedWaferList, 'AL1' : @FM : 'AN6', 0)
|
|
|
|
Set_Property(RetainedTable$, 'OLE.ARRAY', RetainedWaferList)
|
|
Set_Property(RetainedTable$, 'OLE.Redraw', True$)
|
|
return
|
|
|
|
|
|
LoadDestroyedWaferData:
|
|
Set_Property(DestroyedTable$, 'OLE.Redraw', False$)
|
|
RetainedPeriod = Get_Property(@Window : '.EDL_SCRAP_WAREHOUSE_RETENTION_PERIOD', 'TEXT')
|
|
WaferSize = Get_Property(@Window : '.RAG_WAFER_TYPE', 'VALUE')
|
|
CurrentDate = Date()
|
|
DestroyedWaferList = ''
|
|
FullWaferList = Retain_Manager_Services('GetWaferData', WaferSize)
|
|
|
|
For Each Wafer in FullWaferList using @FM setting WaferPos then
|
|
CheckDate = Wafer<1, RETAIN_WAFER_RETAIN_DATE$> + RetainedPeriod
|
|
Location = Wafer<1, RETAIN_WAFER_RETAIN_LOC$>
|
|
|
|
If Location _NEC 'Wafer Destroyed' AND Location _NEC 'Do Not Destroy' then
|
|
If CheckDate LE CurrentDate then
|
|
DestroyedWaferList := Wafer<1, RETAIN_WAFER_RUN_ID$> : @VM : Wafer<1, RETAIN_WAFER_POCKET$> : @VM : Wafer<1, RETAIN_WAFER_SCRIBE$> : @VM
|
|
DestroyedWaferList := Wafer<1, RETAIN_WAFER_WO_NO$> : @VM : Wafer<1, RETAIN_WAFER_RETAIN_BOX$> : @VM : Wafer<1, RETAIN_WAFER_RETAIN_SLOT$> : @VM
|
|
DestroyedWaferList := False$ : @VM : Wafer<1, RETAIN_WAFER_WAFER_ID$> : @FM
|
|
end
|
|
end
|
|
|
|
Next Wafer
|
|
|
|
DestroyedWaferList[-1, 1] = ''
|
|
DestroyedWaferList = SRP_Array('Rotate', DestroyedWaferList, @FM, @VM)
|
|
DestroyedWaferList = SRP_Sort_Array(DestroyedWaferList, 'AN5' : @FM : 'DN6', 0)
|
|
|
|
Set_Property(DestroyedTable$, 'OLE.ARRAY', DestroyedWaferList)
|
|
Set_Property(DestroyedTable$, 'OLE.Redraw', True$)
|
|
return
|
|
|
|
|
|
UpdateServiceLastRunTime:
|
|
LastRunDTM = Retain_Manager_Services('GetRetainServiceLastRunTime')
|
|
Set_Property(StatusBar$, 'OLE.PaneCaption[2]', LastRunDTM)
|
|
return
|
|
|