Procházet zdrojové kódy

update minice 配方切换

git-svn-id: http://10.4.3.168:50001/svn/Furnace@106 dbcde07d-dcf5-c148-8a84-ac3097b7778e
Jiangjinyuan před 1 měsícem
rodič
revize
5a1a3db76d

+ 13 - 0
FrameworkLocal/Common/Common.csproj

@@ -50,6 +50,12 @@
     <Reference Include="PresentationCore" />
     <Reference Include="PresentationFramework" />
     <Reference Include="PresentationFramework.Aero" />
+    <Reference Include="RTCommunicatorBase">
+      <HintPath>..\..\ThirdParty\Minices\RTCommunicatorBase.dll</HintPath>
+    </Reference>
+    <Reference Include="RTCommunicatorTLV">
+      <HintPath>..\..\ThirdParty\Minices\RTCommunicatorTLV.dll</HintPath>
+    </Reference>
     <Reference Include="SciChart.Charting">
       <HintPath>..\..\ThirdParty\dlls\SciCart\SciChart.Charting.dll</HintPath>
     </Reference>
@@ -80,6 +86,12 @@
     <Reference Include="System.Data" />
     <Reference Include="System.Net.Http" />
     <Reference Include="System.Xml" />
+    <Reference Include="TLVProtocal">
+      <HintPath>..\..\ThirdParty\Minices\TLVProtocal.dll</HintPath>
+    </Reference>
+    <Reference Include="UniversalNetFrame451">
+      <HintPath>..\..\ThirdParty\Minices\UniversalNetFrame451.dll</HintPath>
+    </Reference>
     <Reference Include="WindowsBase" />
     <Reference Include="WindowsFormsIntegration" />
   </ItemGroup>
@@ -329,6 +341,7 @@
     <Compile Include="Fsm\ModuleEntity.cs" />
     <Compile Include="Jobs\EnumTransferJobState.cs" />
     <Compile Include="Jobs\TransferJobInfo.cs" />
+    <Compile Include="Minics\MinicsManager.cs" />
     <Compile Include="ParameterCenter\DefaultParameterFileContext.cs" />
     <Compile Include="ParameterCenter\IParameterFileContext.cs" />
     <Compile Include="ParameterCenter\IParameterService.cs" />

+ 5 - 5
FrameworkLocal/Common/DBCore/DatabaseTable.cs

@@ -151,11 +151,11 @@ namespace MECF.Framework.Common.DBCore
                 {"start_time", typeof(DateTime) },
             });
 
-            DB.CreateTableColumn("schedule_maintenance", new Dictionary<string, Type>()
-            {
-                  {"association_process_recipeName", typeof(string) },
-                  {"addition_information_display_supplement", typeof(string) },
-            });
+            //DB.CreateTableColumn("schedule_maintenance", new Dictionary<string, Type>()
+            //{
+            //      {"association_process_recipeName", typeof(string) },
+            //      {"addition_information_display_supplement", typeof(string) },
+            //});
         }
     }
 }

+ 3 - 0
FrameworkLocal/Common/Device/ModuleName.cs

@@ -14,6 +14,7 @@ namespace MECF.Framework.Common.Equipment
     [Serializable]
     public enum ModuleName
     {
+       
         [EnumMember]
         System = 0,
 
@@ -318,6 +319,8 @@ namespace MECF.Framework.Common.Equipment
         FIMS1,
         [EnumMember]
         FIMS2,
+        [EnumMember]
+        Minics = 0,
     }
 
     public static class ModuleHelper

+ 56 - 0
FrameworkLocal/Common/Minics/MinicsManager.cs

@@ -0,0 +1,56 @@
+using Aitex.Core.RT.Event;
+using Aitex.Core.RT.RecipeCenter;
+using Aitex.Core.RT.SCCore;
+using Aitex.Core.Util;
+using MECF.Framework.Common.Equipment;
+using MECF.Framework.Common.SCCore;
+using Microsoft.VisualBasic.Devices;
+using RTCommunicatorBase;
+using RTCommunicatorTLV;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Reflection;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace MECF.Framework.Common.Minics
+{
+    public class MinicsManager : Singleton<MinicsManager>, IRTMini8Provider
+    {
+        private RTCommunicator_TLV communicator = new RTCommunicator_TLV();
+
+        public void Connected(string ip, int port)
+        {
+            if (communicator.StartService(ip, port))
+            {
+                EV.PostInfoLog(ModuleName.Minics.ToString(), $"minics  Connected {ip}:{port} sucessful");
+            }
+            else
+            {
+                EV.PostAlarmLog(ModuleName.Minics.ToString(), $"minics  Connected {ip}:{port} error");
+            }
+
+        }
+        public void DisConnected(string ip, int port)
+        {
+            Console.WriteLine($"DisconnectedNotify {ip} {port}");
+        }
+        public void Initialize(string ip = "127.0.0.1", int port = 50052)
+        {
+            communicator.Initialize(this);
+            Connected(ip, port);
+        
+        }
+        public void End()
+        {
+            communicator.CloseService();
+
+        }
+        public void SelectMinicsConfig(string minicsConfigName)
+        {
+            communicator.SelectConfigFile(minicsConfigName);
+        }
+
+    }
+}

+ 6 - 0
Furnace/FurnaceRT/Config/FurnaceGemModel.xml

@@ -8405,6 +8405,12 @@
     <ECID id="1020180001" valueType="Ascii" logicalName="FFU.FFU9.SetSpeed" value="" min="" max="" eventTrigger="" units="" description=" set speed" isArray="false" />
     <ECID id="1020190001" valueType="Ascii" logicalName="FFU.HSPEED" value="" min="" max="" eventTrigger="" units="" description="" isArray="false" />
     <ECID id="1020190002" valueType="Ascii" logicalName="FFU.LSPEED" value="" min="" max="" eventTrigger="" units="" description="" isArray="false" />
+    <ECID id="1030010001" valueType="Ascii" logicalName="Minics.config1" value="" min="" max="" eventTrigger="" units="" description="config1" isArray="false" />
+    <ECID id="1030010002" valueType="Ascii" logicalName="Minics.config2" value="" min="" max="" eventTrigger="" units="" description="config2" isArray="false" />
+    <ECID id="1030010003" valueType="Ascii" logicalName="Minics.config3" value="" min="" max="" eventTrigger="" units="" description="config3" isArray="false" />
+    <ECID id="1030010004" valueType="Ascii" logicalName="Minics.config4" value="" min="" max="" eventTrigger="" units="" description="config4" isArray="false" />
+    <ECID id="1030010005" valueType="Ascii" logicalName="Minics.config5" value="" min="" max="" eventTrigger="" units="" description="config5" isArray="false" />
+    <ECID id="1030010006" valueType="Ascii" logicalName="Minics.CurrentTableName" value="" min="" max="" eventTrigger="" units="" description="CurrentTableName" isArray="false" />
     <ECID id="3310000001" valueType="Ascii" logicalName="PM1.RecipeEditParameter.WaferRobotParameter.Parameter.P151.Axis" value="" min="" max="" eventTrigger="" units="" description="" isArray="false" />
     <ECID id="3310000002" valueType="Ascii" logicalName="PM1.RecipeEditParameter.WaferRobotParameter.Parameter.P151.SettingItem" value="" min="" max="" eventTrigger="" units="" description="" isArray="false" />
     <ECID id="3310000003" valueType="Ascii" logicalName="PM1.RecipeEditParameter.WaferRobotParameter.Parameter.P151.SetValue" value="" min="" max="" eventTrigger="" units="" description="" isArray="false" />

+ 6 - 0
Furnace/FurnaceRT/Config/System.sccfg

@@ -415,6 +415,12 @@
 			<config default="30" name="TP6" description="TP6 time out" max="999" min="0" paramter="" tag="" unit="s" type="Integer" />
 		</configs>
 	</configs>
+	<configs name="Minics">
+		<config default="1" name="config1" description="config1" max="" min="" paramter="" tag="" unit=""  type="String"   />
+		<config default="2" name="config2" description="config2" max="" min="" paramter="" tag="" unit=""  type="String"   />
+		<config default="3" name="config3" description="config3" max="" min="" paramter="" tag="" unit=""  type="String"   />
+		
+	</configs>
 	<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"   />

Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 1 - 1
Furnace/FurnaceRT/Config/VIDs/_ECID.xml


+ 61 - 2
Furnace/FurnaceRT/Equipments/PMs/PMAux.cs

@@ -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)
             {

+ 3 - 0
Furnace/FurnaceRT/Instances/ToolLoader.cs

@@ -36,6 +36,7 @@ using FurnaceRT.Recipes;
 using Aitex.Core.RT.ParameterCenter;
 using FurnaceRT.Parameter;
 using Aitex.Core.RT.SCCore;
+using MECF.Framework.Common.Minics;
 
 namespace FurnaceRT.Instances
 {
@@ -59,6 +60,7 @@ namespace FurnaceRT.Instances
 
             Singleton<OperationManager>.Instance.Initialize();
 
+
             Singleton<DataManager>.Instance.Initialize();
 
             Singleton<DisplayManager>.Instance.Initialize();
@@ -85,6 +87,7 @@ namespace FurnaceRT.Instances
             WaferManager.Instance.Initialize();
             CarrierManager.Instance.Initialize();
             CarrierManager.Instance.Initialize();
+            Singleton<MinicsManager>.Instance.Initialize();
 
             Singleton<DeviceManager>.Instance.DisableAsyncInitialize = true;