|
@@ -23,6 +23,7 @@ using System.Collections;
|
|
|
using System.Collections.Generic;
|
|
|
using System.Diagnostics;
|
|
|
using System.Linq;
|
|
|
+using System.Runtime.Remoting.Metadata.W3cXsd2001;
|
|
|
|
|
|
namespace FurnaceRT.Equipments.PMs
|
|
|
{
|
|
@@ -163,7 +164,6 @@ namespace FurnaceRT.Equipments.PMs
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
- #region DataItemEnum.Reactor 模块
|
|
|
|
|
|
/// <summary>
|
|
|
/// 根据RecipeStep +StepGroup统计 累计膜厚
|
|
@@ -238,14 +238,6 @@ namespace FurnaceRT.Equipments.PMs
|
|
|
if (item == null)
|
|
|
continue;
|
|
|
Singleton<ScheduleMaintenanceDataManager>.Instance.Increase(item.Item);
|
|
|
-
|
|
|
-
|
|
|
- if (item.CurrentValue > item.StartValue && item.CurrentValue < item.LimitValue)
|
|
|
- MaintenanceProcessingCommandExec(item.MaintenanceProcessing, new AlarmReportItem(Singleton<EquipmentManager>.Instance.ReatorStepRunFreqWarning.Set, $"more than {item.StartValue} times"));
|
|
|
-
|
|
|
- if (item.CurrentValue >= item.LimitValue)
|
|
|
- MaintenanceProcessingCommandExec(item.MaintenanceProcessing, new AlarmReportItem(Singleton<EquipmentManager>.Instance.ReatorStepRunFreqAlarm.Set, $"more than {item.LimitValue} times"));
|
|
|
-
|
|
|
}
|
|
|
|
|
|
}
|
|
@@ -287,50 +279,117 @@ namespace FurnaceRT.Equipments.PMs
|
|
|
}
|
|
|
|
|
|
|
|
|
- #endregion
|
|
|
|
|
|
- #region 检查是否超过设定值
|
|
|
+ /// <summary>
|
|
|
+ /// 检查 RecipeStep 累计时间是否超限
|
|
|
+ /// </summary>
|
|
|
+ /// <param name="stepName"></param>
|
|
|
+ /// <param name="isPause"></param>
|
|
|
+ public void CheckRecipeStepTimeMoreThan(string stepName, out bool isPause)
|
|
|
+ {
|
|
|
+
|
|
|
+ var stepNo = stepName.Split(':').FirstOrDefault();
|
|
|
+ var item = Singleton<ScheduleMaintenanceDataManager>.Instance.Item.Values
|
|
|
+ .Where(a => a.Path == $"{DataItemEnum.Reactor}.{ReactorsEnum.StepRunFreq}" && a.AdditionInformationDisplay == stepNo)
|
|
|
+ .FirstOrDefault();
|
|
|
+
|
|
|
+
|
|
|
+ CheckRecipeMoreThan(
|
|
|
+ stepNo,
|
|
|
+ Singleton<EquipmentManager>.Instance.ReatorStepRunTimeWarning.Set,
|
|
|
+ Singleton<EquipmentManager>.Instance.ReatorStepRunTimeAlarm.Set,
|
|
|
+ item,
|
|
|
+ "HH:mm",
|
|
|
+ out isPause);
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ /// <summary>
|
|
|
+ /// RecipeStep 累计次数是否超限
|
|
|
+ /// </summary>
|
|
|
+ /// <param name="stepName"></param>
|
|
|
+ /// <param name="isPause"></param>
|
|
|
+ public void CheckRecipeStepFreqMoreThan(string stepName, out bool isPause)
|
|
|
+ {
|
|
|
+
|
|
|
+ var stepNo = stepName.Split(':').FirstOrDefault();
|
|
|
+ var item = Singleton<ScheduleMaintenanceDataManager>.Instance.Item.Values
|
|
|
+ .Where(a => a.Path == $"{DataItemEnum.Reactor}.{ReactorsEnum.StepRunFreq}" && a.AdditionInformationDisplay == stepNo)
|
|
|
+ .FirstOrDefault();
|
|
|
+
|
|
|
+
|
|
|
+ CheckRecipeMoreThan(
|
|
|
+ stepNo,
|
|
|
+ Singleton<EquipmentManager>.Instance.ReatorStepRunFreqWarning.Set,
|
|
|
+ Singleton<EquipmentManager>.Instance.ReatorStepRunFreqAlarm.Set,
|
|
|
+ item,
|
|
|
+ "times",
|
|
|
+ out isPause);
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ /// <summary>
|
|
|
+ /// 检查Recipe执行 累计次数是否超限
|
|
|
+ /// </summary>
|
|
|
+ /// <param name="recipeName"></param>
|
|
|
+ /// <param name="isPause"></param>
|
|
|
public void CheckRecipeExecuteFreqMoreThan(string recipeName, out bool isPause)
|
|
|
{
|
|
|
+
|
|
|
+ var item = Singleton<ScheduleMaintenanceDataManager>.Instance.Item.Values
|
|
|
+ .FirstOrDefault(a =>
|
|
|
+ a.Item == MaintenanceItemEnum.RecipeExecuteFreq.ToString() &&
|
|
|
+ a.Path == $"{DataItemEnum.Reactor}.{ReactorsEnum.Recipe}" &&
|
|
|
+ a.AdditionInformationDisplay == recipeName);
|
|
|
+
|
|
|
+
|
|
|
CheckRecipeMoreThan(
|
|
|
recipeName,
|
|
|
- MaintenanceItemEnum.RecipeExecuteFreq.ToString(),
|
|
|
Singleton<EquipmentManager>.Instance.RecipeExecuteFreqWarning.Set,
|
|
|
Singleton<EquipmentManager>.Instance.RecipeExecuteFreqAlarm.Set,
|
|
|
+ item,
|
|
|
"times",
|
|
|
- out isPause);
|
|
|
+ out isPause, true);
|
|
|
}
|
|
|
-
|
|
|
+ /// <summary>
|
|
|
+ /// 检查Recipe执行 累计膜厚是否超限
|
|
|
+ /// </summary>
|
|
|
+ /// <param name="recipeName"></param>
|
|
|
+ /// <param name="isPause"></param>
|
|
|
public void CheckRecipeThicknessMoreThan(string recipeName, out bool isPause)
|
|
|
{
|
|
|
+ var item = Singleton<ScheduleMaintenanceDataManager>.Instance.Item.Values
|
|
|
+ .FirstOrDefault(a =>
|
|
|
+ a.Item == MaintenanceItemEnum.RecipeThickness.ToString() &&
|
|
|
+ a.Path == $"{DataItemEnum.Reactor}.{ReactorsEnum.Recipe}" &&
|
|
|
+ a.AdditionInformationDisplay == recipeName);
|
|
|
+
|
|
|
+
|
|
|
CheckRecipeMoreThan(
|
|
|
recipeName,
|
|
|
- MaintenanceItemEnum.RecipeThickness.ToString(),
|
|
|
Singleton<EquipmentManager>.Instance.RecipeThicknessWarning.Set,
|
|
|
Singleton<EquipmentManager>.Instance.RecipeThicknessAlarm.Set,
|
|
|
+ item,
|
|
|
"Å",
|
|
|
- out isPause);
|
|
|
+ out isPause,true);
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+
|
|
|
private void CheckRecipeMoreThan(
|
|
|
- string recipeName,
|
|
|
- string maintenanceItemType,
|
|
|
- Action<string> warningSetId,
|
|
|
- Action<string> alarmSetId,
|
|
|
- string unit,
|
|
|
- out bool isPause)
|
|
|
+ string recipeName,
|
|
|
+ Action<string> warningSetId,
|
|
|
+ Action<string> alarmSetId,
|
|
|
+ ScheduleMaintenanceDataItem item,
|
|
|
+ string unit,
|
|
|
+ out bool isPause,
|
|
|
+ bool isEnableJobAutoStart = false)
|
|
|
{
|
|
|
isPause = false;
|
|
|
|
|
|
if (string.IsNullOrEmpty(recipeName))
|
|
|
return;
|
|
|
|
|
|
- var item = Singleton<ScheduleMaintenanceDataManager>.Instance.Item.Values
|
|
|
- .FirstOrDefault(a =>
|
|
|
- a.Item == maintenanceItemType &&
|
|
|
- a.Path == $"{DataItemEnum.Reactor}.{ReactorsEnum.Recipe}" &&
|
|
|
- a.AdditionInformationDisplay == recipeName);
|
|
|
-
|
|
|
if (item == null || !Enum.TryParse<MaintenanceProcessingCommandEnum>(item.MaintenanceProcessing, out var command))
|
|
|
return;
|
|
|
|
|
@@ -347,151 +406,28 @@ namespace FurnaceRT.Equipments.PMs
|
|
|
if (item.CurrentValue >= item.LimitValue)
|
|
|
{
|
|
|
ExecuteAlarm(alarmAction, ref isPause);
|
|
|
-
|
|
|
- switch (command)
|
|
|
+ if (isEnableJobAutoStart)
|
|
|
{
|
|
|
- case MaintenanceProcessingCommandEnum.JobAutoStart:
|
|
|
- if (string.IsNullOrEmpty(item.AssociationProcessRecipeName))
|
|
|
- {
|
|
|
- ExecuteAlarm(new AlarmReportItem(alarmSetId, nullMessage), ref isPause);
|
|
|
- return;
|
|
|
- }
|
|
|
- CheckToPostMessage((int)MSG.RunOtherRecipe, item.AssociationProcessRecipeName, "Process");
|
|
|
- break;
|
|
|
+ switch (command)
|
|
|
+ {
|
|
|
+ case MaintenanceProcessingCommandEnum.JobAutoStart:
|
|
|
+ if (string.IsNullOrEmpty(item.AssociationProcessRecipeName))
|
|
|
+ {
|
|
|
+ ExecuteAlarm(new AlarmReportItem(alarmSetId, nullMessage), ref isPause);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ CheckToPostMessage((int)MSG.RunOtherRecipe, item.AssociationProcessRecipeName, "Process");
|
|
|
+ break;
|
|
|
+ }
|
|
|
}
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
private void ExecuteAlarm(AlarmReportItem alarmAction, ref bool isPause)
|
|
|
{
|
|
|
alarmAction.Exec();
|
|
|
isPause = true;
|
|
|
}
|
|
|
-
|
|
|
- //public void CheckRecipeExecuteFreqMoreThan(string recipeName, out bool isPause)
|
|
|
- //{
|
|
|
- // isPause = false;
|
|
|
-
|
|
|
- // if (string.IsNullOrEmpty(recipeName))
|
|
|
- // return;
|
|
|
- // var item = Singleton<ScheduleMaintenanceDataManager>.Instance.Item.Values
|
|
|
- // .FirstOrDefault(a =>
|
|
|
- // a.Item == MaintenanceItemEnum.RecipeExecuteFreq.ToString() &&
|
|
|
- // a.Path == $"{DataItemEnum.Reactor}.{ReactorsEnum.Recipe}" &&
|
|
|
- // a.AdditionInformationDisplay == recipeName);
|
|
|
-
|
|
|
- // if (item != null)
|
|
|
- // {
|
|
|
- // string message = $"{item.AdditionInformationDisplay} {item.CurrentValue} more than {item.StartValue} times";
|
|
|
- // string nullMessage = $"No recipe file associated, unable to trigger JobAutoStart";
|
|
|
- // var warningAction = new AlarmReportItem(Singleton<EquipmentManager>.Instance.RecipeExecuteFreqWarning.Set, message);
|
|
|
- // var alarmAction = new AlarmReportItem(Singleton<EquipmentManager>.Instance.RecipeExecuteFreqAlarm.Set, message);
|
|
|
-
|
|
|
-
|
|
|
- // if (Enum.TryParse<MaintenanceProcessingCommandEnum>(item.MaintenanceProcessing, out var command))
|
|
|
- // {
|
|
|
- // bool isWarning = item.CurrentValue > item.StartValue && item.CurrentValue < item.LimitValue;
|
|
|
- // bool isAlarm = item.CurrentValue >= item.LimitValue;
|
|
|
- // switch (command)
|
|
|
- // {
|
|
|
- // case MaintenanceProcessingCommandEnum.AlarmReport:
|
|
|
- // if (isWarning)
|
|
|
- // warningAction.Exec();
|
|
|
-
|
|
|
- // if (isAlarm)
|
|
|
- // {
|
|
|
- // alarmAction.Exec();
|
|
|
- // isPause = true;
|
|
|
- // }
|
|
|
- // break;
|
|
|
-
|
|
|
- // case MaintenanceProcessingCommandEnum.JobAutoStart:
|
|
|
- // if (isWarning)
|
|
|
- // warningAction.Exec();
|
|
|
-
|
|
|
- // if (isAlarm)
|
|
|
- // {
|
|
|
- // alarmAction.Exec();
|
|
|
- // if (string.IsNullOrEmpty(item.AssociationProcessRecipeName))
|
|
|
- // {
|
|
|
- // alarmAction.Exec(nullMessage);
|
|
|
- // isPause = true;
|
|
|
- // return;
|
|
|
- // }
|
|
|
- // CheckToPostMessage((int)MSG.RunOtherRecipe, item.AssociationProcessRecipeName, "Process");
|
|
|
- // isPause = true;
|
|
|
- // }
|
|
|
- // break;
|
|
|
-
|
|
|
- // }
|
|
|
- // }
|
|
|
-
|
|
|
- // }
|
|
|
-
|
|
|
- //}
|
|
|
-
|
|
|
- //public void CheckRecipeThicknessMoreThan(string recipeName, out bool isPause)
|
|
|
- //{
|
|
|
- // isPause = false;
|
|
|
-
|
|
|
- // if (string.IsNullOrEmpty(recipeName))
|
|
|
- // return;
|
|
|
- // var item = Singleton<ScheduleMaintenanceDataManager>.Instance.Item.Values
|
|
|
- // .FirstOrDefault(a =>
|
|
|
- // a.Item == MaintenanceItemEnum.RecipeThickness.ToString() &&
|
|
|
- // a.Path == $"{DataItemEnum.Reactor}.{ReactorsEnum.Recipe}" &&
|
|
|
- // a.AdditionInformationDisplay == recipeName);
|
|
|
-
|
|
|
- // if (item != null)
|
|
|
- // {
|
|
|
- // string message = $"{item.AdditionInformationDisplay} {item.CurrentValue} more than {item.StartValue} Å";
|
|
|
- // string nullMessage = $"No recipe file associated, unable to trigger JobAutoStart";
|
|
|
- // var warningAction = new AlarmReportItem(Singleton<EquipmentManager>.Instance.RecipeThicknessWarning.Set, message);
|
|
|
- // var alarmAction = new AlarmReportItem(Singleton<EquipmentManager>.Instance.RecipeThicknessAlarm.Set, message);
|
|
|
-
|
|
|
-
|
|
|
- // if (Enum.TryParse<MaintenanceProcessingCommandEnum>(item.MaintenanceProcessing, out var command))
|
|
|
- // {
|
|
|
- // bool isWarning = item.CurrentValue > item.StartValue && item.CurrentValue < item.LimitValue;
|
|
|
- // bool isAlarm = item.CurrentValue >= item.LimitValue;
|
|
|
- // switch (command)
|
|
|
- // {
|
|
|
- // case MaintenanceProcessingCommandEnum.AlarmReport:
|
|
|
- // if (isWarning)
|
|
|
- // warningAction.Exec();
|
|
|
-
|
|
|
- // if (isAlarm)
|
|
|
- // {
|
|
|
- // alarmAction.Exec();
|
|
|
- // isPause = true;
|
|
|
- // }
|
|
|
- // break;
|
|
|
-
|
|
|
- // case MaintenanceProcessingCommandEnum.JobAutoStart:
|
|
|
- // if (isWarning)
|
|
|
- // warningAction.Exec();
|
|
|
-
|
|
|
- // if (isAlarm)
|
|
|
- // {
|
|
|
- // alarmAction.Exec();
|
|
|
- // if (string.IsNullOrEmpty(item.AssociationProcessRecipeName))
|
|
|
- // {
|
|
|
- // alarmAction.Exec(nullMessage);
|
|
|
- // isPause = true;
|
|
|
- // return;
|
|
|
- // }
|
|
|
- // CheckToPostMessage((int)MSG.RunOtherRecipe, item.AssociationProcessRecipeName, "Process");
|
|
|
- // isPause = true;
|
|
|
- // }
|
|
|
- // break;
|
|
|
-
|
|
|
- // }
|
|
|
- // }
|
|
|
-
|
|
|
- // }
|
|
|
-
|
|
|
- //}
|
|
|
-
|
|
|
- #endregion
|
|
|
}
|
|
|
}
|