/// <summary> /// </summary> /// <param name="aeqp"/> /// <param name="hb"/> /// <param name="state">WaitSetup/StartSetup/EndSetup/FirstLoading/LastLoading/FirstUnloading/LastUnloading</param> /// <param name="handled"/> public void PROCESS_STATE_CHANGED0(Mozart.SeePlan.Simulation.AoEquipment aeqp, Mozart.SeePlan.Simulation.IHandlingBatch hb, Mozart.SeePlan.Simulation.ProcessStates state, ref bool handled) { FabAoEquipment eqp = aeqp.ToFabAoEquipment(); FabLot lot = hb.ToFabLot(); var now = aeqp.NowDT; if (eqp.EqpID == "THCVD300") { Console.WriteLine(); } //Setup이 있을 경우 FirstLoading이 없음. if (state == ProcessStates.FirstLoading) { DispatchLogHelper.WriteDispatchLog_ParallelChamber(eqp, lot); eqp.LastLoadingTime = now; //if (eqp.LastLoadingTime >= eqp.LastIdleStartTime) // eqp.LastIdleStartTime = DateTime.MinValue; //eqp.LastIdleRunStartTime = DateTime.MinValue; eqp.LoadCount++; } //else if (state == ProcessStates.LastLoading) //{ // eqp.LastIdleRunStartTime = now; //} //else if (state == ProcessStates.LastUnloading) //{ // eqp.LastIdleStartTime = now; //} else if (state == ProcessStates.StartSetup) { DispatchLogHelper.WriteDispatchLog_ParallelChamber(eqp, lot); } else if (state == ProcessStates.EndSetup) { eqp.LoadCount = 1; eqp.SetupCount++; //eqp.LastIdleStartTime = DateTime.MinValue; //eqp.LastIdleRunStartTime = DateTime.MinValue; } }
/// <summary> /// </summary> /// <param name="aeqp"/> /// <param name="fs"/> /// <param name="det"/> /// <param name="handled"/> public void ON_FAILURE_EVENT1(Mozart.SeePlan.Simulation.AoEquipment aeqp, Mozart.SeePlan.DataModel.FailureSchedule fs, Mozart.SeePlan.Simulation.DownEventType det, ref bool handled) { FabAoEquipment eqp = aeqp.ToFabAoEquipment(); if (det == DownEventType.End) { aeqp.Loader.Unblock(); aeqp.WriteHistoryAfterBreak(); } else { ResHelper.SetLastLoadingInfo(aeqp, null); aeqp.WriteHistory(LoadingStates.DOWN); aeqp.Loader.Block(); //eqp.AddLoadPlan(LoadStates.DOWN, aeqp.NowDT); eqp.OnStateChanged(LoadingStates.DOWN); } }
/// <summary> /// </summary> /// <param name="aeqp"/> /// <param name="proc"/> /// <param name="handled"/> public void ON_BEGIN_SETUP0(Mozart.SeePlan.Simulation.AoEquipment aeqp, Mozart.SeePlan.Simulation.AoProcess proc, ref bool handled) { FabAoEquipment eqp = aeqp.ToFabAoEquipment(); EqpDispatchInfo info = aeqp.EqpDispatchInfo; FabLot lot = proc.Entity as FabLot; bool isAheadSetup = eqp.AvailableSetupTime < aeqp.NowDT; if (isAheadSetup) { DispatchLogHelper.UpdateDispatchLogByAheadSetup(eqp, info); } if (eqp.IsAcidConst && eqp.AcidDensity.IsSetupMark) { DateTime inTime = isAheadSetup ? eqp.AvailableSetupTime : eqp.NowDT; AcidMaster.ResetAcidDensity(eqp, lot, inTime); } }
/// <summary> /// 설비 초기화를 합니다. GetEqpList 직후 호출됨 /// </summary> /// <param name="aeqp"/> /// <param name="handled"/> public void INITIALIZE_EQUIPMENT0(Mozart.SeePlan.Simulation.AoEquipment aeqp, ref bool handled) { //※ Inline 설비의 경우 설정확인 (true : ProessTime 사용, False : FlowTime 사용) aeqp.UseProcessingTime = false; //AoEqp 초기화 FabAoEquipment eqp = aeqp.ToFabAoEquipment(); var now = eqp.NowDT; eqp.LoadInfos = new List <FabLoadInfo>(); eqp.LastIdleStartTime = now; eqp.LastIdleRunStartTime = now; eqp.AvailablePMTime = DateTime.MaxValue; eqp.InitAcidDensity(); ResHelper.AddEqpByGroup(eqp); //FabEqp 초기화 FabEqp targetEqp = eqp.TargetEqp; targetEqp.InitPM(); targetEqp.SetInitEqpStatus(eqp); //패럴러챔버 초기화 if (aeqp.IsParallelChamber) { ChamberMaster.InitializeParallelChamber(eqp); } //설비상태가 Down 설정 if (targetEqp.StatusInfo.Status == ResourceState.Down) { targetEqp.State = ResourceState.Down; } }