Browse Source

FFU调整

jiangjy 4 weeks ago
parent
commit
964e4261dc

+ 3 - 0
FrameworkLocal/Common/CommonData/DeviceData/AITFFUData.cs

@@ -30,6 +30,9 @@ namespace MECF.Framework.Common.CommonData.DeviceData
         [DataMember]
         public string DisplayName { get; set; }
 
+        [DataMember]
+        public string RTName { get; set; }
+
         /// <summary>
         /// 当前设定值
         /// </summary>

+ 2 - 43
Furnace/FurnaceRT/Config/System.sccfg

@@ -438,15 +438,7 @@
 	<configs name="FFU" visible="false">
 		<config default="350" name="LSPEED" description="" max="9999" min="0" paramter="" tag="" unit=""  type="Double"   />
 		<config default="2500" name="HSPEED" description="" max="9999" min="0" paramter="" tag="" unit=""  type="Double"   />
-		<configs name="FFU1">
-			<config default="2500" name="SetSpeed" description=" set speed" max="" min="" paramter="" tag="" unit=""  type="String"   />
-		</configs>
-		<configs name="FFU2">
-			<config default="2500" name="SetSpeed" description=" set speed" max="" min="" paramter="" tag="" unit=""  type="String"   />
-		</configs>
-		<configs name="FFU3">
-			<config default="2500" name="SetSpeed" description=" set speed" max="" min="" paramter="" tag="" unit=""  type="String"   />
-		</configs>
+		
 		<configs name="FFU4">
 			<config default="2500" name="SetSpeed" description=" set speed" max="" min="" paramter="" tag="" unit=""  type="String"   />
 		</configs>
@@ -459,39 +451,6 @@
 		<configs name="FFU7">
 			<config default="2500" name="SetSpeed" description=" set speed" max="" min="" paramter="" tag="" unit=""  type="String"   />
 		</configs>
-		<configs name="FFU8">
-			<config default="2500" name="SetSpeed" description=" set speed" max="" min="" paramter="" tag="" unit=""  type="String"   />
-		</configs>
-		<configs name="FFU9">
-			<config default="2500" name="SetSpeed" description=" set speed" max="" min="" paramter="" tag="" unit=""  type="String"   />
-		</configs>
-		<configs name="FFU10">
-			<config default="2500" name="SetSpeed" description=" set speed" max="" min="" paramter="" tag="" unit=""  type="String"   />
-		</configs>
-		<configs name="FFU11">
-			<config default="2500" name="SetSpeed" description=" set speed" max="" min="" paramter="" tag="" unit=""  type="String"   />
-		</configs>
-		<configs name="FFU12">
-			<config default="2500" name="SetSpeed" description=" set speed" max="" min="" paramter="" tag="" unit=""  type="String"   />
-		</configs>
-		<configs name="FFU13">
-			<config default="2500" name="SetSpeed" description=" set speed" max="" min="" paramter="" tag="" unit=""  type="String"   />
-		</configs>
-		<configs name="FFU14">
-			<config default="2500" name="SetSpeed" description=" set speed" max="" min="" paramter="" tag="" unit=""  type="String"   />
-		</configs>
-		<configs name="FFU15">
-			<config default="2500" name="SetSpeed" description=" set speed" max="" min="" paramter="" tag="" unit=""  type="String"   />
-		</configs>
-		<configs name="FFU16">
-			<config default="2500" name="SetSpeed" description=" set speed" max="" min="" paramter="" tag="" unit=""  type="String"   />
-		</configs>
-		<configs name="FFU17">
-			<config default="2500" name="SetSpeed" description=" set speed" max="" min="" paramter="" tag="" unit=""  type="String"   />
-		</configs>
-		<configs name="FFU18">
-			<config default="2500" name="SetSpeed" description=" set speed" max="" min="" paramter="" tag="" unit=""  type="String"   />
-		</configs>
 	</configs>
 
 	<configs name="WaferRobot">
@@ -521,7 +480,7 @@
 				<configs name="P000">
 					<config default="Z轴TP用点动速度"            name="SettingItem"		description=""			max=""				min=""		paramter=""			type="String" />
 					<config default="200000"					name="SetValue"			description=""			max="250000"			min="1"		paramter=""			type="Double" />
-					<config default="0.001mm/s"					name="Unit"				description=""			max=""				min=""		paramter=""			type="String" />
+					<config default="0.001mm/s"					name="UnFit"				description=""			max=""				min=""		paramter=""			type="String" />
 					<config default="Speed"					    name="Type"				description=""			max=""				min=""		paramter=""			type="String" />
 					<config default="Z"							name="Axis"				description=""			max=""				min=""		paramter=""			type="String" />
 				</configs>

+ 29 - 12
Furnace/FurnaceRT/Devices/IoFFU.cs

@@ -4,6 +4,7 @@ using Aitex.Core.RT.Device.Unit;
 using Aitex.Core.RT.IOCore;
 using Aitex.Core.RT.OperationCenter;
 using Aitex.Core.RT.SCCore;
+using DocumentFormat.OpenXml.EMMA;
 using MECF.Framework.Common.CommonData.DeviceData;
 using MECF.Framework.Common.Equipment;
 using System;
@@ -106,7 +107,10 @@ namespace FurnaceRT.Devices
                 {
                     return (int)(_isFloatAioType ? _aiSetSpeed.FloatValue : _aiSetSpeed.Value);
                 }
-
+                if (_aoSetSpeed != null)
+                {
+                    return (int)(_isFloatAioType ? _aoSetSpeed.FloatValue : _aoSetSpeed.Value);
+                }
                 return 0;
             }
         }
@@ -202,7 +206,8 @@ namespace FurnaceRT.Devices
                 AITFFUData data = new AITFFUData()
                 {
                     SetPoint = _aoSetSpeed != null ? _aoSetSpeed.FloatValue : 0,
-                    DisplayName = Name,
+                    DisplayName = Display,
+                    RTName = Name,
                     IsSwitchOn = GetFFUStatusEnum() == FFUStatusEnum.ON,
                     Feedback = CurrentSpeed,
                     Max = _scFFUHSPEED != null ? Convert.ToInt32((double)_scFFUHSPEED.Value) : 0,
@@ -242,6 +247,7 @@ namespace FurnaceRT.Devices
             base.Name = node.GetAttribute("id");
             base.Display = node.GetAttribute("display");
             base.DeviceID = node.GetAttribute("schematicId");
+            var scRootPath = string.IsNullOrEmpty(node.GetAttribute("scRootPath")) ? Module : node.GetAttribute("scRootPath");
 
             _isFloatAioType = !string.IsNullOrEmpty(node.GetAttribute("aioType")) && (node.GetAttribute("aioType") == "float");
 
@@ -268,23 +274,27 @@ namespace FurnaceRT.Devices
 
             _doEnable = ParseDoNode("doEnable", node, ioModule);
             _doWriteCommand = ParseDoNode("doWriteCommand", node, ioModule);
+            _scSetSpeed = ParseScNode("SetSpeed", node, ioModule, $"{scRootPath}.{Name}.SetSpeed");
+
         }
         public bool Initialize()
         {
             _scFFULSPEED = SC.GetConfigItem($"System.FFU.LSPEED");
             _scFFUHSPEED = SC.GetConfigItem($"System.FFU.HSPEED");
-            _scSetSpeed = SC.GetConfigItem($"System.FFU.{Name}.SetSpeed");
             DATA.Subscribe($"{Module}.{Name}.DeviceData", () => DeviceData);
-            DATA.Subscribe($"{Module}.{Name}.GroupNumber", () => GroupNumber);
-            DATA.Subscribe($"{Module}.{Name}.AddressNumber", () => AddressNumber);
-            DATA.Subscribe($"{Module}.{Name}.IsSwitch", () => IsSwitch);
+
             DATA.Subscribe($"{Module}.{Name}.SetSpeed", () => SetSpeed);
-            DATA.Subscribe($"{Module}.{Name}.MaxSpeed", () => MaxSpeed);
-            DATA.Subscribe($"{Module}.{Name}.IsReset", () => IsReset);
-            DATA.Subscribe($"{Module}.{Name}.ErrorTimer", () => ErrorTimer);
             DATA.Subscribe($"{Module}.{Name}.CurrentSpeed", () => CurrentSpeed);
-            DATA.Subscribe($"{Module}.{Name}.Voltage", () => Voltage);
-            DATA.Subscribe($"{Module}.{Name}.Current", () => Current);
+
+            //DATA.Subscribe($"{Module}.{Name}.GroupNumber", () => GroupNumber);
+            //DATA.Subscribe($"{Module}.{Name}.AddressNumber", () => AddressNumber);
+            //DATA.Subscribe($"{Module}.{Name}.IsSwitch", () => IsSwitch);
+            //DATA.Subscribe($"{Module}.{Name}.MaxSpeed", () => MaxSpeed);
+            //DATA.Subscribe($"{Module}.{Name}.IsReset", () => IsReset);
+            //DATA.Subscribe($"{Module}.{Name}.ErrorTimer", () => ErrorTimer);
+    
+            //DATA.Subscribe($"{Module}.{Name}.Voltage", () => Voltage);
+            //DATA.Subscribe($"{Module}.{Name}.Current", () => Current);
             OP.Subscribe($"{Module}.{Name}.SetCurrectSpeed", (string cmd, object[] param) =>
             {
                 SetCurrectSpeed(param);
@@ -295,10 +305,17 @@ namespace FurnaceRT.Devices
             //    SetRetract(out string reason);
             //    return true;
             //});
-
+            InitSCAOData();
             return true;
         }
+        private void InitSCAOData()
+        {
+
+            if (_scSetSpeed != null && _aoSetSpeed != null)
+                _aoSetSpeed.FloatValue = (float)_scSetSpeed.DoubleValue;
 
+
+        }
         public bool SetCurrectSpeed(object[] param)
         {
             if (param != null && param.Length > 0)

+ 6 - 1
Furnace/FurnaceRT/Equipments/PMs/PMModule.cs

@@ -535,7 +535,12 @@ namespace FurnaceRT.Equipments.PMs
             OP.Subscribe($"{Name}.BypassStandbyFactor", SeBypassStandbyFactor);
             OP.Subscribe($"{Name}.SetCommand", SetCommand);
             OP.Subscribe($"{Name}.SetN2PurgeMode", SetN2PurgeMode);
-
+            OP.Subscribe($"{Name}.SetAllFFUPower", (out string reason, int time, object[] param) =>
+            {
+                reason = string.Empty;
+                SetAllFFUPower(param);
+                return true;
+            });
             //OP.Subscribe($"{Name}.SetTemperatureDetail",)
             OP.Subscribe($"{Name}.SetSensorRecipeOK", SetSensorRecipeOK);
             OP.Subscribe($"{Name}.SetSensorPROCManualOK", SetSensorPROCManualOK);

+ 9 - 0
Furnace/FurnaceRT/Equipments/PMs/PMModuleDevice.cs

@@ -2572,7 +2572,16 @@ namespace FurnaceRT.Equipments.PMs
         //#endregion
 
         //#endregion
+        private void SetAllFFUPower(object[] param)
+        {
+            var value = param[0].ToString();
+
+            foreach (var item in _fFUs)
+            {
+                item.SetSwitch(bool.Parse(value));
 
+            }
+        }
         private void SetHeaterControlParameters(object[] param)
         {
             //Mode参数;Correct Table;PID Table

+ 2 - 2
Furnace/FurnaceSimulator/Instances/SimulatorSystem.cs

@@ -716,7 +716,7 @@ namespace FurnaceSimulator.Instances
                 {
                     IO.AI[$"PM1.AI_O2Concentration"].FloatValue = i;
 
-                  System.Threading.Thread.Sleep(300); // 延迟500毫秒以便观察输出
+                 // System.Threading.Thread.Sleep(300); // 延迟500毫秒以便观察输出
                 }
                 increasing = false; // 切换方向
             }
@@ -725,7 +725,7 @@ namespace FurnaceSimulator.Instances
                 for (int i = end; i >= start; i--)
                 {
                     IO.AI[$"PM1.AI_O2Concentration"].FloatValue = i;
-                    System.Threading.Thread.Sleep(300);// 延迟500毫秒以便观察输出
+                  //  System.Threading.Thread.Sleep(300);// 延迟500毫秒以便观察输出
                 }
                 increasing = true; // 切换方向
             }

+ 16 - 3
Furnace/FurnaceUI/Views/Maintenances/FFUConfigViewModel.cs

@@ -71,10 +71,11 @@ namespace FurnaceUI.Views.Maintenances
                 var deviceName = item.Split('.').ToList()[1];
                 FFUDataList.Add(new FFUData()
                 {
+                    RTName = deviceName,
                     DisplayName = deviceName,
                 });
             }
-            ffuDictionary = FFUDataList.ToDictionary(a => a.DisplayName);
+            ffuDictionary = FFUDataList.ToDictionary(a => a.RTName);
         }
         protected override void InvokeAfterUpdateProperty(Dictionary<string, object> data)
         {
@@ -84,12 +85,14 @@ namespace FurnaceUI.Views.Maintenances
             {
                 foreach (var item in values)
                 {
-                    if (item==null || !ffuDictionary.TryGetValue(item.DisplayName, out var ffu))
+                    if (item==null || !ffuDictionary.TryGetValue(item.RTName, out var ffu))
                         continue;
 
+                    ffu.DisplayName = item.DisplayName;
                     ffu.MaxValue = item.Max.ToString();
                     ffu.MinValue = item.Min.ToString();
                     ffu.ActualValue = item.Feedback;
+                    ffu.RTName = item.RTName;
                     ffu.IsSwitch = item.IsSwitchOn;
                     ffu.Value = item.SetPoint.ToString();
                     ffu.LastSetValue = item.SetPoint;
@@ -116,7 +119,7 @@ namespace FurnaceUI.Views.Maintenances
                     //    DialogBox.ShowWarning($"{dataItem.DisplayName} setValue={setValue}, limit is ({min}, {max})");
                     //    return;
                     //}
-                    InvokeClient.Instance.Service.DoOperation($"PM1.{dataItem.DisplayName}.SetCurrectSpeed", value);
+                    InvokeClient.Instance.Service.DoOperation($"PM1.{dataItem.RTName}.SetCurrectSpeed", value);
 
                 }
 
@@ -174,6 +177,16 @@ namespace FurnaceUI.Views.Maintenances
             }
         }
 
+        private string _rtName;
+        public string RTName
+        {
+            get => _rtName;
+            set
+            {
+                _rtName = value;
+                NotifyOfPropertyChange(nameof(RTName));
+            }
+        }
 
         private string _displayName;
         public string DisplayName