apply abort metrology when specific sub modes are selected
This commit is contained in:
parent
bff81f70c4
commit
3c2a50af24
@ -642,3 +642,4 @@ UnlockRec:
|
||||
return
|
||||
|
||||
|
||||
|
||||
|
@ -1055,7 +1055,6 @@ end service
|
||||
Service ConvertRecordToJSON(KeyID, Record, itemURL)
|
||||
|
||||
jsonRecord = ''
|
||||
|
||||
If KeyID NE '' then
|
||||
|
||||
If Record EQ '' then Record = Database_Services('ReadDataRow', 'RDS', KeyID)
|
||||
@ -1231,7 +1230,9 @@ Service ConvertRecordToJSON(KeyID, Record, itemURL)
|
||||
|
||||
end service
|
||||
|
||||
|
||||
Service GetRDSMoves(ReportDTM)
|
||||
|
||||
DatesToSearch = ''
|
||||
ReportDTM = FIELD(ReportDTM, ' ', 1)
|
||||
query = 'SELECT RDS WITH DATE_OUT EQ ': QUOTE(ReportDTM)
|
||||
@ -1261,7 +1262,9 @@ Service GetRDSMoves(ReportDTM)
|
||||
|
||||
end service
|
||||
|
||||
|
||||
Service SignUnloadExtra1(RDSNo, LSLUserName)
|
||||
|
||||
IF LSLUserName NE '' AND RowExists('LSL_USERS', LSLUserName) then
|
||||
If RowExists('RDS', RDSNo) then
|
||||
RDSRec = Database_Services('ReadDataRow', 'RDS', RDSNo)
|
||||
@ -1288,7 +1291,9 @@ Service SignUnloadExtra1(RDSNo, LSLUserName)
|
||||
|
||||
end service
|
||||
|
||||
|
||||
Service UnsignUnloadExtra1(RDSNo, LSLUserName)
|
||||
|
||||
IF LSLUserName NE '' AND RowExists('LSL_USERS', LSLUserName) then
|
||||
If RowExists('RDS', RDSNo) then
|
||||
RDSRec = Database_Services('ReadDataRow', 'RDS', RDSNo)
|
||||
@ -1323,9 +1328,12 @@ Service UnsignUnloadExtra1(RDSNo, LSLUserName)
|
||||
end else
|
||||
Error_Services('Add', 'Invalid user passed to Unsign Load Extra 1 routine')
|
||||
end
|
||||
|
||||
end service
|
||||
|
||||
|
||||
Service SignLoadExtra1(RDSNo,LSLUserName)
|
||||
|
||||
IF LSLUserName NE '' AND RowExists('LSL_USERS', LSLUserName) then
|
||||
If RowExists('RDS', RDSNo) then
|
||||
RDSRec = Database_Services('ReadDataRow', 'RDS', RDSNo)
|
||||
@ -1359,9 +1367,12 @@ Service SignLoadExtra1(RDSNo,LSLUserName)
|
||||
end else
|
||||
Error_Services('Add', 'Invalid user passed to Sign Unload Extra 1 routine')
|
||||
end
|
||||
|
||||
end service
|
||||
|
||||
|
||||
Service UnsignLoadExtra1(RDSNo, LSLUserName)
|
||||
|
||||
IF LSLUserName NE '' AND RowExists('LSL_USERS', LSLUserName) then
|
||||
If RowExists('RDS', RDSNo) then
|
||||
RDSRec = Database_Services('ReadDataRow', 'RDS', RDSNo)
|
||||
@ -1385,10 +1396,12 @@ Service UnsignLoadExtra1(RDSNo, LSLUserName)
|
||||
end else
|
||||
Error_Services('Add', 'Invalid user passed to Unsign Load Extra 1 routine')
|
||||
end
|
||||
|
||||
end service
|
||||
|
||||
|
||||
Service SignUnloadExtra2(RDSNo,LSLUserName)
|
||||
|
||||
IF LSLUserName NE '' AND RowExists('LSL_USERS', LSLUserName) then
|
||||
If RowExists('RDS', RDSNo) then
|
||||
RDSRec = Database_Services('ReadDataRow', 'RDS', RDSNo)
|
||||
@ -1412,9 +1425,12 @@ Service SignUnloadExtra2(RDSNo,LSLUserName)
|
||||
end else
|
||||
Error_Services('Add', 'Invalid user passed to Sign Unload Extra 1 routine')
|
||||
end
|
||||
|
||||
end service
|
||||
|
||||
|
||||
Service UnsignUnloadExtra2(RDSNo, LSLUserName)
|
||||
|
||||
IF LSLUserName NE '' AND RowExists('LSL_USERS', LSLUserName) then
|
||||
If RowExists('RDS', RDSNo) then
|
||||
RDSRec = Database_Services('ReadDataRow', 'RDS', RDSNo)
|
||||
@ -1449,9 +1465,12 @@ Service UnsignUnloadExtra2(RDSNo, LSLUserName)
|
||||
end else
|
||||
Error_Services('Add', 'Invalid user passed to Unsign Unload Extra 1 routine')
|
||||
end
|
||||
|
||||
end service
|
||||
|
||||
|
||||
Service SignLoadExtra2(RDSNo,LSLUserName)
|
||||
|
||||
IF LSLUserName NE '' AND RowExists('LSL_USERS', LSLUserName) then
|
||||
If RowExists('RDS', RDSNo) then
|
||||
RDSRec = Database_Services('ReadDataRow', 'RDS', RDSNo)
|
||||
@ -1484,9 +1503,12 @@ Service SignLoadExtra2(RDSNo,LSLUserName)
|
||||
end else
|
||||
Error_Services('Add', 'Invalid user passed to Sign Unload Extra 1 routine')
|
||||
end
|
||||
|
||||
end service
|
||||
|
||||
|
||||
Service UnsignLoadExtra2(RDSNo, LSLUserName)
|
||||
|
||||
IF LSLUserName NE '' AND RowExists('LSL_USERS', LSLUserName) then
|
||||
If RowExists('RDS', RDSNo) then
|
||||
RDSRec = Database_Services('ReadDataRow', 'RDS', RDSNo)
|
||||
@ -1510,17 +1532,109 @@ Service UnsignLoadExtra2(RDSNo, LSLUserName)
|
||||
end else
|
||||
Error_Services('Add', 'Invalid user passed to Unsign Unload Extra 1 routine')
|
||||
end
|
||||
|
||||
end service
|
||||
|
||||
|
||||
Service ApplyAbortMetrology(RdsKeys)
|
||||
|
||||
Result = False$
|
||||
ErrorMsg = ''
|
||||
If RdsKeys NE '' then
|
||||
Convert @VM to @FM in RdsKeys
|
||||
If RowExists('RDS', RdsKeys) then
|
||||
For each RdsKey in RdsKeys using @FM
|
||||
|
||||
WoNo = Xlate('RDS', RdsKey, RDS_WO$, 'X')
|
||||
// Set a flag on the CI record indicating the run was aborted
|
||||
CleanInspKey = Xlate('RDS', RdsKey, 'LWI_CI_NO', 'X')
|
||||
CIRec = Database_Services('ReadDataRow', 'CLEAN_INSP', CleanInspKey)
|
||||
CIRec<CLEAN_INSP_WAFERS_REMOVED$> = True$
|
||||
Database_Services('WriteDataRow', 'CLEAN_INSP', CleanInspKey, CIRec, True$, False$, False$)
|
||||
If Error_Services('HasError') then ErrorMsg = Error_Services('GetMessage')
|
||||
|
||||
If ErrorMsg EQ '' then
|
||||
// Change the QA metrology requirements to all wafers
|
||||
CassNo = Xlate('RDS', RdsKey, 'CASS_NO', 'X')
|
||||
WoMatQaKey = WoNo : '*' : CassNo
|
||||
WoMatQaRec = Xlate('WO_MAT_QA', WoMatQaKey, '', 'X')
|
||||
WoWaferQty = Xlate('WO_MAT', WoMatQaKey, WO_MAT_WAFER_QTY$, 'X')
|
||||
WoMatQaStages = WoMatQaRec<WO_MAT_QA_STAGE$>
|
||||
WoMatQaProfiles = WoMatQaRec<WO_MAT_QA_PROFILE$>
|
||||
WoMatQaSlots = WoMatQaRec<WO_MAT_QA_SLOT$>
|
||||
WoMatQaWfrQtys = WoMatQaRec<WO_MAT_QA_WFR_QTY$>
|
||||
WoMatQaProps = WoMatQaRec<WO_MAT_QA_PROP$>
|
||||
WoMatQaToolClasses = WoMatQaRec<WO_MAT_QA_TOOL_CLASS$>
|
||||
WoMatQaRecipes = WoMatQaRec<WO_MAT_QA_RECIPE$>
|
||||
WoMatQaRecipePatterns = WoMatQaRec<WO_MAT_QA_RECIPE_PATTERN$>
|
||||
WoMatQaMin = WoMatQaRec<WO_MAT_QA_MIN$>
|
||||
WoMatQaMax = WoMatQaRec<WO_MAT_QA_MAX$>
|
||||
WoMatQaOOS = WoMatQaRec<WO_MAT_QA_OUT_OF_SPEC$>
|
||||
StageCount = DCount(WoMatQaStages, @VM)
|
||||
For stageIdx = 1 to StageCount
|
||||
If (WoMatQaStages<0, stageIdx> _EQC 'QA') and (WoMatQaProfiles<0, stageIdx> _EQC '1ADE') then
|
||||
Slot = WoMatQaSlots<0, stageIdx>
|
||||
If (Slot _NEC 'L') then
|
||||
WoMatQaSlots<0, stageIdx> = 'A'
|
||||
WoMatQaWfrQtys<0, stageIdx> = WoWaferQty
|
||||
end
|
||||
If (Slot _EQC 'L') then
|
||||
WoMatQaStages<0, stageIdx> = ''
|
||||
WoMatQaProfiles<0, stageIdx> = ''
|
||||
WoMatQaSlots<0, stageIdx> = ''
|
||||
WoMatQaWfrQtys<0, stageIdx> = ''
|
||||
WoMatQaProps<0, stageIdx> = ''
|
||||
WoMatQaToolClasses<0, stageIdx> = ''
|
||||
WoMatQaRecipes<0, stageIdx> = ''
|
||||
WoMatQaRecipePatterns<0, stageIdx> = ''
|
||||
WoMatQaMin<0, stageIdx> = ''
|
||||
WoMatQaMax<0, stageIdx> = ''
|
||||
WoMatQaOOS<0, stageIdx> = ''
|
||||
end
|
||||
end
|
||||
Next stageIdx
|
||||
WoMatQaRec<WO_MAT_QA_STAGE$> = WoMatQaStages
|
||||
WoMatQaRec<WO_MAT_QA_PROFILE$> = WoMatQaProfiles
|
||||
WoMatQaRec<WO_MAT_QA_SLOT$> = WoMatQaSlots
|
||||
WoMatQaRec<WO_MAT_QA_WFR_QTY$> = WoMatQaWfrQtys
|
||||
WoMatQaRec<WO_MAT_QA_PROP$> = WoMatQaProps
|
||||
WoMatQaRec<WO_MAT_QA_TOOL_CLASS$> = WoMatQaToolClasses
|
||||
WoMatQaRec<WO_MAT_QA_RECIPE$> = WoMatQaRecipes
|
||||
WoMatQaRec<WO_MAT_QA_RECIPE_PATTERN$> = WoMatQaRecipePatterns
|
||||
WoMatQaRec<WO_MAT_QA_MIN$> = WoMatQaMin
|
||||
WoMatQaRec<WO_MAT_QA_MAX$> = WoMatQaMax
|
||||
WoMatQaRec<WO_MAT_QA_OUT_OF_SPEC$> = WoMatQaOOS
|
||||
Database_Services('WriteDataRow', 'WO_MAT_QA', WoMatQaKey, WoMatQaRec, True$, False$, False$)
|
||||
If Error_Services('HasError') then ErrorMsg = Error_Services('GetMessage')
|
||||
end
|
||||
|
||||
Next RdsKey
|
||||
end else
|
||||
Convert @FM to ',' in RdsKeys
|
||||
ErrorMsg = 'Error in ':Service:' service. One or more Rds records (':RdsKeys:') do not exist!'
|
||||
end
|
||||
end else
|
||||
ErrorMsg = 'Error in ':Service:' service. Null RdsKeys passed into service!'
|
||||
end
|
||||
|
||||
If ErrorMsg NE '' then
|
||||
Error_Services('Add', ErrorMsg)
|
||||
end else
|
||||
Result = True$
|
||||
end
|
||||
|
||||
end service
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Internal GoSubs
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
ClearCursors:
|
||||
|
||||
For counter = 0 to 8
|
||||
ClearSelect counter
|
||||
Next counter
|
||||
|
||||
return
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -42,7 +42,7 @@ Function Reactor_Log_Actions(Action, CalcColName, FSList, Handle, Name, FMC, Rec
|
||||
|
||||
#pragma precomp SRP_PreCompiler
|
||||
|
||||
$Insert LOGICAL
|
||||
$Insert APP_INSERTS
|
||||
$Insert FILE.SYSTEM.EQUATES
|
||||
$Insert ACTION_SETUP
|
||||
$Insert RDS_EQUATES
|
||||
@ -56,10 +56,11 @@ $Insert REACTOR_EQUATES
|
||||
$Insert WO_MAT_EQUATES
|
||||
$Insert WO_MAT_QA_EQUATES
|
||||
|
||||
equ WOCust$ to 2
|
||||
Equ WOCust$ to 2
|
||||
Equ Comma$ to ','
|
||||
|
||||
Declare function Error_Services, Database_Services, Logging_Services, Environment_Services
|
||||
Declare subroutine Error_Services, Database_Services, Logging_Services, Set_Status, Reactor_Log_Services
|
||||
Declare subroutine Error_Services, Database_Services, Logging_Services, Set_Status, Reactor_Log_Services, Rds_Services
|
||||
|
||||
If KeyID then GoSub Initialize_System_Variables
|
||||
|
||||
@ -163,95 +164,44 @@ WRITE_RECORD_PRE:
|
||||
end
|
||||
|
||||
RdsKeys = Record<REACTOR_LOG_WAFERS_REMOVED_RDS$>
|
||||
Swap @VM with @FM in RdsKeys
|
||||
|
||||
If (Not(OrigWafersRemoved)) and (NewWafersRemoved EQ True$) and (ReactNo NE '') and (RdsKeys NE '') then
|
||||
ReactorConfigKey = 'WO_DAILY_SCHED':ReactNo
|
||||
WoNo = Field(Xlate('CONFIG', ReactorConfigKey, WOCust$, 'X'), ' ', 1)
|
||||
|
||||
CurrentRds = ''
|
||||
LogPath = Environment_Services('GetApplicationRootPath') : '\LogFiles\ReactorLog'
|
||||
LogDate = Oconv(Date(), 'D4/')
|
||||
LogTime = Oconv(Time(), 'MTS')
|
||||
LogFileName = LogDate[7, 4] : '-' : LogDate[1, 2] : '-' : LogDate[4, 2] : 'Wafers Removed Log.csv'
|
||||
Headers = 'Logging DTM' : @FM : 'ReactorNo' : @FM : 'Notes'
|
||||
objLog = Logging_Services('NewLog', LogPath, LogFileName, CRLF$, Comma$, Headers, '', False$, False$, True$)
|
||||
|
||||
For idx = 1 to Len(RdsKeys)
|
||||
CurrentRds = RdsKeys<idx>
|
||||
// Set a flag on the CI record indicating the run was aborted
|
||||
CleanInspKey = Xlate('RDS', CurrentRds, 'LWI_CI_NO', 'X')
|
||||
CIRec = Database_Services('ReadDataRow', 'CLEAN_INSP', CleanInspKey)
|
||||
CIRec<CLEAN_INSP_WAFERS_REMOVED$> = True$
|
||||
Database_Services('WriteDataRow', 'CLEAN_INSP', CleanInspKey, CIRec, True$, False$, False$)
|
||||
// Change the QA metrology requirements to all wafers
|
||||
CassNo = Xlate('RDS', CurrentRds, 'CASS_NO', 'X')
|
||||
WoMatQaKey = WoNo : '*' : CassNo
|
||||
WoMatQaRec = Xlate('WO_MAT_QA', WoMatQaKey, '', 'X')
|
||||
WoWaferQty = Xlate('WO_MAT', WoMatQaKey, WO_MAT_WAFER_QTY$, 'X')
|
||||
WoMatQaStages = WoMatQaRec<WO_MAT_QA_STAGE$>
|
||||
Swap @VM with @FM in WoMatQaStages
|
||||
WoMatQaProfiles = WoMatQaRec<WO_MAT_QA_PROFILE$>
|
||||
Swap @VM with @FM in WoMatQaProfiles
|
||||
WoMatQaSlots = WoMatQaRec<WO_MAT_QA_SLOT$>
|
||||
Swap @VM with @FM in WoMatQaSlots
|
||||
WoMatQaWfrQtys = WoMatQaRec<WO_MAT_QA_WFR_QTY$>
|
||||
Swap @VM with @FM in WoMatQaWfrQtys
|
||||
WoMatQaProps = WoMatQaRec<WO_MAT_QA_PROP$>
|
||||
Swap @VM with @FM in WoMatQaProps
|
||||
WoMatQaToolClasses = WoMatQaRec<WO_MAT_QA_TOOL_CLASS$>
|
||||
Swap @VM with @FM in WoMatQaToolClasses
|
||||
WoMatQaRecipes = WoMatQaRec<WO_MAT_QA_RECIPE$>
|
||||
Swap @VM with @FM in WoMatQaRecipes
|
||||
WoMatQaRecipePatterns = WoMatQaRec<WO_MAT_QA_RECIPE_PATTERN$>
|
||||
Swap @VM with @FM in WoMatQaRecipePatterns
|
||||
WoMatQaMin = WoMatQaRec<WO_MAT_QA_MIN$>
|
||||
Swap @VM with @FM in WoMatQaMin
|
||||
WoMatQaMax = WoMatQaRec<WO_MAT_QA_MAX$>
|
||||
Swap @VM with @FM in WoMatQaMax
|
||||
WoMatQaOOS = WoMatQaRec<WO_MAT_QA_OUT_OF_SPEC$>
|
||||
Swap @VM with @FM in WoMatQaOOS
|
||||
StageCount = DCount(WoMatQaStages, @FM)
|
||||
For stageIdx = 1 to StageCount
|
||||
If (WoMatQaStages<stageIdx> _EQC 'QA') and (WoMatQaProfiles<stageIdx> _EQC '1ADE') then
|
||||
Slot = WoMatQaSlots<stageIdx>
|
||||
If (Slot _NEC 'L') then
|
||||
WoMatQaSlots<stageIdx> = 'A'
|
||||
WoMatQaWfrQtys<stageIdx> = WoWaferQty
|
||||
LoggingDTM = LogDate : ' ' : LogTime ; // Logging DTM
|
||||
|
||||
// Log metrology modification attempt
|
||||
Swap @VM with ',' in RdsKeys
|
||||
LogData = ''
|
||||
LogData<1> = LoggingDtm
|
||||
LogData<2> = ReactNo
|
||||
LogData<3> = 'Wafers removed from reactor, ReactorLog ':Name:'. Attempting to apply abort metrology on RdsKeys ':RdsKeys:'.'
|
||||
Logging_Services('AppendLog', objLog, LogData, @RM, @FM)
|
||||
|
||||
Swap ',' with @FM in RdsKeys
|
||||
Rds_Services('ApplyAbortMetrology', RdsKeys)
|
||||
If Error_Services('HasError') then
|
||||
// Log failure
|
||||
ErrorMsg = Error_Services('GetMessage')
|
||||
LogData = ''
|
||||
LogData<1> = LoggingDtm
|
||||
LogData<2> = ReactNo
|
||||
LogData<3> = 'Error applying abort metrology. Error message: ':ErrorMsg
|
||||
Logging_Services('AppendLog', objLog, LogData, @RM, @FM)
|
||||
end else
|
||||
// Log success
|
||||
LogData = ''
|
||||
LogData<1> = LoggingDtm
|
||||
LogData<2> = ReactNo
|
||||
LogData<3> = 'Successfully applied abort metrology'
|
||||
Logging_Services('AppendLog', objLog, LogData, @RM, @FM)
|
||||
end
|
||||
If (Slot _EQC 'L') then
|
||||
WoMatQaStages<stageIdx> = ''
|
||||
WoMatQaProfiles<stageIdx> = ''
|
||||
WoMatQaSlots<stageIdx> = ''
|
||||
WoMatQaWfrQtys<stageIdx> = ''
|
||||
WoMatQaProps<stageIdx> = ''
|
||||
WoMatQaToolClasses<stageIdx> = ''
|
||||
WoMatQaRecipes<stageIdx> = ''
|
||||
WoMatQaRecipePatterns<stageIdx> = ''
|
||||
WoMatQaMin<stageIdx> = ''
|
||||
WoMatQaMax<stageIdx> = ''
|
||||
WoMatQaOOS<stageIdx> = ''
|
||||
end
|
||||
end
|
||||
Next stageIdx
|
||||
Swap @FM with @VM in WoMatQaStages
|
||||
WoMatQaRec<WO_MAT_QA_STAGE$> = WoMatQaStages
|
||||
Swap @FM with @VM in WoMatQaProfiles
|
||||
WoMatQaRec<WO_MAT_QA_PROFILE$> = WoMatQaProfiles
|
||||
Swap @FM with @VM in WoMatQaSlots
|
||||
WoMatQaRec<WO_MAT_QA_SLOT$> = WoMatQaSlots
|
||||
Swap @FM with @VM in WoMatQaWfrQtys
|
||||
WoMatQaRec<WO_MAT_QA_WFR_QTY$> = WoMatQaWfrQtys
|
||||
Swap @FM with @VM in WoMatQaProps
|
||||
WoMatQaRec<WO_MAT_QA_PROP$> = WoMatQaProps
|
||||
Swap @FM with @VM in WoMatQaToolClasses
|
||||
WoMatQaRec<WO_MAT_QA_TOOL_CLASS$> = WoMatQaToolClasses
|
||||
Swap @FM with @VM in WoMatQaRecipes
|
||||
WoMatQaRec<WO_MAT_QA_RECIPE$> = WoMatQaRecipes
|
||||
Swap @FM with @VM in WoMatQaRecipePatterns
|
||||
WoMatQaRec<WO_MAT_QA_RECIPE_PATTERN$> = WoMatQaRecipePatterns
|
||||
Swap @FM with @VM in WoMatQaMin
|
||||
WoMatQaRec<WO_MAT_QA_MIN$> = WoMatQaMin
|
||||
Swap @FM with @VM in WoMatQaMax
|
||||
WoMatQaRec<WO_MAT_QA_MAX$> = WoMatQaMax
|
||||
Swap @FM with @VM in WoMatQaOOS
|
||||
WoMatQaRec<WO_MAT_QA_OUT_OF_SPEC$> = WoMatQaOOS
|
||||
Database_Services('WriteDataRow', 'WO_MAT_QA', WoMatQaKey, WoMatQaRec, True$, False$, False$)
|
||||
Next idx
|
||||
end
|
||||
|
||||
return
|
||||
@ -373,9 +323,11 @@ return
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
ClearCursors:
|
||||
|
||||
For counter = 0 to 8
|
||||
ClearSelect counter
|
||||
Next counter
|
||||
|
||||
return
|
||||
|
||||
|
||||
@ -427,14 +379,3 @@ Restore_System_Variables:
|
||||
|
||||
return
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -64,7 +64,7 @@ EQU ENG$ to 5
|
||||
|
||||
Declare subroutine Error_Services, Reactor_Services, Memory_Services, RList, Database_Services, SRP_JSON, obj_React_Mode
|
||||
Declare subroutine Excel_Services, Schedule_Services, Logging_Services, Set_Status, obj_React_Status, Errmsg,React_Assign_Conv
|
||||
Declare subroutine Obj_Notes, Btree.Extract, SRP_Fastarray, Delay, Mona_Services, SRP_List, Msg
|
||||
Declare subroutine Obj_Notes, Btree.Extract, SRP_Fastarray, Delay, Mona_Services, SRP_List, Msg, Rds_Services
|
||||
Declare function SRP_Array, Reactor_Services, Memory_Services, Database_Services, SRP_Sort_Array, Excel_Services
|
||||
Declare function SRP_Math, SRP_Hash, SRP_JSON, Epi_Part_Services, Schedule_Services, Date_Services, Environment_Services
|
||||
Declare function Logging_Services, GetCommandLine, NextKey, Reactor_Log_Services, SRP_DateTime, ole_getwebpage
|
||||
@ -78,19 +78,13 @@ WeeklyReportsFolder = Environment_Services('GetApplicationRootPath') : '\Rep
|
||||
|
||||
CommandLine = GetCommandLine()
|
||||
Machine = Environment_Services('GetServer')
|
||||
LogPath = Environment_Services('GetApplicationRootPath') : '\LogFiles\PerformanceReports'
|
||||
|
||||
LogDate = Oconv(Date(), 'D4/')
|
||||
LogTime = Oconv(Time(), 'MTS')
|
||||
LogFileName = LogDate[7, 4] : '-' : LogDate[1, 2] : '-' : LogDate[4, 2] : ' Performance Reports.csv'
|
||||
Headers = 'Logging DTM' : @FM : 'Machine' : @FM : 'Command Line' : @FM : 'Service Detail'
|
||||
ColumnWidths = 20 : @FM : 15 : @FM : 60 : @FM : 300
|
||||
objLog = Logging_Services('NewLog', LogPath, LogFileName, CRLF$, ' ', Headers, ColumnWidths, False$, False$)
|
||||
LoggingDTM = LogDate : ' ' : LogTime ; // Logging DTM
|
||||
|
||||
GoToService else
|
||||
Error_Services('Set', Service : ' is not a valid service request within the ' : ServiceModule : ' services module.')
|
||||
LogData = LoggingDTM : @FM : Machine : @FM : CommandLine : @FM : Error_Services('GetMessage')
|
||||
Logging_Services('AppendLog', objLog, LogData, @RM, @FM, False$)
|
||||
|
||||
end
|
||||
|
||||
Return Response else ''
|
||||
@ -637,9 +631,6 @@ end service
|
||||
//----------------------------------------------------------------------------------------------------------------------
|
||||
Service GetReactors(MatchType, MatchSize)
|
||||
|
||||
LogData = LoggingDTM : @FM : Machine : @FM : CommandLine : @FM : Service : ' begins.'
|
||||
* Logging_Services('AppendLog', objLog, LogData, @RM, @FM, False$)
|
||||
|
||||
ServiceKeyID := '*' : MatchType : '*' : MatchSize
|
||||
Reactors = ''
|
||||
|
||||
@ -711,9 +702,6 @@ Service GetReactors(MatchType, MatchSize)
|
||||
|
||||
Response = Reactors
|
||||
|
||||
LogData = LoggingDTM : @FM : Machine : @FM : CommandLine : @FM : Service : ' ends.'
|
||||
* Logging_Services('AppendLog', objLog, LogData, @RM, @FM, False$)
|
||||
|
||||
end service
|
||||
|
||||
|
||||
@ -724,9 +712,6 @@ end service
|
||||
//----------------------------------------------------------------------------------------------------------------------
|
||||
Service GetReactorNumbers(MatchType, MatchSize)
|
||||
|
||||
LogData = LoggingDTM : @FM : Machine : @FM : CommandLine : @FM : Service : ' begins.'
|
||||
Logging_Services('AppendLog', objLog, LogData, @RM, @FM, False$)
|
||||
|
||||
ServiceKeyID := '*' : MatchType : '*' : MatchSize
|
||||
ReactorNumbers = ''
|
||||
|
||||
@ -780,9 +765,6 @@ Service GetReactorNumbers(MatchType, MatchSize)
|
||||
|
||||
Response = ReactorNumbers
|
||||
|
||||
LogData = LoggingDTM : @FM : Machine : @FM : CommandLine : @FM : Service : ' ends.'
|
||||
Logging_Services('AppendLog', objLog, LogData, @RM, @FM, False$)
|
||||
|
||||
end service
|
||||
|
||||
//----------------------------------------------------------------------------------------------------------------------
|
||||
@ -792,9 +774,6 @@ end service
|
||||
//----------------------------------------------------------------------------------------------------------------------
|
||||
Service GetReactor(ReactorNo)
|
||||
|
||||
LogData = LoggingDTM : @FM : Machine : @FM : CommandLine : @FM : Service : ' begins.'
|
||||
* Logging_Services('AppendLog', objLog, LogData, @RM, @FM, False$)
|
||||
|
||||
ServiceKeyID := '*' : ReactorNo
|
||||
Reactor = ''
|
||||
|
||||
@ -837,9 +816,6 @@ Service GetReactor(ReactorNo)
|
||||
|
||||
Response = Reactor
|
||||
|
||||
LogData = LoggingDTM : @FM : Machine : @FM : CommandLine : @FM : Service : ' ends.'
|
||||
* Logging_Services('AppendLog', objLog, LogData, @RM, @FM, False$)
|
||||
|
||||
end service
|
||||
|
||||
|
||||
@ -851,9 +827,6 @@ end service
|
||||
//----------------------------------------------------------------------------------------------------------------------
|
||||
Service CreatePerformanceTrackers(ScheduleDate, CreateReports)
|
||||
|
||||
LogData = LoggingDTM : @FM : Machine : @FM : CommandLine : @FM : Service : ' begins.'
|
||||
Logging_Services('AppendLog', objLog, LogData, @RM, @FM, False$)
|
||||
|
||||
// Force the auto scheduler to run to make sure that all adjustments are being made to the scheduler.
|
||||
* Schedule_Services('AutoScheduler')
|
||||
|
||||
@ -987,9 +960,6 @@ Service CreatePerformanceTrackers(ScheduleDate, CreateReports)
|
||||
end
|
||||
end
|
||||
|
||||
LogData = LoggingDTM : @FM : Machine : @FM : CommandLine : @FM : Service : ' ends.'
|
||||
Logging_Services('AppendLog', objLog, LogData, @RM, @FM, False$)
|
||||
|
||||
end service
|
||||
|
||||
|
||||
@ -1000,9 +970,6 @@ end service
|
||||
//----------------------------------------------------------------------------------------------------------------------
|
||||
Service UpdatePerformanceTrackers(ScheduleDate, CreateReports)
|
||||
|
||||
LogData = LoggingDTM : @FM : Machine : @FM : CommandLine : @FM : Service : ' begins.'
|
||||
Logging_Services('AppendLog', objLog, LogData, @RM, @FM, False$)
|
||||
|
||||
If Num(ScheduleDate) else ScheduleDate = Iconv(ScheduleDate, 'D')
|
||||
If ScheduleDate EQ '' then ScheduleDate = Date()
|
||||
If CreateReports NE False$ then CreateReports = True$
|
||||
@ -1059,9 +1026,6 @@ Service UpdatePerformanceTrackers(ScheduleDate, CreateReports)
|
||||
end
|
||||
end
|
||||
|
||||
LogData = LoggingDTM : @FM : Machine : @FM : CommandLine : @FM : Service : ' ends.'
|
||||
Logging_Services('AppendLog', objLog, LogData, @RM, @FM, False$)
|
||||
|
||||
end service
|
||||
|
||||
|
||||
@ -1072,9 +1036,6 @@ end service
|
||||
//----------------------------------------------------------------------------------------------------------------------
|
||||
Service ClearWafersExpected(ScheduleDate)
|
||||
|
||||
LogData = LoggingDTM : @FM : Machine : @FM : CommandLine : @FM : Service : ' begins.'
|
||||
Logging_Services('AppendLog', objLog, LogData, @RM, @FM, False$)
|
||||
|
||||
If Num(ScheduleDate) else ScheduleDate = Iconv(ScheduleDate, 'D')
|
||||
If ScheduleDate EQ '' then ScheduleDate = Date()
|
||||
|
||||
@ -1111,9 +1072,6 @@ Service ClearWafersExpected(ScheduleDate)
|
||||
end
|
||||
end
|
||||
|
||||
LogData = LoggingDTM : @FM : Machine : @FM : CommandLine : @FM : Service : ' ends.'
|
||||
Logging_Services('AppendLog', objLog, LogData, @RM, @FM, False$)
|
||||
|
||||
end service
|
||||
|
||||
|
||||
@ -1124,9 +1082,6 @@ end service
|
||||
//----------------------------------------------------------------------------------------------------------------------
|
||||
Service ClearWafersProcessed(ScheduleDate)
|
||||
|
||||
LogData = LoggingDTM : @FM : Machine : @FM : CommandLine : @FM : Service : ' begins.'
|
||||
Logging_Services('AppendLog', objLog, LogData, @RM, @FM, False$)
|
||||
|
||||
If Num(ScheduleDate) else ScheduleDate = Iconv(ScheduleDate, 'D')
|
||||
If ScheduleDate EQ '' then ScheduleDate = Date()
|
||||
|
||||
@ -1163,9 +1118,6 @@ Service ClearWafersProcessed(ScheduleDate)
|
||||
end
|
||||
end
|
||||
|
||||
LogData = LoggingDTM : @FM : Machine : @FM : CommandLine : @FM : Service : ' ends.'
|
||||
Logging_Services('AppendLog', objLog, LogData, @RM, @FM, False$)
|
||||
|
||||
end service
|
||||
|
||||
//----------------------------------------------------------------------------------------------------------------------
|
||||
@ -1176,9 +1128,6 @@ end service
|
||||
//----------------------------------------------------------------------------------------------------------------------
|
||||
Service CreateDailyPerformanceReport(ScheduleDate)
|
||||
|
||||
LogData = LoggingDTM : @FM : Machine : @FM : CommandLine : @FM : Service : ' begins.'
|
||||
Logging_Services('AppendLog', objLog, LogData, @RM, @FM, False$)
|
||||
|
||||
If Num(ScheduleDate) else ScheduleDate = Iconv(ScheduleDate, 'D')
|
||||
If ScheduleDate EQ '' then ScheduleDate = Date()
|
||||
|
||||
@ -1258,9 +1207,6 @@ Service CreateDailyPerformanceReport(ScheduleDate)
|
||||
end
|
||||
end
|
||||
|
||||
LogData = LoggingDTM : @FM : Machine : @FM : CommandLine : @FM : Service : ' ends.'
|
||||
Logging_Services('AppendLog', objLog, LogData, @RM, @FM, False$)
|
||||
|
||||
end service
|
||||
|
||||
|
||||
@ -1272,9 +1218,6 @@ end service
|
||||
//----------------------------------------------------------------------------------------------------------------------
|
||||
Service UpdateDailyPerformanceReport(ScheduleDate)
|
||||
|
||||
LogData = LoggingDTM : @FM : Machine : @FM : CommandLine : @FM : Service : ' begins.'
|
||||
Logging_Services('AppendLog', objLog, LogData, @RM, @FM, False$)
|
||||
|
||||
If Num(ScheduleDate) else ScheduleDate = Iconv(ScheduleDate, 'D')
|
||||
If ScheduleDate EQ '' then ScheduleDate = Date()
|
||||
|
||||
@ -1329,9 +1272,6 @@ Service UpdateDailyPerformanceReport(ScheduleDate)
|
||||
end
|
||||
end
|
||||
|
||||
LogData = LoggingDTM : @FM : Machine : @FM : CommandLine : @FM : Service : ' ends.'
|
||||
Logging_Services('AppendLog', objLog, LogData, @RM, @FM, False$)
|
||||
|
||||
end service
|
||||
|
||||
|
||||
@ -1343,9 +1283,6 @@ end service
|
||||
//----------------------------------------------------------------------------------------------------------------------
|
||||
Service CreateWeeklyPerformanceReport(YearWeekNo)
|
||||
|
||||
LogData = LoggingDTM : @FM : Machine : @FM : CommandLine : @FM : Service : ' begins.'
|
||||
Logging_Services('AppendLog', objLog, LogData, @RM, @FM, False$)
|
||||
|
||||
// YearWeekNo looks like 2017-W44. For testing purposes it might be easier to pass in a date and the YearWeekNo
|
||||
// will be calculated.
|
||||
If (Num(Iconv(YearWeekNo, 'D')) AND (Iconv(YearWeekNo, 'D') NE '')) OR Num(YearWeekNo) then
|
||||
@ -1444,9 +1381,6 @@ Service CreateWeeklyPerformanceReport(YearWeekNo)
|
||||
end
|
||||
end
|
||||
|
||||
LogData = LoggingDTM : @FM : Machine : @FM : CommandLine : @FM : Service : ' ends.'
|
||||
Logging_Services('AppendLog', objLog, LogData, @RM, @FM, False$)
|
||||
|
||||
end service
|
||||
|
||||
|
||||
@ -1458,9 +1392,6 @@ end service
|
||||
//----------------------------------------------------------------------------------------------------------------------
|
||||
Service UpdateWeeklyPerformanceReport(YearWeekNo)
|
||||
|
||||
LogData = LoggingDTM : @FM : Machine : @FM : CommandLine : @FM : Service : ' begins.'
|
||||
Logging_Services('AppendLog', objLog, LogData, @RM, @FM, False$)
|
||||
|
||||
// YearWeekNo looks like 2017-W44. For testing purposes it might be easier to pass in a date and the YearWeekNo
|
||||
// will be calculated.
|
||||
If (Num(Iconv(YearWeekNo, 'D')) AND (Iconv(YearWeekNo, 'D') NE '')) OR Num(YearWeekNo) then
|
||||
@ -1514,25 +1445,28 @@ Service UpdateWeeklyPerformanceReport(YearWeekNo)
|
||||
end
|
||||
end
|
||||
|
||||
LogData = LoggingDTM : @FM : Machine : @FM : CommandLine : @FM : Service : ' ends.'
|
||||
Logging_Services('AppendLog', objLog, LogData, @RM, @FM, False$)
|
||||
|
||||
end service
|
||||
|
||||
|
||||
Service GetReactorCurrLoad(ReactNo)
|
||||
|
||||
Response = ''
|
||||
ReactStatusRec = Database_Services('ReadDataRow', 'REACT_STATUS', ReactNo)
|
||||
LoadedCassettes = ReactStatusRec<REACT_STATUS_LOAD_CASS_ID$>
|
||||
Response = LoadedCassettes
|
||||
|
||||
end service
|
||||
|
||||
Service GetReactorCurrLoadRDS(ReactNo)
|
||||
|
||||
Response = ''
|
||||
ReactStatusRec = Database_Services('ReadDataRow', 'REACT_STATUS', ReactNo)
|
||||
LoadedCassettes = ReactStatusRec<REACT_STATUS_LOAD_RDS$>
|
||||
Response = LoadedCassettes
|
||||
|
||||
end service
|
||||
|
||||
|
||||
Service GetReactCurrModeRec(ReactNo)
|
||||
|
||||
Response = ''
|
||||
@ -1542,6 +1476,7 @@ Service GetReactCurrModeRec(ReactNo)
|
||||
|
||||
end service
|
||||
|
||||
|
||||
Service GetReactCurrModeId(ReactNo)
|
||||
|
||||
Response = ''
|
||||
@ -1550,12 +1485,16 @@ Service GetReactCurrModeId(ReactNo)
|
||||
|
||||
end service
|
||||
|
||||
|
||||
Service GetReactCurrModeName(ReactNo)
|
||||
|
||||
Response = ''
|
||||
ReactModeRec = Reactor_Services('GetReactCurrModeRec', ReactNo)
|
||||
Response = ReactModeRec<REACT_MODE_NG_MODE$>
|
||||
|
||||
end service
|
||||
|
||||
|
||||
Service GetReactModeHistory(ReactNo, DaysToReport)
|
||||
|
||||
StartDt = Date() - DaysToReport
|
||||
@ -1564,9 +1503,8 @@ Service GetReactModeHistory(ReactNo, DaysToReport)
|
||||
If ( (ReactNo NE '') and (DaysToReport NE '') ) then
|
||||
If Date() - DaysToReport LE LegacyDate then
|
||||
modeArray = ''
|
||||
//New Modes
|
||||
// New Modes
|
||||
SelectSent = 'SELECT REACT_MODE_NG WITH REACT_NO = ':QUOTE(ReactNo):' AND WITH START_DT > ':QUOTE(OConv(StartDt, 'D4/')):' BY-DSND START_DTM '
|
||||
//SelectSent = 'SELECT REACT_MODE_NG WITH START_DT >= ':QUOTE(DayBegin):' AND WITH START_DTM >= ':QUOTE(FromTime):'AND WITH START_DTM <= ':QUOTE(ToTime):' BY-DSND START_DTM '
|
||||
Set_Status(0)
|
||||
RList(SelectSent, TARGET_ACTIVELIST$, "", "", "")
|
||||
IF Get_Status(errCode) THEN
|
||||
@ -1632,9 +1570,8 @@ Service GetReactModeHistory(ReactNo, DaysToReport)
|
||||
end
|
||||
GoSub ClearCursors
|
||||
ClearSelect TARGET_ACTIVELIST$
|
||||
//Old Modes
|
||||
// Old Modes
|
||||
SelectSent = 'SELECT REACT_MODE WITH REACT_NO = ':QUOTE(ReactNo):' AND WITH START_DT > ':QUOTE(OConv(StartDt, 'D4/')):' BY-DSND START_DTM '
|
||||
//SelectSent = 'SELECT REACT_MODE WITH START_DT >= ':QUOTE(DayBegin):' AND WITH START_DTM >= ':QUOTE(FromTime):'AND WITH START_DTM <= ':QUOTE(ToTime):' BY-DSND START_DTM '
|
||||
Set_Status(0)
|
||||
RList(SelectSent, TARGET_ACTIVELIST$, "", "", "")
|
||||
IF Get_Status(errCode) THEN
|
||||
@ -1758,9 +1695,6 @@ Service GetReactModeHistory(ReactNo, DaysToReport)
|
||||
|
||||
ServiceNotes = ServiceNotesFormatted
|
||||
|
||||
* SWAP ' ' WITH CRLF$ IN StartDTM
|
||||
* SWAP ' ' WITH CRLF$ IN StopDTM
|
||||
|
||||
FOR I = 1 TO COUNT(ProbCatIDs,@VM) + (ProbCatIDs NE '')
|
||||
ProbCatDescs<1,I> = ProbCatIDs<1,I>:' - ':ProbCatDescs<1,I>
|
||||
NEXT I
|
||||
@ -1797,24 +1731,19 @@ Service GetReactModeHistory(ReactNo, DaysToReport)
|
||||
Error_Services('Add', ErrorMsg)
|
||||
end
|
||||
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
end service
|
||||
|
||||
|
||||
Service GetReactorCassLoadHistory(ReactNo, DaysToReport)
|
||||
|
||||
|
||||
Response = ''
|
||||
If ( (ReactNo NE '') and (DaysToReport NE '') ) then
|
||||
Open 'RDS' to RDSTable then
|
||||
OPEN 'DICT.RDS' TO @DICT then
|
||||
StartDt = Date() - DaysToReport
|
||||
//StartDt = OCONV(StartDt,'D4/')
|
||||
SelectSent = 'SELECT RDS WITH REACTOR = ':QUOTE(ReactNo):' AND WITH DATE_IN > ':QUOTE(OConv(StartDt, 'D4/')):' BY-DSND DATETIME_IN '
|
||||
Set_Status(0)
|
||||
errCode = ''
|
||||
@ -1856,14 +1785,13 @@ Service GetReactorCassLoadHistory(ReactNo, DaysToReport)
|
||||
|
||||
end service
|
||||
|
||||
|
||||
Service GetReactorCassLoadHistoryRange(ReactNo, StartDTM, StopDTM)
|
||||
|
||||
Response = ''
|
||||
If ( (ReactNo NE '') and (StartDTM NE '') and (StopDTM NE '')) then
|
||||
Open 'RDS' to RDSTable then
|
||||
OPEN 'DICT.RDS' TO @DICT then
|
||||
//StartDt = Date() - DaysToReport
|
||||
//StartDt = OCONV(StartDt,'D4/')
|
||||
SelectSent = 'SELECT RDS WITH REACTOR EQ ':ReactNo:' AND WITH DATETIME_IN GE ':StartDTM:' AND WITH DATETIME_IN LE ':StopDTM:' BY-DSND DATETIME_IN '
|
||||
Set_Status(0)
|
||||
errCode = ''
|
||||
@ -1903,11 +1831,10 @@ Service GetReactorCassLoadHistoryRange(ReactNo, StartDTM, StopDTM)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
end service
|
||||
|
||||
Service IncrementCycleCount(ToolID)
|
||||
|
||||
Service IncrementCycleCount(ToolID)
|
||||
|
||||
If ToolID NE '' then
|
||||
// A reactor number may be passed in. Convert it to the corresponding tool ID if necessary.
|
||||
@ -1926,6 +1853,14 @@ end service
|
||||
|
||||
Service CreateReactModeChange(UserID, ReactNo, Mode, ModeSubCat, ModeText, ForceModeChange)
|
||||
|
||||
LogPath = Environment_Services('GetApplicationRootPath') : '\LogFiles\ReactorModeChg'
|
||||
LogDate = Oconv(Date(), 'D4/')
|
||||
LogTime = Oconv(Time(), 'MTS')
|
||||
LogFileName = LogDate[7, 4] : '-' : LogDate[1, 2] : '-' : LogDate[4, 2] : ' Mode Change Log.csv'
|
||||
Headers = 'Logging DTM' : @FM : 'Notes'
|
||||
objLog = Logging_Services('NewLog', LogPath, LogFileName, CRLF$, ' ', Headers, '', False$, False$, True$)
|
||||
LoggingDTM = LogDate : ' ' : LogTime ; // Logging DTM
|
||||
|
||||
ErrorMsg = ''
|
||||
IF ForceModeChange NE True$ then ForceModeChange = False$
|
||||
If ( (UserID NE '') and (ReactNo NE '') and (Mode NE '') and (ModeSubCat NE '')) then
|
||||
@ -1938,7 +1873,7 @@ Service CreateReactModeChange(UserID, ReactNo, Mode, ModeSubCat, ModeText, Force
|
||||
|
||||
CommentException = False$
|
||||
|
||||
BEGIN Case
|
||||
Begin Case
|
||||
Case PrevModeRec<REACT_MODE_NG_MODE$> EQ 'WAITING_FOR_MAINTENANCE_UNSCHEDULED' AND Mode EQ 'MAINTENANCE_UNSCHEDULED'
|
||||
CommentException = True$
|
||||
|
||||
@ -2193,11 +2128,11 @@ Service CreateReactModeChange(UserID, ReactNo, Mode, ModeSubCat, ModeText, Force
|
||||
// Reopen previous react mode
|
||||
Database_Services('WriteDataRow', 'REACT_MODE_NG', NGPrevModeKey, PrevModeRec)
|
||||
end else
|
||||
//Check to see if notifications are active for this mode
|
||||
IF SelectedModeRec<REACTOR_MODES_NOTIFICATION_ACTIVE$> then
|
||||
// Check to see if notifications are active for this mode
|
||||
If SelectedModeRec<REACTOR_MODES_NOTIFICATION_ACTIVE$> then
|
||||
//If notifications are active get the classes from the REACTOR_MODE record
|
||||
SendToClasses = SelectedModeRec<REACTOR_MODES_NOTIFY_CLASS$>
|
||||
for each class in SendToClasses using @VM
|
||||
For each class in SendToClasses using @VM
|
||||
//Send to all the classes
|
||||
notesParms = ''
|
||||
IncludeNextShift = False$
|
||||
@ -2219,9 +2154,157 @@ Service CreateReactModeChange(UserID, ReactNo, Mode, ModeSubCat, ModeText, Force
|
||||
SendToGroup = ''
|
||||
notesParms = Recipients:@RM:SentFrom:@RM:Subject:@RM:Message:@RM:AttachWindow:@RM:AttachKey:@RM:SendToGroup
|
||||
Obj_Notes('Create', notesParms)
|
||||
|
||||
Next class
|
||||
end
|
||||
|
||||
// If new mode sub category is an ABORT/ALARM or particular Facilities Failure, then apply abort metrology to the oldest loaded RDS
|
||||
|
||||
ReactType = Xlate('REACTOR', ReactNo, 'REACT_TYPE', 'X')
|
||||
If ReactType NE 'EPP' then
|
||||
Begin Case
|
||||
Case ModeSubCat _EQC 'ABORT/ALARM - TC Failure'
|
||||
ApplyAbortMet = True$
|
||||
Case ModeSubCat _EQC 'ABORT/ALARM - Contactor Not Sensed On'
|
||||
ApplyAbortMet = True$
|
||||
Case ModeSubCat _EQC 'ABORT/ALARM - Temp Up Failure'
|
||||
ApplyAbortMet = True$
|
||||
Case ModeSubCat _EQC 'Gas Delivery Issue'
|
||||
ApplyAbortMet = True$
|
||||
Case ModeSubCat _EQC 'Toxic Gas Alarm'
|
||||
ApplyAbortMet = True$
|
||||
Case ModeSubCat _EQC 'ABORT/ALARM - Facilities Level Failure'
|
||||
ApplyAbortMet = True$
|
||||
Case ModeSubCat _EQC 'ABORT/ALARM - Exhaust System Failure (Scrubber Toxic)'
|
||||
ApplyAbortMet = True$
|
||||
Case ModeSubCat _EQC 'ABORT/ALARM - Gas Flow - TCS'
|
||||
ApplyAbortMet = True$
|
||||
Case ModeSubCat _EQC 'ABORT/ALARM - Gas Flow - Dopant'
|
||||
ApplyAbortMet = True$
|
||||
Case ModeSubCat _EQC 'ABORT/ALARM - Gas Flow - Hydrogen'
|
||||
ApplyAbortMet = True$
|
||||
Case ModeSubCat _EQC 'ABORT/ALARM - Susceptor Faults'
|
||||
ApplyAbortMet = True$
|
||||
Case ModeSubCat _EQC 'ABORT/ALARM - 24V. Interlock Abort'
|
||||
ApplyAbortMet = True$
|
||||
Case ModeSubCat _EQC 'ABORT/ALARM - Wafer Handling'
|
||||
ApplyAbortMet = True$
|
||||
Case Otherwise$
|
||||
ApplyAbortMet = False$
|
||||
End Case
|
||||
|
||||
If ApplyAbortMet then
|
||||
|
||||
LogPath = Environment_Services('GetApplicationRootPath') : '\LogFiles\ReactorAborts'
|
||||
LogDate = Oconv(Date(), 'D4/')
|
||||
LogTime = Oconv(Time(), 'MTS')
|
||||
LogFileName = LogDate[7, 4] : '-' : LogDate[1, 2] : '-' : LogDate[4, 2] : ' Reactor Abort Log.csv'
|
||||
Headers = 'Logging DTM' : @FM : 'ReactorNo' : @FM : 'Notes'
|
||||
objAbortLog = Logging_Services('NewLog', LogPath, LogFileName, CRLF$, ' ', Headers, '', False$, False$, True$)
|
||||
LoggingDTM = LogDate : ' ' : LogTime ; // Logging DTM
|
||||
|
||||
LogMsg = 'Intermediate or Major ABORT/ALARM mode sub category, ':ModeSubCat:'. '
|
||||
LogMsg := 'Attempting to apply abort metrology to loaded RDS.'
|
||||
LogData = ''
|
||||
LogData<1> = LoggingDtm
|
||||
LogData<2> = ReactNo
|
||||
LogData<3> = LogMsg
|
||||
Logging_Services('AppendLog', objAbortLog, LogData, @RM, @FM)
|
||||
|
||||
// Get the loaded RDS key(s) and apply abort metrology. If two are loaded, select the one loaded first.
|
||||
LoadedRdsKeys = Xlate('REACT_STATUS', ReactNo, 'LOAD_RDS', 'X')
|
||||
If LoadedRdsKeys NE '' then
|
||||
|
||||
AbortRds = ''
|
||||
|
||||
Begin Case
|
||||
Case DCount(LoadedRdsKeys, @VM) EQ 2
|
||||
// Select the oldest one
|
||||
LoadDtms = Xlate('RDS', LoadedRdsKeys, 'DATETIME_IN', 'X')
|
||||
If LoadDtms<0, 2> GT LoadDtms<0, 1> then
|
||||
AbortRds = LoadedRdsKeys<0, 1>
|
||||
end else
|
||||
AbortRds = LoadedRdsKeys<0, 2>
|
||||
end
|
||||
|
||||
Swap @VM with ' ' in LoadedRdsKeys
|
||||
LogMsg = 'Two loaded RDS keys, ':LoadedRdsKeys:', found in REACT_STATUS record.'
|
||||
LogData = ''
|
||||
LogData<1> = LoggingDtm
|
||||
LogData<2> = ReactNo
|
||||
LogData<3> = LogMsg
|
||||
Logging_Services('AppendLog', objAbortLog, LogData, @RM, @FM)
|
||||
|
||||
LogMsg = 'Selecting RDS ':AbortRDS:' as it was loaded earlier.'
|
||||
LogData = ''
|
||||
LogData<1> = LoggingDtm
|
||||
LogData<2> = ReactNo
|
||||
LogData<3> = LogMsg
|
||||
Logging_Services('AppendLog', objAbortLog, LogData, @RM, @FM)
|
||||
|
||||
Case DCount(LoadedRdsKeys, @VM) EQ 1
|
||||
// Only one loaded, so use that
|
||||
AbortRds = LoadedRdsKeys
|
||||
LogMsg = 'One loaded RDS key, ':AbortRds:', found in REACT_STATUS record.'
|
||||
LogData = ''
|
||||
LogData<1> = LoggingDtm
|
||||
LogData<2> = ReactNo
|
||||
LogData<3> = LogMsg
|
||||
Logging_Services('AppendLog', objAbortLog, LogData, @RM, @FM)
|
||||
|
||||
Case Otherwise$
|
||||
// Unexpected condition - log error
|
||||
Swap @VM with ' ' in LoadedRdsKeys
|
||||
LogMsg = 'Error selecting RDS to apply abort metrology to. Loaded RDS keys, ':LoadedRdsKeys:', found in REACT_STATUS record.'
|
||||
LogData = ''
|
||||
LogData<1> = LoggingDtm
|
||||
LogData<2> = ReactNo
|
||||
LogData<3> = LogMsg
|
||||
Logging_Services('AppendLog', objAbortLog, LogData, @RM, @FM)
|
||||
|
||||
End Case
|
||||
|
||||
If AbortRds NE '' then
|
||||
LogMsg = 'Attempting to apply abort metrology to RDS ':AbortRds:'.'
|
||||
LogData = ''
|
||||
LogData<1> = LoggingDtm
|
||||
LogData<2> = ReactNo
|
||||
LogData<3> = LogMsg
|
||||
Logging_Services('AppendLog', objAbortLog, LogData, @RM, @FM)
|
||||
|
||||
Rds_Services('ApplyAbortMetrology', AbortRds)
|
||||
If Error_Services('NoError') then
|
||||
|
||||
LogMsg = 'Successfully applied abort metrology to RDS ':AbortRds:'.'
|
||||
LogData = ''
|
||||
LogData<1> = LoggingDtm
|
||||
LogData<2> = ReactNo
|
||||
LogData<3> = LogMsg
|
||||
Logging_Services('AppendLog', objAbortLog, LogData, @RM, @FM)
|
||||
|
||||
end else
|
||||
|
||||
ErrorMsg = Error_Services('GetMessage')
|
||||
|
||||
LogMsg = 'Error occurred while applying abort metrology to RDS ':AbortRds:'. Error message: ':ErrorMsg
|
||||
LogData = ''
|
||||
LogData<1> = LoggingDtm
|
||||
LogData<2> = ReactNo
|
||||
LogData<3> = LogMsg
|
||||
Logging_Services('AppendLog', objAbortLog, LogData, @RM, @FM)
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
end else
|
||||
// No loaded RDS runs detected
|
||||
LogMsg = 'No loaded RDS keys found in REACT_STATUS record.'
|
||||
LogData = ''
|
||||
LogData<1> = LoggingDtm
|
||||
LogData<2> = ReactNo
|
||||
LogData<3> = LogMsg
|
||||
Logging_Services('AppendLog', objAbortLog, LogData, @RM, @FM)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end else
|
||||
@ -2299,8 +2382,6 @@ Service CreateReactModeChange(UserID, ReactNo, Mode, ModeSubCat, ModeText, Force
|
||||
Case ModeSubCat EQ ''
|
||||
ErrorMsg = 'You must choose a VALID Reactor Problem Category.'
|
||||
|
||||
|
||||
|
||||
End Case
|
||||
end
|
||||
|
||||
@ -2331,9 +2412,9 @@ end service
|
||||
Service GetSingleReactStatusJson(reactNo)
|
||||
|
||||
response = ''
|
||||
//Create the root objec JSON
|
||||
// Create the root object JSON
|
||||
If SRP_Json(objReactor, "New") then
|
||||
//Create the array of reactors
|
||||
// Create the array of reactors
|
||||
If SRP_Json(objReactorArray, "New", "Array") then
|
||||
ReactStatusArray = Reactor_Services('FormatReactStatusSingle', reactNo)
|
||||
CurrE10State = Xlate('REACTOR_MODES', ReactStatusArray<REACT_MODE_NG_MODE$>, REACTOR_MODES_E10_STATE$, 'X')
|
||||
@ -2368,7 +2449,6 @@ Service GetSingleReactStatusJson(reactNo)
|
||||
SRP_Json(objReactor, "Release")
|
||||
end
|
||||
|
||||
|
||||
response = resultingJSON
|
||||
|
||||
end service
|
||||
@ -2421,7 +2501,6 @@ Service GetAllReactStatusJson()
|
||||
SRP_Json(objReactor, "Release")
|
||||
end
|
||||
|
||||
|
||||
response = resultingJSON
|
||||
|
||||
end service
|
||||
@ -2751,7 +2830,9 @@ Service CleanReactStatus()
|
||||
|
||||
end service
|
||||
|
||||
|
||||
Service GetReactModeKeysByTimeSpan(ReactorNo, StartDtm, StopDtm)
|
||||
|
||||
Begin Case
|
||||
Case ReactorNo Eq ''
|
||||
Error_Services('Add', 'Error in ' : Service : ' service. ReactorNo not supplied.')
|
||||
@ -2807,9 +2888,12 @@ Service GetReactModeKeysByTimeSpan(ReactorNo, StartDtm, StopDtm)
|
||||
end else
|
||||
Response = Error_Services('GetMessage')
|
||||
end
|
||||
|
||||
end service
|
||||
|
||||
|
||||
Service GetReactorUptimeMetricsByTimeSpan(ReactorNo, StartDtm, StopDtm)
|
||||
|
||||
ToolData = ''
|
||||
TotalProductiveMinutes = 0
|
||||
TotalUnscheduledDownMinutes = 0
|
||||
@ -3073,9 +3157,12 @@ Service GetReactorUptimeMetricsByTimeSpan(ReactorNo, StartDtm, StopDtm)
|
||||
end else
|
||||
Response = Error_Services('GetMessage')
|
||||
end
|
||||
|
||||
end service
|
||||
|
||||
|
||||
Service GetReactorUptimeMetricsByTypeAndTimeSpan(startDtm, endDtm, reactType)
|
||||
|
||||
Begin Case
|
||||
Case startDtm EQ ''
|
||||
Error_Services('Add', 'Error getting reactor uptime metrics -> Report start date not supplied')
|
||||
@ -3193,9 +3280,12 @@ Service GetReactorUptimeMetricsByTypeAndTimeSpan(startDtm, endDtm, reactType)
|
||||
Error_Services('Add', 'Error getting reactor uptime metrics -> Unable to get total report duration.')
|
||||
end
|
||||
end
|
||||
|
||||
end service
|
||||
|
||||
|
||||
Service GetLoadedRds(ReactNo)
|
||||
|
||||
StopRDS = Xlate('REACT_STATE', ReactNo, 'LAST_RDS_NO', 'X')
|
||||
|
||||
// Get list of RDS on current reactor that are not FQA
|
||||
@ -3231,8 +3321,10 @@ Service GetLoadedRds(ReactNo)
|
||||
Repeat
|
||||
|
||||
Response = RdsKeys
|
||||
|
||||
end service
|
||||
|
||||
|
||||
Service CreateReactorProveInOrder(ReactNo, ProveInType)
|
||||
|
||||
Headers = 'Logging DTM' : @FM : 'Machine' : @FM : 'Log'
|
||||
@ -3338,8 +3430,10 @@ Service CreateReactorProveInOrder(ReactNo, ProveInType)
|
||||
Error_Services('Add', 'Error in ' : Service : ' service. Could not create NICA order.')
|
||||
end
|
||||
end
|
||||
|
||||
end service
|
||||
|
||||
|
||||
Service GetReactorProveInStatus(ReactNo)
|
||||
|
||||
Headers = 'Logging DTM' : @FM : 'Machine' : @FM : 'Log'
|
||||
@ -3384,13 +3478,8 @@ Service GetReactorProveInStatus(ReactNo)
|
||||
Loop
|
||||
while (IsSuccessful EQ False$ and Retries GT 0)
|
||||
WaitSeconds = (3 - Retries) * BackoffSeconds
|
||||
|
||||
Delay(WaitSeconds)
|
||||
|
||||
|
||||
|
||||
Retries = Retries - 1
|
||||
* Httpclient_Services('SetTimeoutDuration',
|
||||
HttpResponseJson = Httpclient_Services('SendHTTPRequest', 'GET', ProveInUrl, 'Accept':@VM:'*/*', '', '', '', False$, False$, '')
|
||||
|
||||
If HttpResponseJson NE '' then
|
||||
@ -3452,10 +3541,12 @@ Service GetReactorProveInStatus(ReactNo)
|
||||
|
||||
Database_Services('WriteDataRow', 'REACTOR', ReactNo, ReactorRec)
|
||||
end
|
||||
|
||||
end service
|
||||
|
||||
|
||||
Service CancelReactorProveIn(ReactNo, OrderId)
|
||||
|
||||
Headers = 'Logging DTM' : @FM : 'Machine' : @FM : 'Log'
|
||||
ColumnWidths = 20 : @FM : 15 : @FM : 300
|
||||
LogPath = Environment_Services('GetApplicationRootPath') : '\LogFiles\ReactorProveIn'
|
||||
@ -3483,11 +3574,7 @@ Service CancelReactorProveIn(ReactNo, OrderId)
|
||||
Loop
|
||||
while (IsSuccessful EQ False$ and Retries GT 0)
|
||||
WaitSeconds = (3 - Retries) * BackoffSeconds
|
||||
|
||||
Delay(WaitSeconds)
|
||||
|
||||
|
||||
|
||||
Retries = Retries - 1
|
||||
|
||||
HttpResponseJson = Httpclient_Services('SendHTTPRequest', 'PUT', ProveInUrl, 'Accept':@VM:'*/*', '', '', '', False$, False$, '')
|
||||
@ -3567,9 +3654,12 @@ Service CancelReactorProveIn(ReactNo, OrderId)
|
||||
|
||||
Error_Services('Add', 'Error in ' : Service : ' service. Could not cancel NICA order')
|
||||
end
|
||||
|
||||
end service
|
||||
|
||||
|
||||
Service ActiveProveInPreventsModeChange(ReactNo, NewMode, CurrentMode)
|
||||
|
||||
If (ReactNo EQ '') then
|
||||
Error_Services('Add', 'Error in ' : Service : ' service. ReactNo was empty')
|
||||
end
|
||||
@ -3613,9 +3703,12 @@ Service ActiveProveInPreventsModeChange(ReactNo, NewMode, CurrentMode)
|
||||
end else
|
||||
Response = False$
|
||||
end
|
||||
|
||||
end service
|
||||
|
||||
|
||||
Service GetReactorDownLL(ReactNo)
|
||||
|
||||
Response = ''
|
||||
If RowExists('REACTOR', ReactNo) then
|
||||
LLDisabledID = Database_Services('ReadDataColumn', 'REACTOR', ReactNo, REACTOR_ACTIVE_LL_DISABLED$, True$, 0)
|
||||
@ -3626,8 +3719,10 @@ Service GetReactorDownLL(ReactNo)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
end service
|
||||
|
||||
|
||||
Service GetReactorLoadCountLimit(ReactNo)
|
||||
|
||||
ErrMsg = 'Error in ReactorServices -> GetReactorLoadCountLimit: '
|
||||
@ -3674,9 +3769,12 @@ Service GetReactorLoadCountLimit(ReactNo)
|
||||
Error_Services('Add', ErrMsg)
|
||||
end
|
||||
Response = MaxLoadCount
|
||||
|
||||
end service
|
||||
|
||||
|
||||
Service GetReactorAvailChamberCount(ReactNo)
|
||||
|
||||
ErrMsg = 'Error in ReactorServices -> GetReactorAvailChamberCount: '
|
||||
AvailableChamberCount = 0
|
||||
If ReactNo NE '' then
|
||||
@ -3694,9 +3792,12 @@ Service GetReactorAvailChamberCount(ReactNo)
|
||||
Error_Services('Add', ErrMsg)
|
||||
end
|
||||
Response = AvailableChamberCount
|
||||
|
||||
end service
|
||||
|
||||
|
||||
Service RemoveRDSFromReactorLoad(RDSNo, ReactorNo, User)
|
||||
|
||||
Response = 0
|
||||
If User NE '' then
|
||||
If RDSNo NE '' then
|
||||
@ -3732,10 +3833,11 @@ Service RemoveRDSFromReactorLoad(RDSNo, ReactorNo, User)
|
||||
Error_Services('Add', 'Error in Reactor Services -> RemoveRDSFromReactorLoad: No Username was supplied.')
|
||||
end
|
||||
|
||||
|
||||
end service
|
||||
|
||||
|
||||
Service AddRDSToReactorLoad(RDSNo, ReactorNo)
|
||||
|
||||
Response = 0
|
||||
If RDSNo NE '' then
|
||||
If ReactorNo NE '' then
|
||||
@ -3762,8 +3864,8 @@ Service AddRDSToReactorLoad(RDSNo, ReactorNo)
|
||||
end else
|
||||
Error_Services('Add', 'Error in Reactor Services -> RemoveRDSFromReactorLoad: No RDS No was supplied.')
|
||||
end
|
||||
end service
|
||||
|
||||
end service
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Internal GoSubs
|
||||
|
Loading…
x
Reference in New Issue
Block a user