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$>
|
PMSNo = PMRec<PM_PMS_ID$>
|
||||||
ToolID = Xlate('PM_SPEC', PMSNo, PM_SPEC_TOOL_ID$, 'X')
|
ToolID = Xlate('PM_SPEC', PMSNo, PM_SPEC_TOOL_ID$, 'X')
|
||||||
If ( (PMSNo NE '') and (ToolID NE '') ) then
|
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
|
EarlyStartDTM = IConv(Xlate('PM_SPEC', PMSNo, 'EARLY_START', 'X'), 'DT')
|
||||||
// record! This is to preserve other tool modes as the current mode such as SCHED_MTC.
|
If StartDTM GE EarlyStartDTM then
|
||||||
CurrMode = Xlate('TOOL', ToolID, 'CURR_MODE', 'X')<1,1>
|
// Only change the tool mode if the tool is in one of the modes listed in the APP_INFO*QUAL_CHANGE_MODES
|
||||||
Locate CurrMode in ChangeModes using @FM setting fPos then
|
// record! This is to preserve other tool modes as the current mode such as SCHED_MTC.
|
||||||
Reason = 'PM No. ':PMNo:' Failed'
|
CurrMode = Xlate('TOOL', ToolID, 'CURR_MODE', 'X')<1,1>
|
||||||
NewMode = 'VER_FAILED'
|
Locate CurrMode in ChangeModes using @FM setting fPos then
|
||||||
Tool_Services('ChangeToolMode', ToolID, NewMode, Reason, UserID, True$)
|
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
|
end else
|
||||||
LogData = ''
|
// It is too early to start this PM
|
||||||
LogData<1> = OConv(Datetime(), 'DT2/^H')
|
Error_Services('Add', 'Error in ':Service:' service. Too early to start PMNo ':PMNo:'.')
|
||||||
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
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -1087,3 +1093,4 @@ return
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user