|
@@ -11,19 +11,21 @@ using Aitex.Core.Utilities;
|
|
|
using FurnaceRT.Devices;
|
|
|
using MECF.Framework.Common.DataCenter;
|
|
|
using MECF.Framework.Common.Event;
|
|
|
+using MECF.Framework.Common.Minics;
|
|
|
using MECF.Framework.Common.OperationCenter;
|
|
|
using System;
|
|
|
using System.Collections;
|
|
|
using System.Collections.Generic;
|
|
|
using System.Diagnostics;
|
|
|
using System.Linq;
|
|
|
-
|
|
|
namespace FurnaceRT.Equipments.PMs
|
|
|
{
|
|
|
public partial class PMModule
|
|
|
{
|
|
|
+
|
|
|
private Dictionary<int, List<AITAuxData>> _auxDic;
|
|
|
private int _currentAuxTable = 1;
|
|
|
+ private string _currentTableName ="";
|
|
|
private bool _isF2ClnOn;
|
|
|
private bool _isHFClnOn;
|
|
|
private bool _isDEPOOn;
|
|
@@ -441,9 +443,66 @@ namespace FurnaceRT.Equipments.PMs
|
|
|
private void MonitorAux()
|
|
|
{
|
|
|
if (SC.ContainsItem("System.EnableMinics") && SC.GetValue<bool>("System.EnableMinics"))
|
|
|
+ {
|
|
|
+ if (_initTimer.IsRunning && _initTimer.ElapsedMilliseconds < 3000)
|
|
|
+ {
|
|
|
+ _initTimer.Stop();
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (IsHTR1Enable != SC.GetValue<bool>("PM1.IsHTR1Enable"))
|
|
|
+ IsHTR1Enable = SC.GetValue<bool>("PM1.IsHTR1Enable");
|
|
|
+ if (IsHTR2Enable != SC.GetValue<bool>("PM1.IsHTR2Enable"))
|
|
|
+ IsHTR2Enable = SC.GetValue<bool>("PM1.IsHTR2Enable");
|
|
|
+ if (IsHTR3Enable != SC.GetValue<bool>("PM1.IsHTR3Enable"))
|
|
|
+ IsHTR3Enable = SC.GetValue<bool>("PM1.IsHTR3Enable");
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ if (IsHTR1Enable && IsF2ClnOn)
|
|
|
+ {
|
|
|
+ var config2Name = SC.ContainsItem("Minics.Config2") ? SC.GetStringValue("Minics.Config2") : "";
|
|
|
+ if (_currentTableName != config2Name)
|
|
|
+ {
|
|
|
+ Singleton<MinicsManager>.Instance.SelectMinicsConfig(config2Name);
|
|
|
+ _currentTableName = config2Name;
|
|
|
+ LOG.Write($"minics table switch to config2 {config2Name}");
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ else if (IsHTR1Enable && IsHTR2Enable && IsHFClnOn)
|
|
|
+ {
|
|
|
+ var config3Name = SC.ContainsItem("Minics.Config3") ? SC.GetStringValue("Minics.Config3") : "";
|
|
|
+ if (_currentTableName != config3Name)
|
|
|
+ {
|
|
|
+ Singleton<MinicsManager>.Instance.SelectMinicsConfig(config3Name);
|
|
|
+ _currentTableName = config3Name;
|
|
|
+ LOG.Write($"minics table switch to config3 {config3Name}");
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ }
|
|
|
+ else if (IsHTR1Enable)
|
|
|
+ {
|
|
|
+ var config1Name = SC.ContainsItem("Minics.Config1") ? SC.GetStringValue("Minics.Config1") : "";
|
|
|
+
|
|
|
+ if (_currentTableName != config1Name)
|
|
|
+ {
|
|
|
+ Singleton<MinicsManager>.Instance.SelectMinicsConfig(config1Name);
|
|
|
+ _currentTableName = config1Name;
|
|
|
+ LOG.Write($"minics table switch to config1 {config1Name}");
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
return;
|
|
|
+ }
|
|
|
|
|
|
- #region
|
|
|
+ #region old
|
|
|
|
|
|
if (_initTimer.IsRunning && _initTimer.ElapsedMilliseconds < 3000)
|
|
|
{
|