Added in a check to logging a PM failure to
prevent early failure logging. Similar to how logging successes function.
This commit is contained in:
parent
1879a415a1
commit
7a389414c5
@ -426,20 +426,26 @@ Service FailedPM(PMNo, UserID, StartDTM)
|
||||
PMSNo = PMRec<PM_PMS_ID$>
|
||||
ToolID = Xlate('PM_SPEC', PMSNo, PM_SPEC_TOOL_ID$, 'X')
|
||||
If ( (PMSNo NE '') and (ToolID NE '') ) then
|
||||
// Only change the tool mode if the tool is in one of the modes listed in the APP_INFO*QUAL_CHANGE_MODES
|
||||
// record! This is to preserve other tool modes as the current mode such as SCHED_MTC.
|
||||
CurrMode = Xlate('TOOL', ToolID, 'CURR_MODE', 'X')<1,1>
|
||||
Locate CurrMode in ChangeModes using @FM setting fPos then
|
||||
Reason = 'PM No. ':PMNo:' Failed'
|
||||
NewMode = 'VER_FAILED'
|
||||
Tool_Services('ChangeToolMode', ToolID, NewMode, Reason, UserID, True$)
|
||||
EarlyStartDTM = IConv(Xlate('PM_SPEC', PMSNo, 'EARLY_START', 'X'), 'DT')
|
||||
If StartDTM GE EarlyStartDTM then
|
||||
// Only change the tool mode if the tool is in one of the modes listed in the APP_INFO*QUAL_CHANGE_MODES
|
||||
// record! This is to preserve other tool modes as the current mode such as SCHED_MTC.
|
||||
CurrMode = Xlate('TOOL', ToolID, 'CURR_MODE', 'X')<1,1>
|
||||
Locate CurrMode in ChangeModes using @FM setting fPos then
|
||||
Reason = 'PM No. ':PMNo:' Failed'
|
||||
NewMode = 'VER_FAILED'
|
||||
Tool_Services('ChangeToolMode', ToolID, NewMode, Reason, UserID, True$)
|
||||
end else
|
||||
LogData = ''
|
||||
LogData<1> = OConv(Datetime(), 'DT2/^H')
|
||||
LogData<2> = ToolID
|
||||
LogData<3> = 'Unable to locate curr mode in the list of modes to change from.'
|
||||
LogData<4> = ''
|
||||
Logging_Services('AppendLog', objLog, LogData, @RM, @FM)
|
||||
end
|
||||
end else
|
||||
LogData = ''
|
||||
LogData<1> = OConv(Datetime(), 'DT2/^H')
|
||||
LogData<2> = ToolID
|
||||
LogData<3> = 'Unable to locate curr mode in the list of modes to change from.'
|
||||
LogData<4> = ''
|
||||
Logging_Services('AppendLog', objLog, LogData, @RM, @FM)
|
||||
// It is too early to start this PM
|
||||
Error_Services('Add', 'Error in ':Service:' service. Too early to start PMNo ':PMNo:'.')
|
||||
end
|
||||
end
|
||||
end
|
||||
@ -1087,3 +1093,4 @@ return
|
||||
|
||||
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user