From 9162745567df788476b19c722d9d52899ba9a0b4 Mon Sep 17 00:00:00 2001 From: "DESKTOP-GPE37UV\\THINKAPD" Date: Wed, 29 Mar 2023 10:28:55 +0800 Subject: [PATCH] Update from svn. --- .../DataLogs/DataHistory/DataViewModel.cs | 102 +++--- .../Maitenances/IO3/IO3ViewModel.cs | 8 + Modules/Mainframe/Buffers/BufferModule.cs | 6 + .../Mainframe/Config/DeviceModelSystem.xml | 48 ++- Modules/Mainframe/Config/IODefinePlatform.xml | 14 +- Modules/Mainframe/LLs/LoadLockModule.cs | 41 ++- Modules/Mainframe/LLs/LoadLockModuleBase.cs | 5 + Modules/Mainframe/LLs/SicLoadLock.cs | 1 + Modules/Mainframe/PreHeats/PreHeatModule.cs | 6 + Modules/Mainframe/TMs/TMModule.cs | 21 +- Modules/SicPM/Config/DeviceModelPM.xml | 320 +++++++++-------- .../Recipe/Sic/Process/RecipeFormat.xml | 3 +- Modules/SicPM/Config/_ioDefinePM.xml | 129 ++++--- Modules/SicPM/Config/interlockPM.xml | 338 ++++++++++-------- Modules/SicPM/PMModule.cs | 98 +++-- Modules/SicPM/PMModuleDevice.cs | 4 +- Modules/SicPM/PmDevices/DicMode.cs | 6 +- Modules/SicPM/RecipeExecutions/PreProcess.cs | 35 +- .../SicPM/Routines/PMProcessAbortRoutine.cs | 146 ++++++++ Modules/SicPM/SicPM.csproj | 1 + SicRT/Config/Account/Account.xml | 2 +- SicRT/Config/System.sccfg | 14 +- SicRT/Equipments/AutoTransfer.cs | 14 +- .../Schedulers/SchedulerLoadLock.cs | 14 + SicRT/Equipments/Systems/EquipmentManager.cs | 27 +- SicRT/Properties/AssemblyInfo.cs | 4 +- SicRT/ReleaseNotes.txt | 24 ++ SicSimulator/Config/_ioDefinePM.xml | 2 + SicSimulator/Instances/SimulatorSystem.cs | 54 +-- SicUI/Models/PMs/PMCommMonitorViewModel.cs | 11 +- SicUI/Models/PMs/PMHeaterViewModel.cs | 21 +- SicUI/Properties/AssemblyInfo.cs | 4 +- 32 files changed, 942 insertions(+), 581 deletions(-) create mode 100644 Modules/SicPM/Routines/PMProcessAbortRoutine.cs diff --git a/FrameworkLocal/UIClient/CenterViews/DataLogs/DataHistory/DataViewModel.cs b/FrameworkLocal/UIClient/CenterViews/DataLogs/DataHistory/DataViewModel.cs index faf768a..dfd7e07 100644 --- a/FrameworkLocal/UIClient/CenterViews/DataLogs/DataHistory/DataViewModel.cs +++ b/FrameworkLocal/UIClient/CenterViews/DataLogs/DataHistory/DataViewModel.cs @@ -18,6 +18,7 @@ using System.Data; using System.Diagnostics; using System.Linq; using System.Text; +using System.Text.RegularExpressions; using System.Threading; using System.Threading.Tasks; using System.Windows; @@ -481,7 +482,6 @@ namespace MECF.Framework.UI.Client.CenterViews.DataLogs.DataHistory return false; } - /// /// 根据DataLog界面左侧项目树中选择的项目查询数据 /// @@ -503,46 +503,28 @@ namespace MECF.Framework.UI.Client.CenterViews.DataLogs.DataHistory if (module.ChildNodes.FirstOrDefault(x => (bool)x.HasTerminalSelected) == null) continue; - string tblNameWithoutDay; - if (module.Name.StartsWith("IO")) + if (module.ToString() != "IO") { - tblNameWithoutDay = $"{module.Name}"; - } - else if (module.Name.StartsWith("PM")) - { - tblNameWithoutDay = $"{module.Name}"; + // 如果不是IO节点,则根节点名即为数据库名= + var dt = SearchSingleDbTable(module, dateRange, cancellation, progressReporter); + if (dt != null) + ds.Tables.Add(dt); } else { - tblNameWithoutDay = $"System"; - } + // 如果节点名是IO,则使用其下一级节点查询,因为数据具体保存在哪个表中需要用下一级节点判断。 + var subNodes = module.ChildNodes; - - if (module.Name.StartsWith("IO")) - { - foreach (var subIo in module.ChildNodes) + foreach (var subNode in subNodes) { - if (!subIo.HasTerminalSelected) + if (subNode.ChildNodes.FirstOrDefault(x => (bool)x.HasTerminalSelected) == null) continue; - tblNameWithoutDay = subIo.Name; - - // 如果不是IO节点,则根节点名即为数据库名= - var dt = SearchSingleDbTable(tblNameWithoutDay, subIo, dateRange, cancellation, progressReporter); + var dt = SearchSingleDbTable(subNode, dateRange, cancellation, progressReporter); if (dt != null) ds.Tables.Add(dt); } } - else - { - if (module.ChildNodes.FirstOrDefault(x => (bool)x.HasTerminalSelected) == null) - continue; - - var dt = SearchSingleDbTable(tblNameWithoutDay, module, dateRange, cancellation, - progressReporter); - if (dt != null) - ds.Tables.Add(dt); - } } } @@ -557,7 +539,7 @@ namespace MECF.Framework.UI.Client.CenterViews.DataLogs.DataHistory /// /// /// - private static DataTable SearchSingleDbTable(string tableName, TreeNode module, DateRangeHelper dateRange, + private static DataTable SearchSingleDbTable(TreeNode module, DateRangeHelper dateRange, CancellationTokenSource cancellation = null, IProgress progressReporter = null) { @@ -570,27 +552,53 @@ namespace MECF.Framework.UI.Client.CenterViews.DataLogs.DataHistory var ts = dateRange.Diff; for (var day = 0; day <= ts.Days; day++) { - var tblName = $"{dateRange.Start.AddDays(day):yyyyMMdd}.{tableName}"; + var tblNameDatePart = $"{dateRange.Start.AddDays(day):yyyyMMdd}"; + var tblName = ""; + var m = Regex.Match(module.FullName, @"^IO.(\S+)$"); + + // 如果节点名称以IO起头,先检查有没有"IO."开头的表, + // 如果没有,则使用PMx表查询。 + if (m.Success) + { + tblName = $"{tblNameDatePart}.{module}"; + if (CheckTableExists(tblName) == false) // 检查数据表是否存在,不存在则换名字查询 + { + LOG.Error($"{tblName} does not exist in database."); + + // 更换表名尝试。 + tblName = $"{tblNameDatePart}.{m.Groups[1].Value}"; + if (CheckTableExists(tblName) == false) + { + LOG.Error($"{tblName} does not exist in database."); + break; + } + } + } + else + { + tblName = $"{tblNameDatePart}.{module}"; + if (CheckTableExists(tblName) == false) + { + LOG.Error($"{tblName} does not exist in database."); + break; + } + } // 检查表名是否存在,否则SQL执行出错。 - if (CheckTableExists(tblName)) + sql.Append("select \"time\" AS InternalTimeStamp"); + var selectedParams = module.Flatten(true) + .Where(x => x.IsSelected == true); + + // 添加待查询的列 + foreach (var item in selectedParams) { - - sql.Append("select \"time\" AS InternalTimeStamp"); - var selectedParams = module.Flatten(true) - .Where(x => x.IsSelected == true); - - // 添加待查询的列 - foreach (var item in selectedParams) - { - sql.Append("," + $"\"{item}\""); - } - - sql.Append($" from \"{tblName}\" "); - - if (day < ts.Days) - sql.Append(" UNION "); + sql.Append("," + $"\"{item}\""); } + + sql.Append($" from \"{tblName}\" "); + + if (day < ts.Days) + sql.Append(" UNION "); } // 所有表名不可用,可能是日期范围错误 diff --git a/FrameworkLocal/UIClient/CenterViews/Maitenances/IO3/IO3ViewModel.cs b/FrameworkLocal/UIClient/CenterViews/Maitenances/IO3/IO3ViewModel.cs index 1156548..191c0dc 100644 --- a/FrameworkLocal/UIClient/CenterViews/Maitenances/IO3/IO3ViewModel.cs +++ b/FrameworkLocal/UIClient/CenterViews/Maitenances/IO3/IO3ViewModel.cs @@ -233,6 +233,8 @@ namespace MECF.Framework.UI.Client.CenterViews.Maitenances.IO3 bool value = true; if (value is T) { + if (item[i].Description.Contains("Visibility.Hidden")) + continue; da.Add(new IOItem() { Index = item[i].Index, @@ -258,6 +260,8 @@ namespace MECF.Framework.UI.Client.CenterViews.Maitenances.IO3 bool value = true; if (value is T) { + if (item[i].Description.Contains("Visibility.Hidden")) + continue; da.Add(new IOItem() { Index = item[i].Index, @@ -281,6 +285,8 @@ namespace MECF.Framework.UI.Client.CenterViews.Maitenances.IO3 List item = (List)diList; for (int i = 0; i < item.Count; i++) { + if (item[i].Description.Contains("Visibility.Hidden")) + continue; da.Add(new IOItem() { Index = item[i].Index, @@ -313,6 +319,8 @@ namespace MECF.Framework.UI.Client.CenterViews.Maitenances.IO3 for (int i = 0; i < item.Count; i++) { { + if (item[i].Description.Contains("Visibility.Hidden")) + continue; da.Add(new AOItemFloat() { Index = item[i].Index, diff --git a/Modules/Mainframe/Buffers/BufferModule.cs b/Modules/Mainframe/Buffers/BufferModule.cs index 0f00723..9af7a0e 100644 --- a/Modules/Mainframe/Buffers/BufferModule.cs +++ b/Modules/Mainframe/Buffers/BufferModule.cs @@ -166,6 +166,7 @@ namespace Mainframe.Buffers { //Error AnyStateTransition(MSG.Error, FsmOnError, STATE.Error); + AnyStateTransition(FSM_MSG.ALARM, FsmOnError, STATE.Error); Transition(STATE.Error, MSG.Reset, FsmReset, STATE.Idle); EnterExitTransition(STATE.Error, FsmEnterError, FSM_MSG.NONE, FsmExitError); @@ -231,6 +232,11 @@ namespace Mainframe.Buffers private bool FsmReset(object[] param) { + if (FsmState == (int)STATE.Error) + { + EV.ClearAlarmEvent(); + } + if (!_isInit) { PostMsg(MSG.ToInit); diff --git a/Modules/Mainframe/Config/DeviceModelSystem.xml b/Modules/Mainframe/Config/DeviceModelSystem.xml index e571a40..7182f93 100644 --- a/Modules/Mainframe/Config/DeviceModelSystem.xml +++ b/Modules/Mainframe/Config/DeviceModelSystem.xml @@ -36,24 +36,40 @@ - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Modules/Mainframe/Config/IODefinePlatform.xml b/Modules/Mainframe/Config/IODefinePlatform.xml index 3c5a819..790d537 100644 --- a/Modules/Mainframe/Config/IODefinePlatform.xml +++ b/Modules/Mainframe/Config/IODefinePlatform.xml @@ -19,12 +19,12 @@ - - - - - - + + + + + + @@ -119,7 +119,7 @@ - + diff --git a/Modules/Mainframe/LLs/LoadLockModule.cs b/Modules/Mainframe/LLs/LoadLockModule.cs index 3c95340..f44d9dd 100644 --- a/Modules/Mainframe/LLs/LoadLockModule.cs +++ b/Modules/Mainframe/LLs/LoadLockModule.cs @@ -209,6 +209,7 @@ namespace Mainframe.LLs { //Error AnyStateTransition(MSG.Error, FsmOnError, STATE.Error); + AnyStateTransition(FSM_MSG.ALARM, FsmOnError, STATE.Error); Transition(STATE.Error, MSG.Reset, FsmReset, STATE.Idle); EnterExitTransition(STATE.Error, FsmEnterError, FSM_MSG.NONE, FsmExitError); @@ -229,9 +230,9 @@ namespace Mainframe.LLs Transition(STATE.PrepareTransfer, FSM_MSG.TIMER, FsmMonitorTask, STATE.Idle); Transition(STATE.PrepareTransfer, MSG.Abort, FsmAbortTask, STATE.Idle); - //Online - Transition(STATE.Idle, MSG.SetOnline, FsmStartSetOnline, STATE.Idle); - Transition(STATE.Idle, MSG.SetOffline, FsmStartSetOffline, STATE.Idle); + ////Online + //Transition(STATE.Idle, MSG.SetOnline, FsmStartSetOnline, STATE.Idle); + //Transition(STATE.Idle, MSG.SetOffline, FsmStartSetOffline, STATE.Idle); //Pump Transition(STATE.Idle, MSG.Pump, FsmStartPump, STATE.Pump); @@ -321,8 +322,8 @@ namespace Mainframe.LLs return CheckToPostMessage((int)MSG.Abort); }); - OP.Subscribe($"{Module}.SetOnline", (string cmd, object[] args) => CheckToPostMessage((int)MSG.SetOnline)); - OP.Subscribe($"{Module}.SetOffline", (string cmd, object[] args) => CheckToPostMessage((int)MSG.SetOffline)); + OP.Subscribe($"{Module}.SetOnline", (string cmd, object[] args) => PutOnline()); + OP.Subscribe($"{Module}.SetOffline", (string cmd, object[] args) => PutOffline()); } private void InitData() @@ -391,6 +392,11 @@ namespace Mainframe.LLs private bool FsmReset(object[] param) { + if (FsmState == (int)STATE.Error) + { + EV.ClearAlarmEvent(); + } + if (!_isInit) { PostMsg(MSG.ToInit); @@ -718,14 +724,31 @@ namespace Mainframe.LLs return true; } - public void InvokeOffline() + private bool PutOnline() { - PostMsg((int)MSG.SetOffline); + IsOnline = true; + return true; } - public void InvokeOnline() + private bool PutOffline() { - PostMsg((int)MSG.SetOnline); + IsOnline = false; + return true; + } + + public override void InvokeOffline() + { + PutOffline(); + } + + public override void InvokeOnline() + { + PutOnline(); + } + + public override bool CheckLidClose() + { + return _llDevice.CheckLidClosed(); } } } diff --git a/Modules/Mainframe/LLs/LoadLockModuleBase.cs b/Modules/Mainframe/LLs/LoadLockModuleBase.cs index b357ebb..b3dcabb 100644 --- a/Modules/Mainframe/LLs/LoadLockModuleBase.cs +++ b/Modules/Mainframe/LLs/LoadLockModuleBase.cs @@ -51,6 +51,11 @@ namespace Mainframe.LLs public abstract int InvokePump(); public abstract int InvokePurge(); + public abstract void InvokeOnline(); + public abstract void InvokeOffline(); + public abstract bool CheckAcked(int entityTaskToken); + + public abstract bool CheckLidClose(); } } diff --git a/Modules/Mainframe/LLs/SicLoadLock.cs b/Modules/Mainframe/LLs/SicLoadLock.cs index 7ea7a28..0bd6d57 100644 --- a/Modules/Mainframe/LLs/SicLoadLock.cs +++ b/Modules/Mainframe/LLs/SicLoadLock.cs @@ -284,6 +284,7 @@ namespace Mainframe.LLs _trigNoWafer.RST = true; } + if (_trigNoWafer.Q) { if (WaferManager.Instance.CheckHasWafer(ModuleName.LoadLock, 0)) diff --git a/Modules/Mainframe/PreHeats/PreHeatModule.cs b/Modules/Mainframe/PreHeats/PreHeatModule.cs index 042dba2..75c0764 100644 --- a/Modules/Mainframe/PreHeats/PreHeatModule.cs +++ b/Modules/Mainframe/PreHeats/PreHeatModule.cs @@ -133,6 +133,7 @@ namespace Mainframe.PreHeats { //Error AnyStateTransition(MSG.Error, FsmOnError, STATE.Error); + AnyStateTransition(FSM_MSG.ALARM, FsmOnError, STATE.Error); Transition(STATE.Error, MSG.Reset, FsmReset, STATE.Idle); EnterExitTransition(STATE.Error, FsmEnterError, FSM_MSG.NONE, FsmExitError); @@ -194,6 +195,11 @@ namespace Mainframe.PreHeats private bool FsmReset(object[] param) { + if (FsmState == (int)STATE.Error) + { + EV.ClearAlarmEvent(); + } + if (!_isInit) { PostMsg(MSG.ToInit); diff --git a/Modules/Mainframe/TMs/TMModule.cs b/Modules/Mainframe/TMs/TMModule.cs index 0cb163a..76fcbad 100644 --- a/Modules/Mainframe/TMs/TMModule.cs +++ b/Modules/Mainframe/TMs/TMModule.cs @@ -165,20 +165,6 @@ namespace Mainframe.TMs { get { - int count = 0; - var alarms = EV.GetAlarmEvent(); - foreach (var alarm in alarms) - { - if (alarm.Level == EventLevel.Alarm && (alarm.Source == Name || alarm.Source == "System")) - count++; - } - - _alarmTrig.CLK = count > 0; - if (_alarmTrig.Q) - { - InvokeError(); - } - return FsmState == (int)STATE.Error; } } @@ -380,6 +366,7 @@ namespace Mainframe.TMs { //Error AnyStateTransition(MSG.Error, FsmOnError, STATE.Error); + AnyStateTransition(FSM_MSG.ALARM, FsmOnError, STATE.Error); Transition(STATE.Error, MSG.Reset, FsmReset, STATE.Idle); EnterExitTransition(STATE.Error, FsmEnterError, FSM_MSG.NONE, FsmExitError); @@ -696,7 +683,11 @@ namespace Mainframe.TMs private bool FsmReset(object[] param) { - EV.ClearAlarmEvent(); + if (FsmState == (int)STATE.Error) + { + EV.ClearAlarmEvent(); + } + if (!_isInit) { PostMsg(MSG.ToInit); diff --git a/Modules/SicPM/Config/DeviceModelPM.xml b/Modules/SicPM/Config/DeviceModelPM.xml index e4ae8ef..5517b25 100644 --- a/Modules/SicPM/Config/DeviceModelPM.xml +++ b/Modules/SicPM/Config/DeviceModelPM.xml @@ -245,149 +245,187 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Modules/SicPM/Config/Recipe/Sic/Process/RecipeFormat.xml b/Modules/SicPM/Config/Recipe/Sic/Process/RecipeFormat.xml index 72c8487..5701e22 100644 --- a/Modules/SicPM/Config/Recipe/Sic/Process/RecipeFormat.xml +++ b/Modules/SicPM/Config/Recipe/Sic/Process/RecipeFormat.xml @@ -37,7 +37,8 @@ - + + diff --git a/Modules/SicPM/Config/_ioDefinePM.xml b/Modules/SicPM/Config/_ioDefinePM.xml index 6c50575..f1f9124 100644 --- a/Modules/SicPM/Config/_ioDefinePM.xml +++ b/Modules/SicPM/Config/_ioDefinePM.xml @@ -53,9 +53,9 @@ - + - + @@ -179,12 +179,12 @@ - - - - - - + + + + + + @@ -216,23 +216,30 @@ - + + + + + + + + @@ -240,20 +247,25 @@ - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + @@ -301,7 +313,7 @@ - + @@ -377,26 +389,27 @@ - - - - - - - - - - - - + + + + + + + + + + + + - + - - - - - + + + + + + @@ -492,9 +505,9 @@ - - - + + + @@ -551,9 +564,9 @@ - - - + + + @@ -580,13 +593,13 @@ - - - - - - - + + + + + + + @@ -663,9 +676,9 @@ - - - + + + diff --git a/Modules/SicPM/Config/interlockPM.xml b/Modules/SicPM/Config/interlockPM.xml index f1d74a5..a07a501 100644 --- a/Modules/SicPM/Config/interlockPM.xml +++ b/Modules/SicPM/Config/interlockPM.xml @@ -1117,7 +1117,6 @@ - @@ -1142,8 +1141,11 @@ - + + + + @@ -1159,12 +1161,13 @@ - - + + + @@ -1191,9 +1194,10 @@ - + + @@ -1217,8 +1221,7 @@ - - + @@ -1254,9 +1257,10 @@ - + + @@ -1279,8 +1283,7 @@ - - + @@ -1316,9 +1319,10 @@ - + + @@ -1327,149 +1331,179 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Modules/SicPM/PMModule.cs b/Modules/SicPM/PMModule.cs index 91d2ef8..39acf86 100644 --- a/Modules/SicPM/PMModule.cs +++ b/Modules/SicPM/PMModule.cs @@ -88,6 +88,8 @@ namespace SicPM StopHeat, CleanProcess, + ProcessAborting, + } public enum MSG { @@ -143,8 +145,9 @@ namespace SicPM PostPMMacro, ToServiceIdle, StopHeat, - CleanProcess + CleanProcess, + ProcessAbort } public enum ServoStates { @@ -221,24 +224,6 @@ namespace SicPM { get { - int count = 0; - var alarms = EV.GetAlarmEvent(); - foreach (var alarm in alarms) - { - if (alarm.Level == EventLevel.Alarm && alarm.Source == Name) - count++; - } - - _alarmTrig.CLK = count > 0 && count!= lastCount; - if (_alarmTrig.Q) - { - if (!IsServiceIdle) - { - InvokeError(); - } - } - _alarmNumber = count; - lastCount = count; return FsmState == (int)STATE.Error; } } @@ -362,6 +347,7 @@ namespace SicPM private PMServoHomeRoutine _pmServoHomeRoutine; private PMServoResetRoutine _pmServoResetRoutine; private PMToProcessIdleRoutine _pmtoProcessIdle; + private PMProcessAbortRoutine _pmProcessAbort; private PMProcessToProcessIdleRoutine _pmProcessToProcessIdl1e; private ModuleName _module; @@ -462,6 +448,8 @@ namespace SicPM _pMMacroRoutine = new PMMacroRoutine(ModuleHelper.Converter(Module), this); _stopHeatEnableRoutine = new PMStopHeatEnableRoutine(ModuleHelper.Converter(Module), this); _cleanRecipe = new CleanRecipe(ModuleHelper.Converter(Module), this); + + _pmProcessAbort = new PMProcessAbortRoutine(ModuleHelper.Converter(Module), this); } private void InitData() @@ -569,6 +557,7 @@ namespace SicPM //Error Transition(STATE.Error, MSG.Reset, FsmReset, STATE.Idle); AnyStateTransition(MSG.Error, FsmOnError, STATE.Error); + AnyStateTransition(FSM_MSG.ALARM, FsmOnError, STATE.Error); AnyStateTransition(MSG.ToInit, FsmToInit, STATE.Init); //AnyStateTransition(MSG.ToSafety, FsmToInit, STATE.Safety); @@ -816,6 +805,8 @@ namespace SicPM //Process Transition(STATE.PreProcess, MSG.Process, FsmStartProcess, STATE.Process); Transition(STATE.Process, FSM_MSG.TIMER, FsmMonitorTask, STATE.Process); + Transition(STATE.Process, MSG.ProcessAbort, FsmStartProcessAbort, STATE.ProcessAborting); + Transition(STATE.ProcessAborting, FSM_MSG.TIMER, FsmMonitorProcessAbortingTask, STATE.Error); Transition(STATE.Process, MSG.Abort, FsmAbortProcessTask, STATE.ProcessIdle); EnterExitTransition(STATE.Process, FsmEnterProcess, FSM_MSG.NONE, FsmExitProcess); @@ -1325,8 +1316,8 @@ namespace SicPM if (!RecipeRunningInfo.IsRoutineAbort) { //EV.PostWarningLog(Module, $"Exit Process: Recipe Step:{_recipeRunningInfo.StepNumber} Step Elapse Time:{Convert.ToInt32(_recipeRunningInfo.StepElapseTime).ToString()} "); - EV.PostWarningLog(Module, $"Exit Process: Recipe Name {_recipeRunningInfo.RecipeName},Recipe Step:{_recipeRunningInfo.StepNumber},Step Time:{_recipeRunningInfo.StepTime.ToString("X2")}"); - StopProcess(); + EV.PostWarningLog(Module, $"Exit Process: Recipe Name {_recipeRunningInfo.RecipeName},Recipe Step:{_recipeRunningInfo.StepNumber},Step Time:{_recipeRunningInfo.StepTime.ToString()}"); + //StopProcess(); } } return true; @@ -1407,19 +1398,54 @@ namespace SicPM return true; } - private bool FsmOnError(object[] param) + private bool FsmMonitorProcessAbortingTask(object[] param) { - IsOnline = false; - - if (FsmState.Equals((int) STATE.Error)) + Result ret = MonitorRoutine(); + if (ret == Result.FAIL) { return false; } - else + + if (ret == Result.DONE) { - StopRamp(); - _pmInterLock.SetPMProcessRunning(false, out string reason); - _pmInterLock.SetPMPreProcessRunning(false, out reason); + return true; + } + + return false; + } + + private bool FsmStartProcessAbort(object[] param) + { + Result ret = StartRoutine(_pmProcessAbort); + + if (ret == Result.FAIL || ret == Result.DONE) + return false; + + return ret == Result.RUN; + } + + private bool FsmOnError(object[] param) + { + if (IsServiceIdle) + { + return false; + } + + IsOnline = false; + + StopRamp(); + _pmInterLock.SetPMProcessRunning(false, out string reason); + _pmInterLock.SetPMPreProcessRunning(false, out reason); + + if (FsmState.Equals((int)STATE.Process)) + { + PostMsg(MSG.ProcessAbort); + return false; + } + + if (FsmState.Equals((int)STATE.ProcessAborting)) + { + return false; } return true; @@ -1427,17 +1453,19 @@ namespace SicPM private bool FsmReset(object[] param) { - EV.ClearAlarmEvent(); + var alarms = EV.GetAlarmEvent(); + int alarmCount = alarms != null ? alarms.FindAll(a => a.Level == EventLevel.Alarm && a.Source == Module).Count : 0; + if (alarmCount > 0) + { + EV.ClearAlarmEvent(); + } + if (!_isInitFlag) { PostMsg(MSG.ToInit); return false; } - //if (!_isSafetyFlag) - //{ - // PostMsg(MSG.ToSafety); - // return false; - //} + return true; } diff --git a/Modules/SicPM/PMModuleDevice.cs b/Modules/SicPM/PMModuleDevice.cs index 6e010f1..76b7139 100644 --- a/Modules/SicPM/PMModuleDevice.cs +++ b/Modules/SicPM/PMModuleDevice.cs @@ -23,7 +23,7 @@ using System.Threading; namespace SicPM { - public enum IoGroupName { A, B, C, D, E, F, G, H, I, J, K,V38, Final1,Final2,EPV1,EPV2,GasIn1,GasIn2,GasOut,VentPump,ArSupply, GasSupply,All, V27,V888990,V76,V75,V70,V69,V25, V94,GroupIWithoutV94 }; + public enum IoGroupName { A, B, C, D, E, F, G, H, I, J, K,V38, Final1,Final2,EPV1,EPV2,GasIn1,GasIn2,GasOut,VentPump,ArSupply, GasSupply,All, V27,V888990,V76,V75,V70,V69,V25, V94,GroupIWithoutV94,V32 }; public enum MfcGroupName { Final1, Final2, M1to16, M19to38, M27toM38, M19toM26, M28toM40, M19toM31,M32toM38,M291519to38, M291519to26, M2915,M36, M39, All }; @@ -1214,7 +1214,7 @@ namespace SicPM } else if (mGroupName == MfcGroupName.M291519to38) { - lst = new List() { 2, 9, 15, 19, 20, 22, 23, 25, 26, 27, 28, 29, 40, 31, 32, 33, 35, 36, 37, 38 }; + lst = new List() { 2, 9, 15, 19, 20, 22, 23, 25, 26, 27, 28, 29, 31, 32, 33, 35, 36, 37, 38, 40}; } else if (mGroupName == MfcGroupName.M291519to26) { diff --git a/Modules/SicPM/PmDevices/DicMode.cs b/Modules/SicPM/PmDevices/DicMode.cs index 9ffbf16..0681306 100644 --- a/Modules/SicPM/PmDevices/DicMode.cs +++ b/Modules/SicPM/PmDevices/DicMode.cs @@ -24,10 +24,12 @@ namespace SicPM.PmDevices public enum HeaterControlMode { - Power, + Power = 0, TC, Pyro, - Hold + Hold, + PyroAuto, + PyroFollow } } } diff --git a/Modules/SicPM/RecipeExecutions/PreProcess.cs b/Modules/SicPM/RecipeExecutions/PreProcess.cs index f48b6d8..e23dda9 100644 --- a/Modules/SicPM/RecipeExecutions/PreProcess.cs +++ b/Modules/SicPM/RecipeExecutions/PreProcess.cs @@ -92,10 +92,10 @@ namespace SicPM.RecipeExecutions private bool _isMFCJumpMode; private int _delayTimeRamp; - private double _targetPressure; - private int _servoUpDelay; + private double _targetPressure; + private double _pc5Offset; private double _pc6Offset; private double _pc7Offset; @@ -238,11 +238,6 @@ namespace SicPM.RecipeExecutions { try { - if (SC.GetValue("System.IsSimulatorMode")) - { - return Result.DONE; - } - EnableRotation((int)RoutineStep.EnableRotation, 5); SetRotationValveAndNoWait((int)RoutineStep.SetRotation, _rotationSpeed); @@ -251,6 +246,11 @@ namespace SicPM.RecipeExecutions ExecuteRoutine((int)RoutineStep.SetServoUp, _pmServoUpRoutine); + if (SC.GetValue("System.IsSimulatorMode")) + { + return Result.DONE; + } + ExecuteRoutine((int)RoutineStep.SetChamberPressure, _pmServoToPressure); OpenH2Valve((int)RoutineStep.OpenH2Valve, PMDevice, 2); @@ -269,27 +269,6 @@ namespace SicPM.RecipeExecutions WaitTempratureToBeginProcess((int)RoutineStep.WaitTempReach, _preTemp, 10000); } - - - - //NoteInProcess((int)Routine.NoteInProcess,0); - - //if (_isSlitDoorOpened) - //ExecuteRoutine((int)Routine.CloseSlitValve, _closeSlitValveRoutine); - - //关闭所有阀门 - // CloseAllValves((int)Routine.CloseAllVavle, 10); - - //if (!_isATMMode) - //{ - // ExecuteRoutine((int)Routine.Pump, _pumptRoutine); - - //SetThrottlePressureControlMode((int)Routine.SetThrottlePressureControlMode, _throttleValve); - //} - - //End((int)Routine.End, "Preprocess finished"); - - //NoteProcessComplete((int)Routine.NoteProcessComplete, 0); } catch (RoutineBreakException) { diff --git a/Modules/SicPM/Routines/PMProcessAbortRoutine.cs b/Modules/SicPM/Routines/PMProcessAbortRoutine.cs new file mode 100644 index 0000000..75ee537 --- /dev/null +++ b/Modules/SicPM/Routines/PMProcessAbortRoutine.cs @@ -0,0 +1,146 @@ +using Aitex.Core.RT.Device; +using Aitex.Core.RT.Device.Unit; +using Aitex.Core.RT.Event; +using Aitex.Core.RT.Routine; +using Aitex.Core.RT.SCCore; +using MECF.Framework.Common.Equipment; +using System; +using System.Collections.Generic; +using System.Diagnostics; + +namespace SicPM.Routines +{ + public class PMProcessAbortRoutine : PMBaseRoutine + { + private enum RoutineStep + { + HeatEnable, + SetRotation, + SetM2toM40, + SetM1to16, + SetPC, + SetV32, + SetV35V36, + SetV68, + SetGroupB, + SetGroupC, + SetGroupE, + SetGroupF, + SetGroupH, + SetGroupK, + SetGroupD, + SetGroupG, + } + + private int _heatTimeOut = 5; + + private int _mfc1to16RampTime = 30; + private int _mfc2to40RampTime = 30; + + List _lstPcList = new List { 1, 2, 3, 4, 5, 6, 7 }; + + private int _IoValueOpenCloseTimeout = 10; + + private int _routineTimeOut = 10; + + private Stopwatch _swTimer = new Stopwatch(); + public PMProcessAbortRoutine(ModuleName module, PMModule pm) : base(module, pm) + { + Module = module.ToString(); + Name = "ProcessAbort"; + } + + public override Result Start(params object[] objs) + { + Reset(); + + _mfc1to16RampTime = SC.GetValue($"PM.{Module}.ProcessIdle.MFC1to16RampTime"); + _mfc2to40RampTime = SC.GetValue($"PM.{Module}.ProcessIdle.MFC19to38RampTime"); + + _routineTimeOut = SC.GetValue($"PM.{Module}.ProcessIdle.RoutineTimeOut"); + + _swTimer.Restart(); + Notify("Start"); + return Result.RUN; + } + + + public override Result Monitor() + { + try + { + //CheckRoutineTimeOut(); + + //停止加热 + SetHeatEnable((int)RoutineStep.HeatEnable, false, _heatTimeOut); + + //停止旋转 + SetRotationValveAndNoWait((int)RoutineStep.SetRotation, 0); + + //M2、M9、M15、M19-M40 MFC 30s ramp 到 default 值 + SetMfcToDefaultByGroup((int)RoutineStep.SetM2toM40, MfcGroupName.M291519to38, _mfc2to40RampTime); + + //M1 - M16 MFC 30s ramp 到 default 值(M2、M9、M15除外) + SetMfcToDefaultByGroup((int)RoutineStep.SetM1to16, MfcGroupName.M1to16, _mfc1to16RampTime); + + //所有PC设定为默认值 + SetPcToDefault((int)RoutineStep.SetPC, _lstPcList); + + //打开V32,打开V35,打开V36 + SetIoValueByGroup((int)RoutineStep.SetV32, IoGroupName.ArSupply, true, _IoValueOpenCloseTimeout); + + //关闭B/C/E/F/H/K 阀门 + SetIoValueByGroup((int)RoutineStep.SetGroupB, IoGroupName.B, false, _IoValueOpenCloseTimeout); + SetIoValueByGroup((int)RoutineStep.SetGroupC, IoGroupName.C, false, _IoValueOpenCloseTimeout); + SetIoValueByGroup((int)RoutineStep.SetGroupE, IoGroupName.E, false, _IoValueOpenCloseTimeout); + SetIoValueByGroup((int)RoutineStep.SetGroupF, IoGroupName.F, false, _IoValueOpenCloseTimeout); + SetIoValueByGroup((int)RoutineStep.SetGroupH, IoGroupName.H, false, _IoValueOpenCloseTimeout); + SetIoValueByGroup((int)RoutineStep.SetGroupK, IoGroupName.K, false, _IoValueOpenCloseTimeout); + + //打开D/G 阀门 + SetIoValueByGroup((int)RoutineStep.SetGroupD, IoGroupName.D, true, _IoValueOpenCloseTimeout); + SetIoValueByGroup((int)RoutineStep.SetGroupG, IoGroupName.G, true, _IoValueOpenCloseTimeout); + + //打开V68 + SetIoValueByGroup((int)RoutineStep.SetV68, IoGroupName.GasIn1, true, _IoValueOpenCloseTimeout); + } + + catch (RoutineBreakException) + { + return Result.RUN; + } + catch (RoutineFaildException) + { + return Result.FAIL; + } + + Notify($"Finished ! Elapsed time: {(int)(_swTimer.ElapsedMilliseconds / 1000)} s"); + _swTimer.Stop(); + + return Result.DONE; + } + + + private void CheckRoutineTimeOut() + { + if (_routineTimeOut > 10) + { + if ((int)(_swTimer.ElapsedMilliseconds / 1000) > _routineTimeOut) + { + EV.PostAlarmLog(Module, $"Routine TimeOut! over {_routineTimeOut} s"); + throw (new RoutineFaildException()); + } + } + } + + public override void Abort() + { + PMDevice._ioThrottleValve.StopRamp(); + PMDevice.SetMfcStopRamp(PMDevice.GetMfcListByGroupName(MfcGroupName.All)); + PMDevice.SetHeaterStopRamp(); + PMDevice.SetRotationStopRamp(); + + base.Abort(); + } + } +} diff --git a/Modules/SicPM/SicPM.csproj b/Modules/SicPM/SicPM.csproj index 1440142..e355a5d 100644 --- a/Modules/SicPM/SicPM.csproj +++ b/Modules/SicPM/SicPM.csproj @@ -125,6 +125,7 @@ + diff --git a/SicRT/Config/Account/Account.xml b/SicRT/Config/Account/Account.xml index 8938b66..7144678 100644 --- a/SicRT/Config/Account/Account.xml +++ b/SicRT/Config/Account/Account.xml @@ -113,7 +113,7 @@ - + diff --git a/SicRT/Config/System.sccfg b/SicRT/Config/System.sccfg index dfb8a80..4194fd5 100644 --- a/SicRT/Config/System.sccfg +++ b/SicRT/Config/System.sccfg @@ -150,7 +150,7 @@ - + @@ -552,7 +552,7 @@ - + @@ -563,7 +563,7 @@ - + @@ -574,7 +574,7 @@ - + @@ -787,9 +787,9 @@ - - - + + + diff --git a/SicRT/Equipments/AutoTransfer.cs b/SicRT/Equipments/AutoTransfer.cs index f834da2..b3f06b5 100644 --- a/SicRT/Equipments/AutoTransfer.cs +++ b/SicRT/Equipments/AutoTransfer.cs @@ -534,13 +534,13 @@ namespace SicRT.Modules if (!hasPmOnline) { - EV.PostWarningLog("Scheduler", "can not change to auto mode, at least one process chamber be online and no error"); + EV.PostWarningLog("System", "can not change to auto mode, at least one process chamber be online and no error"); return Result.FAIL; } if (!_tmRobot.IsOnline || _tmRobot.IsError) { - EV.PostWarningLog("Scheduler", "can not change to auto mode, TM robot should be online and no error"); + EV.PostWarningLog("System", "can not change to auto mode, TM robot should be online and no error"); return Result.FAIL; } @@ -824,7 +824,7 @@ namespace SicRT.Modules if (_lstControlJobs.Count == 0) { - EV.PostWarningLog("Scheduler", "ControlJob Finished!"); + EV.PostWarningLog("System", "ControlJob Finished!"); return true; } return false; @@ -1062,7 +1062,13 @@ namespace SicRT.Modules private void MonitorLoadLockTask() { - if(!_tmRobot.IsAvailable || !_loadlock.IsAvailable) + if (!_loadlock.CheckLidClose()) + { + _loadlock.SetOffline(); + return; + } + + if (!_tmRobot.IsAvailable || !_loadlock.IsAvailable) { return; } diff --git a/SicRT/Equipments/Schedulers/SchedulerLoadLock.cs b/SicRT/Equipments/Schedulers/SchedulerLoadLock.cs index c291146..58aa4ae 100644 --- a/SicRT/Equipments/Schedulers/SchedulerLoadLock.cs +++ b/SicRT/Equipments/Schedulers/SchedulerLoadLock.cs @@ -175,6 +175,20 @@ namespace SicRT.Scheduler return ret; } + public bool CheckLidClose() + { + return _ll.CheckLidClose(); + } + + public void SetOffline() + { + _ll.InvokeOffline(); + } + + public void SetOnline() + { + _ll.InvokeOnline(); + } } diff --git a/SicRT/Equipments/Systems/EquipmentManager.cs b/SicRT/Equipments/Systems/EquipmentManager.cs index b132158..f4795ac 100644 --- a/SicRT/Equipments/Systems/EquipmentManager.cs +++ b/SicRT/Equipments/Systems/EquipmentManager.cs @@ -193,7 +193,6 @@ namespace SicRT.Equipments.Systems Name = "System"; Modules = new Dictionary(); - } public override bool Initialize() @@ -506,14 +505,32 @@ namespace SicRT.Equipments.Systems //具体值到 EventManager里面找 private void Instance_OnAlarmEvent(EventItem obj) { + FSM_MSG msg = FSM_MSG.NONE; + if (obj.Level == EventLevel.Warning) + msg = FSM_MSG.WARNING; + else if (obj.Level == EventLevel.Alarm) + msg = FSM_MSG.ALARM; + + switch (obj.Source) + { + case "PM1": + case "TM": + case "LoadLock": + case "Load": + case "Buffer": + default: + if (Modules.ContainsKey(ModuleHelper.Converter(obj.Source))) + { + Modules[ModuleHelper.Converter(obj.Source)]?.PostMsg(msg, obj.Id, obj.Description); + } + break; + } + if (obj.EventEnum == "ALARM_EVENT") { //监控Alarm事件,使Buzzer能再次响起 _st.SwitchOffBuzzer(false); } - - - } #region Init @@ -1357,7 +1374,7 @@ namespace SicRT.Equipments.Systems MonitorUPSAlarm(); MonitorAETemp(); //AE通断,DO220 MonitorTrayInfo(); - // + return true; } diff --git a/SicRT/Properties/AssemblyInfo.cs b/SicRT/Properties/AssemblyInfo.cs index be7aa60..aaafae1 100644 --- a/SicRT/Properties/AssemblyInfo.cs +++ b/SicRT/Properties/AssemblyInfo.cs @@ -52,6 +52,6 @@ using System.Windows; // 方法是按如下所示使用“*”: : // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.5.5.17")] -[assembly: AssemblyFileVersion("1.5.5.17")] +[assembly: AssemblyVersion("1.5.8.22")] +[assembly: AssemblyFileVersion("1.5.8.22")] diff --git a/SicRT/ReleaseNotes.txt b/SicRT/ReleaseNotes.txt index 8cf30a8..86af731 100644 --- a/SicRT/ReleaseNotes.txt +++ b/SicRT/ReleaseNotes.txt @@ -9,6 +9,30 @@ Sic 系统更新历史记录 --------------------------------------------------------------------------------- +Sic02 2023-02-10 Version 1.5.8.22 +1.优化PM TM中IO检查IO,检查&AlarmCode完善 + +Sic02 2023-02-10 Version 1.5.7.21 +1.取消TempFastRatio可分为Alarm和Warning的系统配置,统一为Alarm +2.重新修改PM/LoadLock/Buffer/PreHeat的报警机制,与3号机及后续机台保持一致 +3.Process过程中若产生如TempFastRatio的Alarm,增加PMProcessAbort Routine, +执行完ProcessAbort流程后PM再进入Error状态 +4.将PUS 的Pyro外圈控制添加到Recipe每个Step中 + +Sic02 2023-02-10 Version 1.5.6.20 +1.优化AutoRun逻辑,是不切换Load Offline情况下也可执行换Tray操作 +2.修改仿真Load腔体压力速度 + +Sic02 2023-01-10 Version 1.5.5.19 +1、UI上删除PM DI66、68、DI311-316、DI401-414、 +2、UI上删除PM DO53 +3、UI上删除PM AI115-117、AI178-180、AI232-238 +4、UI上删除PM AO115-117、AO178-180 +5、UI上删除TM DI21、22、23、24、27、28、DO67 + +Sic02 2023-01-10 Version 1.5.5.18 +1.修改PM的Interlock + Sic02 2023-01-10 Version 1.5.5.17 1.修改AE升温过快报警信息; 2、添加SCR部分; diff --git a/SicSimulator/Config/_ioDefinePM.xml b/SicSimulator/Config/_ioDefinePM.xml index d4cdc67..99b9062 100644 --- a/SicSimulator/Config/_ioDefinePM.xml +++ b/SicSimulator/Config/_ioDefinePM.xml @@ -391,6 +391,8 @@ + + diff --git a/SicSimulator/Instances/SimulatorSystem.cs b/SicSimulator/Instances/SimulatorSystem.cs index 3dcb5f0..5abf529 100644 --- a/SicSimulator/Instances/SimulatorSystem.cs +++ b/SicSimulator/Instances/SimulatorSystem.cs @@ -64,8 +64,8 @@ namespace SicSimulator.Instances IO.DI["DI_DryPumpWarning"].Value = true; - IO.AI["AI_TMPressure"].FloatValue = 1231; - IO.AI["AI_LLPressure"].FloatValue = 1231; + IO.AI["AI_TMPressure"].Value = 300; + IO.AI["AI_LLPressure"].Value = 0; IO.DI["DI_TMUnderVac"].Value = true; } @@ -525,35 +525,41 @@ namespace SicSimulator.Instances private void MonitorPressureLL1() { bool isSlowPum = IO.DI["DI_LLSlowRoughOpen_FB"].Value; + bool isFastPump = IO.DI["DI_LLFastRoughOpen_FB"].Value; bool isSlowVent = IO.DI["DI_LLSlowVentOpen_FB"].Value; - bool isDryPumpingValveOpen = IO.DI["DI_LLFastRoughOpen_FB"].Value; - bool isVentValveOpen = IO.DI["DI_LLFastVentOpen_FB"].Value; - ////200毫秒调用一次,10秒内实现从0到1020 + //200毫秒调用一次,10秒内实现从0到1020 double pressure = IO.AI["AI_LLPressure"].Value; - double factor = pressure / (3 * 10); - - double pressureStep = factor < 1 ? 1 : factor; - - - - if (isDryPumpingValveOpen) + if (isFastPump || isSlowPum) { - pressure -= pressureStep; - } - else if (isSlowPum) - { - pressure -= 2; - } - - if (isVentValveOpen) - { - pressure += pressureStep; + if (pressure > 350) + { + pressure -= 10; + } + else if (pressure >= 250 && pressure <= 350) + { + pressure -= 4; + } + else + { + pressure -= 10; + } } else if (isSlowVent) { - pressure += 2; + if (pressure > 320) + { + pressure += 10; + } + else if (pressure >= 290 && pressure <= 320) + { + pressure += 1; + } + else + { + pressure += 10; + } } if (pressure < 0) @@ -561,7 +567,7 @@ namespace SicSimulator.Instances if (pressure > 1020) pressure = 1020; - if (!isDryPumpingValveOpen && !isVentValveOpen && pressure < 1) + if (!isFastPump && pressure < 1) pressure = 0; IO.AI["AI_LLPressure"].Value = Convert.ToInt16(pressure); diff --git a/SicUI/Models/PMs/PMCommMonitorViewModel.cs b/SicUI/Models/PMs/PMCommMonitorViewModel.cs index bc85edc..5bae3b5 100644 --- a/SicUI/Models/PMs/PMCommMonitorViewModel.cs +++ b/SicUI/Models/PMs/PMCommMonitorViewModel.cs @@ -18,6 +18,7 @@ using System.Text; using System.Threading.Tasks; using System.Windows; using System.Windows.Media; +using static SicPM.PmDevices.DicMode; namespace SicUI.Models.PMs { @@ -576,13 +577,9 @@ namespace SicUI.Models.PMs public void SetHeaterMode(string TCname, object data) { - float ControlMode = 0; - switch (SelectedHeaterMode) - { - case "Power": ControlMode = 0; break; - case "TC": ControlMode = 1; break; - case "Pyro": ControlMode = 2; break; - } + HeaterControlMode PSUControlMode = (HeaterControlMode)Enum.Parse(typeof(HeaterControlMode), SelectedHeaterMode); + float ControlMode = (float)PSUControlMode; + InvokeClient.Instance.Service.DoOperation($"{SystemName}.{TCname}.SetHeaterMode", ControlMode); } diff --git a/SicUI/Models/PMs/PMHeaterViewModel.cs b/SicUI/Models/PMs/PMHeaterViewModel.cs index b66236d..03e4eaf 100644 --- a/SicUI/Models/PMs/PMHeaterViewModel.cs +++ b/SicUI/Models/PMs/PMHeaterViewModel.cs @@ -17,6 +17,7 @@ using System.Text; using System.Threading.Tasks; using System.Windows; using System.Windows.Media; +using static SicPM.PmDevices.DicMode; namespace SicUI.Models.PMs { @@ -214,7 +215,7 @@ namespace SicUI.Models.PMs [Subscription("TC1.L3TempLowLimitSetPoint")] public float L3TempLowLimit { get; set; } - private List _HeaterModeGroup = new List() { "Power", "TC", "Pyro" }; + private List _HeaterModeGroup = new List() { "Power", "TC", "PyroAuto", "PyroFollow" }; public List HeaterModeGroup { get { return _HeaterModeGroup; } @@ -225,14 +226,7 @@ namespace SicUI.Models.PMs { get { - switch (HeaterMode) - { - case 0: return "Power"; - case 1: return "TC"; - case 2: return "Pyro"; - } - return "Power"; - + return ((HeaterControlMode)HeaterMode).ToString(); } } private string _SelectedHeaterMode; @@ -593,13 +587,8 @@ namespace SicUI.Models.PMs public void SetHeaterMode(string TCname, object data) { - float ControlMode = 0; - switch (SelectedHeaterMode) - { - case "Power": ControlMode = 0; break; - case "TC": ControlMode = 1; break; - case "Pyro": ControlMode = 2; break; - } + HeaterControlMode PSUControlMode = (HeaterControlMode)Enum.Parse(typeof(HeaterControlMode), SelectedHeaterMode); + float ControlMode = (float)PSUControlMode; if (heaterMode != "Power" && SelectedHeaterMode == "Power") { diff --git a/SicUI/Properties/AssemblyInfo.cs b/SicUI/Properties/AssemblyInfo.cs index b860119..8343264 100644 --- a/SicUI/Properties/AssemblyInfo.cs +++ b/SicUI/Properties/AssemblyInfo.cs @@ -54,5 +54,5 @@ using System.Windows; // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: -[assembly: AssemblyVersion("1.5.5.17")] -[assembly: AssemblyFileVersion("1.5.5.17")] +[assembly: AssemblyVersion("1.5.8.28")] +[assembly: AssemblyFileVersion("1.5.8.28")]