diff --git a/Modules/Mainframe/Config/PM/PM1/ProcessDeviceItemsPM1.xml b/Modules/Mainframe/Config/PM/PM1/ProcessDeviceItemsPM1.xml
index 46bd386a..cb434248 100644
--- a/Modules/Mainframe/Config/PM/PM1/ProcessDeviceItemsPM1.xml
+++ b/Modules/Mainframe/Config/PM/PM1/ProcessDeviceItemsPM1.xml
@@ -8,7 +8,7 @@
-
+
@@ -27,10 +27,15 @@
-
-
-
-
+
+
+
+
+
+
+
+
+
@@ -44,7 +49,7 @@
-
+
@@ -54,14 +59,14 @@
-
+
-
+
@@ -101,10 +106,10 @@
-
-
-
+
+
+
@@ -118,8 +123,8 @@
-
-
-
+
+
+
diff --git a/Modules/Mainframe/Config/PM/PM2/ProcessDeviceItemsPM2.xml b/Modules/Mainframe/Config/PM/PM2/ProcessDeviceItemsPM2.xml
index c2ee495c..eecb5cf9 100644
--- a/Modules/Mainframe/Config/PM/PM2/ProcessDeviceItemsPM2.xml
+++ b/Modules/Mainframe/Config/PM/PM2/ProcessDeviceItemsPM2.xml
@@ -8,7 +8,7 @@
-
+
@@ -27,10 +27,15 @@
-
-
-
-
+
+
+
+
+
+
+
+
+
@@ -44,7 +49,7 @@
-
+
@@ -54,14 +59,14 @@
-
+
-
+
@@ -100,7 +105,7 @@
-
+
@@ -114,8 +119,8 @@
-
-
-
+
+
+
diff --git a/Modules/Mainframe/PMs/PMModule.cs b/Modules/Mainframe/PMs/PMModule.cs
index 070325d3..10750345 100644
--- a/Modules/Mainframe/PMs/PMModule.cs
+++ b/Modules/Mainframe/PMs/PMModule.cs
@@ -1326,7 +1326,7 @@ namespace SicModules.PMs
WaferManager.Instance.UpdateWaferProcessStatus(ModuleHelper.Converter(Module), 0, WaferProcessStatus.Completed);
_processRoutine.ExitProcess();
_procDataStatManager?.End();
- EV.PostInfoLog(Module, $"Exit Process: Recipe Name {_recipeRunningInfo.RecipeName},Recipe Step:{_recipeRunningInfo.StepNumber},Step Time:{_recipeRunningInfo.StepTime}");
+ EV.PostInfoLog(Module, $"Exit Process: Recipe Name {_recipeRunningInfo.RecipeName},Recipe Step:{_recipeRunningInfo.StepNumber},Step Time:{string.Format("{0:F2}", _recipeRunningInfo.StepTime)}");
}
var workenable = SC.GetValue("System.MultiProcessMode");
diff --git a/Modules/Mainframe/PMs/PMModuleDevice.cs b/Modules/Mainframe/PMs/PMModuleDevice.cs
index a8a735d3..9ad321fc 100644
--- a/Modules/Mainframe/PMs/PMModuleDevice.cs
+++ b/Modules/Mainframe/PMs/PMModuleDevice.cs
@@ -2009,6 +2009,19 @@ namespace SicModules.PMs
return 0;
}
+ ///
+ /// 获取管道压力
+ ///
+ ///
+ public double GetForelinePressure()
+ {
+ if (PT2 != null)
+ {
+ return PT2.FeedBack;
+ }
+ return 0;
+ }
+
///
/// 初始化Device的委托
///
diff --git a/Modules/Mainframe/PMs/RecipeExecutions/Process.cs b/Modules/Mainframe/PMs/RecipeExecutions/Process.cs
index 5a1c4bf4..f99c3f55 100644
--- a/Modules/Mainframe/PMs/RecipeExecutions/Process.cs
+++ b/Modules/Mainframe/PMs/RecipeExecutions/Process.cs
@@ -135,6 +135,8 @@ namespace SicModules.PMs.RecipeExecutions
private int _currentStepIndex = 99;
private IoInterLock _pmInterLock;
+ private double _pressureDifferenceUpperLimit;
+
#region Parse
private bool _isPSUHeaterJumpMode;
@@ -162,9 +164,11 @@ namespace SicModules.PMs.RecipeExecutions
public Process(ModuleName module, PMModule pm1) : base(module, pm1)
{
+
+
Module = module.ToString();
Name = "Process";
-
+
_dbCallback = new RecipeDBCallback();
_fdc = new Fdc(Module);
_pmInterLock = DEVICE.GetDevice($"{Module}.PMInterLock");
@@ -186,6 +190,8 @@ namespace SicModules.PMs.RecipeExecutions
Calculte();
+ SC.RegisterValueChangedCallback($"PM.{Module}.PT1PT2PressureDifferenceUpperLimit", (obj) => { _pressureDifferenceUpperLimit = (double)obj; });
+
_thread = new PeriodicJob(10 * 1000, Calculte, "Calculte Standard Deviation", false);
}
@@ -229,6 +235,7 @@ namespace SicModules.PMs.RecipeExecutions
_isDryRun = SC.GetValue($"PM.{Module}.DryRun.IsDryRun");
_delayTimeDryRun = SC.GetValue($"PM.{Module}.DryRun.DryRunDelayTime");
_tempOffset = SC.GetValue($"PM.{Module}.Process.TempOffset");
+ _pressureDifferenceUpperLimit = SC.GetValue($"PM.{Module}.PT1PT2PressureDifferenceUpperLimit");
ResetHeaterResCheckResult();
@@ -243,6 +250,7 @@ namespace SicModules.PMs.RecipeExecutions
private readonly R_TRIG _trigHeaterResOutOfRange = new();
private readonly R_TRIG _trigHeaterResMonitorBegin = new();
private readonly R_TRIG _trigHeaterResMonitorEnd = new();
+ private readonly R_TRIG _trigPressureDifference = new();
private void ResetHeaterResCheckResult()
@@ -250,6 +258,7 @@ namespace SicModules.PMs.RecipeExecutions
_trigHeaterResOutOfRange.RST = true;
_trigHeaterResMonitorBegin.RST = true;
_trigHeaterResMonitorEnd.RST = true;
+ _trigPressureDifference.RST = true;
}
private void MonitorHeaterResistance()
@@ -309,6 +318,27 @@ namespace SicModules.PMs.RecipeExecutions
}
}
+ private void PressureDifferenceDetection()
+ {
+ double pt1 = PmDevice.GetChamberPressure();
+
+ double pt2 = PmDevice.GetForelinePressure();
+
+ double d = Math.Abs(pt1 - pt2);
+ if (d >= _pressureDifferenceUpperLimit)
+ _trigPressureDifference.CLK = true;
+
+ if (_trigPressureDifference.Q)
+ {
+ string reason = $"PT1={pt1} PT2={pt2},Difference {d} over DifferenceMax={_pressureDifferenceUpperLimit} ";
+ var alarmLevel = SC.SafeGetStringValue($"PM.{Module}.PT1PT2PressureDifferenceMaxAlarmLevel", "Alarm");
+ if (alarmLevel == "Alarm")
+ Stop(reason);
+ else
+ EV.PostWarningLog(Module, reason);
+ }
+ }
+
#endregion
public override Result Monitor()
@@ -346,6 +376,8 @@ namespace SicModules.PMs.RecipeExecutions
MonitorHeaterResistance();
+ PressureDifferenceDetection();
+
lock (_recipeLocker)
{
try
diff --git a/Modules/Mainframe/PMs/Routines/Base/PMBaseRoutine.cs b/Modules/Mainframe/PMs/Routines/Base/PMBaseRoutine.cs
index dc32c52e..1636b3f9 100644
--- a/Modules/Mainframe/PMs/Routines/Base/PMBaseRoutine.cs
+++ b/Modules/Mainframe/PMs/Routines/Base/PMBaseRoutine.cs
@@ -2,9 +2,11 @@
using System.Collections.Generic;
using Aitex.Core.Common.DeviceData;
using Aitex.Core.RT.Device.Devices;
+using Aitex.Core.RT.Event;
using Aitex.Core.RT.Routine;
using MECF.Framework.Common.Equipment;
using MECF.Framework.RT.EquipmentLibrary.HardwareUnits.PMs;
+using static Aitex.Core.RT.Device.PmDevices.DicMode;
namespace SicModules.PMs.Routines.Base
{
@@ -705,7 +707,8 @@ namespace SicModules.PMs.Routines.Base
Tuple ret = Execute(id, () =>
{
Notify($"Set PSU HeatMode");
- if (!_pm.TC1.SetHeaterMode(mode,0))
+ var fixedMode = FixHeaterModeDiff(mode, "PSU");
+ if (!_pm.TC1.SetHeaterMode((int)fixedMode,0))
{
Stop($"Set PSU HeatMode error");
return false;
@@ -777,7 +780,8 @@ namespace SicModules.PMs.Routines.Base
Tuple ret = Execute(id, () =>
{
Notify($"Set SCR HeatMode");
- if (!_pm.TC2.SetHeaterMode2(mode,0))
+ var fixedMode = FixHeaterModeDiff(mode, "SCR");
+ if (!_pm.TC2.SetHeaterMode2((int)fixedMode, 0))
{
Stop($"Set SCR HeatMode error");
return false;
@@ -2170,5 +2174,32 @@ namespace SicModules.PMs.Routines.Base
throw (new RoutineBreakException());
}
}
+
+ ///
+ /// 修正SystemConfig中配置的PSU、SCR Heat Mode 和 枚举不匹配的问题。
+ ///
+ ///
+ ///
+ ///
+ private HeaterControlMode FixHeaterModeDiff(int mode, string scItemName)
+ {
+ var fixedMode = HeaterControlMode.Power;
+ switch (mode)
+ {
+ // System config: 0:Power
+ case 0:
+ fixedMode = HeaterControlMode.Power;
+ break;
+ // System config: 1:Pyro
+ case 1:
+ fixedMode = HeaterControlMode.Pyro;
+ break;
+ default:
+ EV.PostWarningLog(Module, $"{scItemName}, Unknown Heat Mode {mode},use default mode [Power].");
+ break;
+ }
+
+ return fixedMode;
+ }
}
}
diff --git a/Modules/Mainframe/PMs/Routines/PMToProcessIdleRoutine.cs b/Modules/Mainframe/PMs/Routines/PMToProcessIdleRoutine.cs
index 0d5b69db..6c7c5c2f 100644
--- a/Modules/Mainframe/PMs/Routines/PMToProcessIdleRoutine.cs
+++ b/Modules/Mainframe/PMs/Routines/PMToProcessIdleRoutine.cs
@@ -7,6 +7,7 @@ using Aitex.Core.RT.Routine;
using Aitex.Core.RT.SCCore;
using MECF.Framework.Common.Equipment;
using SicModules.PMs.Routines.Base;
+using static Aitex.Core.RT.Device.PmDevices.DicMode;
namespace SicModules.PMs.Routines
{
@@ -248,7 +249,7 @@ namespace SicModules.PMs.Routines
_throttleFinalPressure = SC.GetValue($"PM.{Module}.ProcessIdle.FinalPressure");
_psuHeatEnable = SC.GetValue($"PM.{Module}.ProcessIdle.PSUHeaterEnable");
- _psuHeatMode = (int)SC.GetValue($"PM.{Module}.ProcessIdle.PSUHeaterMode");
+ _psuHeatMode = SC.GetValue($"PM.{Module}.ProcessIdle.PSUHeaterMode");
_psuL1Ratio = (float)SC.GetValue($"PM.{Module}.ProcessIdle.PSUInnerRatio");
_psuL2Ratio = (float)SC.GetValue($"PM.{Module}.ProcessIdle.PSUMiddleRatio");
_psuL3Ratio = (float)SC.GetValue($"PM.{Module}.ProcessIdle.PSUOuterRatio");
diff --git a/SicRT/Config/DBModel.sql b/SicRT/Config/DBModel.sql
index 15eae225..48274cde 100644
--- a/SicRT/Config/DBModel.sql
+++ b/SicRT/Config/DBModel.sql
@@ -872,15 +872,15 @@ if not exists(select * from information_schema.tables
if not exists(select * from information_schema.tables
where
table_catalog = CURRENT_CATALOG and table_schema = CURRENT_SCHEMA
- and table_name = 'maintainance_event_data') then
+ and table_name = 'maintenance_event_data') then
- CREATE TABLE maintainance_event_data
+ CREATE TABLE maintenance_event_data
(
"planname" text ,
"planmodule" text ,
"itemparentname" text ,
"itemname" text ,
- "index" integer ,
+ "uid" text ,
"createtime" timestamp ,
"role" text ,
"detial" text
@@ -888,9 +888,9 @@ if not exists(select * from information_schema.tables
WITH (
OIDS=FALSE
);
- ALTER TABLE maintainance_event_data
+ ALTER TABLE maintenance_event_data
OWNER TO postgres;
- GRANT SELECT ON TABLE maintainance_event_data TO postgres;
+ GRANT SELECT ON TABLE maintenance_event_data TO postgres;
end if;
------------------------------------------------------------------------------------------------
if not exists(select * from information_schema.tables
diff --git a/SicRT/Config/Menu.xml b/SicRT/Config/Menu.xml
index 29d992d1..a2f6fe53 100644
--- a/SicRT/Config/Menu.xml
+++ b/SicRT/Config/Menu.xml
@@ -70,7 +70,7 @@
-