diff --git a/.gitignore b/.gitignore
index f470074..280af97 100644
--- a/.gitignore
+++ b/.gitignore
@@ -362,3 +362,4 @@ MigrationBackup/
# Fody - auto-generated XML schema
FodyWeavers.xsd
/.svn
+FrameworkLocal/output/
diff --git a/SicRT/Config/System.sccfg b/SicRT/Config/System.sccfg
index 5eb5563..08002fd 100644
--- a/SicRT/Config/System.sccfg
+++ b/SicRT/Config/System.sccfg
@@ -18,11 +18,12 @@
-
-
-
+
+
+
+
diff --git a/SicRT/Equipments/Systems/EquipmentManager.cs b/SicRT/Equipments/Systems/EquipmentManager.cs
index 86d8954..a0f579f 100644
--- a/SicRT/Equipments/Systems/EquipmentManager.cs
+++ b/SicRT/Equipments/Systems/EquipmentManager.cs
@@ -421,6 +421,7 @@ namespace SicRT.Equipments.Systems
DATA.Subscribe("System.IsAutoRunning", () => IsRunning);
DATA.Subscribe("System.Modules", () => _modules);
DATA.Subscribe("System.LiveAlarmEvent", () => EV.GetAlarmEvent());
+ DATA.Subscribe("System.IsEngMode", () => _isEngMode);
}
void SubscribeOperation()
@@ -1256,23 +1257,50 @@ namespace SicRT.Equipments.Systems
MonitorPmTmInfo();
MonitorUPSAlarm();
//MonitorAETemp();
+ MonitorEngMode();
return true;
}
- //public void MonitorModuleAlarm()
- //{
- // var alarms = EV.GetAlarmEvent();
- // if (alarms != null && StringFsmStatus != "Initializing")
- // {
- // foreach (var modulesNa in Modules.Keys)
- // {
- // if (alarms.FindAll(a => a.Level == EventLevel.Alarm && a.Source == modulesNa.ToString()).Count > 0 && Modules[modulesNa].StringFsmStatus.ToLower() != "error")
- // {
- // Modules[modulesNa].PostMsg(MSG.ERROR);
- // }
- // }
- // }
- //}
+ private bool _isEngMode;
+ private readonly DeviceTimer _timEngModeTimeout = new DeviceTimer();
+ private readonly R_TRIG _trigEngModeEntered = new R_TRIG();
+ private readonly R_TRIG _trigEngModeLeft = new R_TRIG();
+
+ private void MonitorEngMode()
+ {
+ var isBypassInterlock = SC.GetValue("System.BypassInterlock");
+
+ _trigEngModeEntered.CLK = isBypassInterlock;
+ _trigEngModeLeft.CLK = isBypassInterlock == false;
+
+ // InterlockBypass 变为 true
+ if (_trigEngModeEntered.Q)
+ {
+ // 获取互锁旁路超时,最小值限定5s
+ var timeout = SC.GetValue("System.BypassInterlockTimeout");
+ if (timeout <= 5)
+ timeout = 5;
+
+ _isEngMode = true;
+ _timEngModeTimeout.Restart(timeout * 1000);
+ EV.PostInfoLog(Name, "Interlock is bypassed");
+ }
+
+ // InterlockBypass 变为 false
+ if (_trigEngModeLeft.Q)
+ {
+ _isEngMode = false;
+ EV.PostInfoLog(Name, "Interlock is resumed");
+ }
+
+ // Eng Mode 超时
+ if (_timEngModeTimeout.IsTimeout())
+ {
+ _timEngModeTimeout.Stop();
+ SC.SetItemValue("System.BypassInterlock", false);
+ EV.PostInfoLog(Name, "Interlock bypass timeout");
+ }
+ }
private void MonitorPmTmInfo()
diff --git a/SicUI/Converter/EngModeToBdColorConverter.cs b/SicUI/Converter/EngModeToBdColorConverter.cs
new file mode 100644
index 0000000..0d8100c
--- /dev/null
+++ b/SicUI/Converter/EngModeToBdColorConverter.cs
@@ -0,0 +1,28 @@
+using System;
+using System.Globalization;
+using System.Windows.Data;
+using System.Windows.Media;
+
+namespace SicUI.Converter
+{
+ ///
+ /// EngMode转换为主界面边框颜色
+ ///
+ internal class EngModeToBdColorConverter : IValueConverter
+ {
+ public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
+ {
+ if (value is bool isEngMode)
+ {
+ return isEngMode ? new SolidColorBrush(Colors.OrangeRed) : new SolidColorBrush(Colors.LightCyan);
+ }
+
+ return new SolidColorBrush(Colors.Red);
+ }
+
+ public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
+ {
+ throw new NotImplementedException();
+ }
+ }
+}
diff --git a/SicUI/Converter/EngModeToBdThicknessConverter.cs b/SicUI/Converter/EngModeToBdThicknessConverter.cs
new file mode 100644
index 0000000..c018e3d
--- /dev/null
+++ b/SicUI/Converter/EngModeToBdThicknessConverter.cs
@@ -0,0 +1,31 @@
+using System;
+using System.Globalization;
+using System.Windows;
+using System.Windows.Data;
+
+namespace SicUI.Converter
+{
+ ///
+ /// EngMode转换为主界面边框宽度
+ ///
+ internal class EngModeToBdThicknessConverter : IValueConverter
+ {
+ public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
+ {
+ /*
+ if (value is bool isEngMode)
+ {
+ return isEngMode ? new Thickness(5) : new Thickness(2);
+ }
+ */
+
+ return new Thickness(2);
+ }
+
+ public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
+ {
+ throw new NotImplementedException();
+ }
+ }
+}
+
diff --git a/SicUI/Converter/EngModeToBgWatermarkVisibilityConverter.cs b/SicUI/Converter/EngModeToBgWatermarkVisibilityConverter.cs
new file mode 100644
index 0000000..10f2095
--- /dev/null
+++ b/SicUI/Converter/EngModeToBgWatermarkVisibilityConverter.cs
@@ -0,0 +1,28 @@
+using System;
+using System.Globalization;
+using System.Windows;
+using System.Windows.Data;
+
+namespace SicUI.Converter
+{
+ ///
+ /// EngMode转换为主界面背景水印显示状态
+ ///
+ internal class EngModeToBgWatermarkVisibilityConverter : IValueConverter
+ {
+ public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
+ {
+ if (value is bool isEngMode)
+ {
+ return isEngMode ? Visibility.Visible : Visibility.Hidden;
+ }
+
+ return Visibility.Visible;
+ }
+
+ public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
+ {
+ throw new NotImplementedException();
+ }
+ }
+}
diff --git a/SicUI/MainView.xaml b/SicUI/MainView.xaml
index bd1d176..ec1713d 100644
--- a/SicUI/MainView.xaml
+++ b/SicUI/MainView.xaml
@@ -8,6 +8,7 @@
xmlns:deviceControl="clr-namespace:Aitex.Core.UI.DeviceControl;assembly=MECF.Framework.UI.Core"
xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
xmlns:wnd="http://OpenSEMI.Ctrlib.com/presentation"
+ xmlns:converter1="clr-namespace:SicUI.Converter"
Title="MainView"
Width="1900"
Height="980"
@@ -18,6 +19,10 @@
+
+
+
+
@@ -327,8 +332,8 @@
@@ -1147,128 +1152,14 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
ModuleStatusBackground.GetStatusBackground(RtStatus);
diff --git a/SicUI/Resources/Images/eng_mode_watermark.png b/SicUI/Resources/Images/eng_mode_watermark.png
new file mode 100644
index 0000000..0744b09
Binary files /dev/null and b/SicUI/Resources/Images/eng_mode_watermark.png differ
diff --git a/SicUI/SicUI.csproj b/SicUI/SicUI.csproj
index 46aa907..6154971 100644
--- a/SicUI/SicUI.csproj
+++ b/SicUI/SicUI.csproj
@@ -245,6 +245,9 @@ if exist "$(ProjectDir)..\SicSetup\Packages\SicUI\PresetGroups" rd "$(ProjectDir
WaferAssociationUnitLite.xaml
+
+
+
RuntimeView.xaml
@@ -989,6 +992,9 @@ if exist "$(ProjectDir)..\SicSetup\Packages\SicUI\PresetGroups" rd "$(ProjectDir
Always
+
+
+