1.Gem添加系统状态和事件
This commit is contained in:
parent
12e19d04c1
commit
67cecc4102
|
@ -12,6 +12,7 @@ using Aitex.Core.Util;
|
|||
using Aitex.Sorter.Common;
|
||||
using MECF.Framework.Common.DBCore;
|
||||
using MECF.Framework.Common.Equipment;
|
||||
using MECF.Framework.Common.Gem;
|
||||
using MECF.Framework.Common.Jobs;
|
||||
using MECF.Framework.Common.Schedulers;
|
||||
using MECF.Framework.Common.SubstrateTrackings;
|
||||
|
@ -986,6 +987,8 @@ namespace SicRT.Modules
|
|||
//_dbCallback.LotCreated(cj);
|
||||
|
||||
cj.SetState(EnumControlJobState.Executing);
|
||||
|
||||
GemManager.Instance.Equipment?.TriggerEvent("JobStarted", new string[] { "LotID" }, new object[] { cj.LotName });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1668,6 +1671,8 @@ namespace SicRT.Modules
|
|||
|
||||
_loadWaferInfo.Remove(_load.GetWaferInfo(0).WaferInnerID.ToString());
|
||||
|
||||
GemManager.Instance.Equipment?.TriggerEvent("JobCompleted", new string[] { "LotID" }, new object[] { _load.GetWaferInfo(0).LotId });
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -34,6 +34,8 @@ using SicModules.TMs;
|
|||
using SicModules.UnLoads;
|
||||
using System.Diagnostics;
|
||||
using MECF.Framework.RT.EquipmentLibrary.HardwareUnits.UnLoad;
|
||||
using Kxware.Common;
|
||||
using MECF.Framework.Common.Gem;
|
||||
|
||||
namespace SicRT.Equipments.Systems
|
||||
{
|
||||
|
@ -174,6 +176,12 @@ namespace SicRT.Equipments.Systems
|
|||
//
|
||||
private IoTC _tc = null;
|
||||
|
||||
private R_TRIG _notInitialized = new R_TRIG();
|
||||
private R_TRIG _initializing = new R_TRIG();
|
||||
private R_TRIG _idle = new R_TRIG();
|
||||
private R_TRIG _autoIdle = new R_TRIG();
|
||||
private R_TRIG _autoRunning = new R_TRIG();
|
||||
|
||||
/// <summary>
|
||||
/// 主三色灯对象。
|
||||
/// 主三色灯判断方式参考<see cref="GetMainSignalTower"/>方法。
|
||||
|
@ -895,6 +903,9 @@ namespace SicRT.Equipments.Systems
|
|||
modulesValue.PostMsg(MSG.ABORT);
|
||||
}
|
||||
}
|
||||
|
||||
GemManager.Instance.Equipment?.SetProcessState(ProcessStates.Aborting);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -1390,9 +1401,46 @@ namespace SicRT.Equipments.Systems
|
|||
{
|
||||
MonitorPmTmInfo();
|
||||
MonitorUPSAlarm();
|
||||
MonitorGemSystemState();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
private void MonitorGemSystemState()
|
||||
{
|
||||
//SetProcessState指的是整个设备的状态,会触发ProcessStateChanged事件
|
||||
|
||||
_notInitialized.CLK = FsmState == (int)RtState.Init;
|
||||
if (_notInitialized.Q)
|
||||
{
|
||||
GemManager.Instance.Equipment?.SetProcessState(ProcessStates.NotInitialized);
|
||||
}
|
||||
|
||||
_initializing.CLK = FsmState == (int)RtState.Initializing;
|
||||
if (_initializing.Q)
|
||||
{
|
||||
GemManager.Instance.Equipment?.SetProcessState(ProcessStates.Initializing);
|
||||
}
|
||||
|
||||
_idle.CLK = FsmState == (int)RtState.Idle;
|
||||
if (_idle.Q)
|
||||
{
|
||||
GemManager.Instance.Equipment?.SetProcessState(ProcessStates.Idle);
|
||||
}
|
||||
|
||||
_autoIdle.CLK = FsmState == (int)RtState.AutoIdle;
|
||||
if (_autoIdle.Q)
|
||||
{
|
||||
GemManager.Instance.Equipment?.SetProcessState(ProcessStates.Ready);
|
||||
}
|
||||
|
||||
_autoRunning.CLK = FsmState == (int)RtState.AutoRunning;
|
||||
if (_autoRunning.Q)
|
||||
{
|
||||
GemManager.Instance.Equipment?.SetProcessState(ProcessStates.Executing);
|
||||
}
|
||||
}
|
||||
|
||||
private void MonitorPmTmInfo()
|
||||
{
|
||||
if (_pm1SlitValve != null)
|
||||
|
|
|
@ -65,6 +65,7 @@
|
|||
<Reference Include="FabConnect">
|
||||
<HintPath>..\ThirdParty\MECF.Framework\FabConnect.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="KXGEM, Version=1.2.1.510, Culture=neutral, PublicKeyToken=null" />
|
||||
<Reference Include="log4net">
|
||||
<HintPath>..\ThirdParty\MECF.Framework\log4net.dll</HintPath>
|
||||
</Reference>
|
||||
|
|
Loading…
Reference in New Issue