Browse Source

add VenusSE tm related module in ui rt simulator && fix efem backround bug

zhouhr 1 year ago
parent
commit
1e7c808d19

+ 2 - 0
Venus/Venus_Core/Chamber.cs

@@ -8,6 +8,8 @@ namespace Venus_Core
         Kepler2300,
         Kepler2200A,
         Kepler2200B,
+        VenusSE,
+        VenusDE,
         None
     }
 }

+ 27 - 2
Venus/Venus_Core/VenusDevice.cs

@@ -128,13 +128,38 @@
         LLBTSlitDoor,
         LLAESlitDoor,
         LLBESlitDoor,
+
+        //se vce
+        VCESlitDoor,
+        VCESoftPumpValve,
+        VCEFastPumpValve,
+        VCESoftVentValve,
+        VCEFastVentValve,
+        VCEATMSensor,
+        TMATMSensor,
+        VCESlitDoorOpenEnable,
+        TMExtendVCEEnable,
+        //se pm
+        PMASlitDoor,
+        PMBSlitDoor,
+        PMCSlitDoor,
+        PMASlitDoorOpenEnable,
+        PMBSlitDoorOpenEnable,
+        PMCSlitDoorOpenEnable,
+        TMExtendPMAEnable,
+        TMExtendPMBEnable,
+        TMExtendPMCEnable,
+
+        //tm all
         TMValveN2,
         TMSoftPumpValve,
         TMFastPumpValve,
         TMPurgeValve,
         TMVentValve,
-        //TMSoftVentValve,
-        //TMFastVentValve,
+        TMSoftVentValve,
+        TMFastVentValve,
+
+        //kepler tm
         LLASoftPumpValve,
         LLAFastPumpValve,
         LLAPurgeValve,

+ 7 - 0
Venus/Venus_MainPages/Venus_MainPages.csproj

@@ -282,6 +282,9 @@
     <Compile Include="Views\VATPerformanceView.xaml.cs">
       <DependentUpon>VATPerformanceView.xaml</DependentUpon>
     </Compile>
+    <Compile Include="Views\VenusSeOperationOverView.xaml.cs">
+      <DependentUpon>VenusSeOperationOverView.xaml</DependentUpon>
+    </Compile>
     <Compile Include="Views\WaferAssociationUnit.xaml.cs">
       <DependentUpon>WaferAssociationUnit.xaml</DependentUpon>
     </Compile>
@@ -434,6 +437,10 @@
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>
     </Page>
+    <Page Include="Views\VenusSeOperationOverView.xaml">
+      <SubType>Designer</SubType>
+      <Generator>MSBuild:Compile</Generator>
+    </Page>
     <Page Include="Views\WaferAssociationUnit.xaml">
       <Generator>MSBuild:Compile</Generator>
       <SubType>Designer</SubType>

+ 2 - 3
Venus/Venus_RT/Config/System.sccfg

@@ -111,7 +111,7 @@
 		<config default="127.0.0.1:1102" name="IPAddress" nameView="IP Address" description="TM Robot IP、端口设置;default 10.0.0.100:13000" max="" min="" paramter="" tag="" unit="" type="String" />
 
 
-		<config default="1" name="TMRobotType" nameView="TM Robot Type" description="TM 类型,1=SIASUN新松 2==Brooks" max="10" min="1" paramter="" tag="" unit="" type="Integer" />
+		<config default="1" name="TMRobotType" nameView="TM Robot Type" description="TM 类型,1=SIASUN新松 2=HONGHU泓浒 3==Brooks" max="10" min="1" paramter="" tag="" unit="" type="Integer" />
 
 		<config default="100" name="SoftVentEndPressure" nameView="Soft Vent End Pressure" description="" max="30000" min="0" paramter="" tag="" unit="mTorr" type="Integer" />
 
@@ -123,7 +123,7 @@
 		<config default="6" name="PMDStationNumber" nameView="PMD Station Number" description="PMD Station Number" max="99" min="0" paramter="" tag="" unit="" type="Integer" />
 		<config default="7" name="PMEStationNumber" nameView="PME Station Number" description="PME Station Number" max="99" min="0" paramter="" tag="" unit="" type="Integer" />
 		<config default="8" name="PMFStationNumber" nameView="PMF Station Number" description="PMF Station Number" max="99" min="0" paramter="" tag="" unit="" type="Integer" />
-
+		
 		<config default="1" name="CheckLoadStation" nameView="Check Load Station Number" description="Station Number for Check Load" max="99" min="0" paramter="" tag="" unit="" type="Integer" />
 		
 		<config default="100" name="PumpBasePressure" nameView="Pump Base Pressure" description="" max="200" min="0" paramter="" tag="" unit="mTorr" type="Double" />
@@ -149,7 +149,6 @@
 		<config default="50"  name="WithPMPressureDifference"   nameView="TM PM Pressure Difference"   description="TM和PM压差" max="100" min="0" paramter="" tag="" unit="mTorr" type="Integer" />
 		<config default="0" name="SingleArmOption"   nameView="Single Arm Option"   description="0, both; 1, Blade1; 2, Blade2" max="2" min="0" paramter="" tag="" unit="" type="Integer" />
 		<config default="0" name="QueryAWCOption"   nameView="Query AWC Option"   description="0, None; 1, Only TMPick Open; 2, Only TMPlace Open; 3, Both Open" max="3" min="0" paramter="" tag="" unit="" type="Integer" />
-
 		<configs name="TM_MFC1" nameView="MFC1" >
 			<config default="true" name="Enable" nameView="Enable" description="Enable gas 1 or not" tag="" unit="" type="Bool" />
 			<config default="O2" name="GasName" nameView="Gas Name" description="Name of NO.1 gas stick" tag="" unit="" type="String" />

+ 38 - 3
Venus/Venus_RT/Devices/EFEM/JetEfem.cs

@@ -32,6 +32,7 @@ namespace Venus_RT.Devices.EFEM
         private EfemMessage _currentMsg;
         private EfemMessage _backroundMsg;
         private bool _backround = false;
+        private List<EfemMessage> _backroundlist = new List<EfemMessage>();
         private EfemMessage _revMsg;
         private bool _LiftIsUp = false;
         private bool _LiftIsDown = false;
@@ -148,6 +149,7 @@ namespace Venus_RT.Devices.EFEM
                 };
 
                 _backround = true;
+                _backroundlist.Add(_backroundMsg);
                 return _socket.Write(_backroundMsg.ToString());
             }
             else
@@ -238,6 +240,7 @@ namespace Venus_RT.Devices.EFEM
             };
 
             _backround = true;
+            _backroundlist.Add(_backroundMsg);
             _status = RState.Running;
             return _socket.Write(_backroundMsg.ToString());
         }
@@ -490,6 +493,7 @@ namespace Venus_RT.Devices.EFEM
             };
 
             _backround = true;
+            _backroundlist.Add(_backroundMsg);
             return _socket.Write(_backroundMsg.ToString());
         }
         public override bool Load(ModuleName mod)
@@ -502,6 +506,7 @@ namespace Venus_RT.Devices.EFEM
             };
 
             _backround = true;
+            _backroundlist.Add(_backroundMsg);
             return _socket.Write(_backroundMsg.ToString());
         }
         public override bool Unload(ModuleName mod)
@@ -514,6 +519,7 @@ namespace Venus_RT.Devices.EFEM
             };
 
             _backround = true;
+            _backroundlist.Add(_backroundMsg);
             return _socket.Write(_backroundMsg.ToString());
         }
         public override bool ReadCarrierId(ModuleName mod)
@@ -526,6 +532,7 @@ namespace Venus_RT.Devices.EFEM
             };
 
             _backround = true;
+            _backroundlist.Add(_backroundMsg);
             return _socket.Write(_backroundMsg.ToString());
         }
         public override bool WriteCarrierId(ModuleName mod, string id)
@@ -538,6 +545,7 @@ namespace Venus_RT.Devices.EFEM
             };
 
             _backround = true;
+            _backroundlist.Add(_backroundMsg);
             return _socket.Write(_backroundMsg.ToString());
         }
         public override bool ReadTagData(ModuleName mod)
@@ -550,6 +558,7 @@ namespace Venus_RT.Devices.EFEM
             };
 
             _backround = true;
+            _backroundlist.Add(_backroundMsg);
             return _socket.Write(_backroundMsg.ToString());
         }
         public override bool WriteTagData(ModuleName mod, string tagData)
@@ -562,6 +571,7 @@ namespace Venus_RT.Devices.EFEM
             };
 
             _backround = true;
+            _backroundlist.Add(_backroundMsg);
             return _socket.Write(_backroundMsg.ToString());
         }
         public override bool Dock(ModuleName mod)
@@ -574,6 +584,7 @@ namespace Venus_RT.Devices.EFEM
             };
 
             _backround = true;
+            _backroundlist.Add(_backroundMsg);
             return _socket.Write(_backroundMsg.ToString());
         }
         public override bool Undock(ModuleName mod)
@@ -586,6 +597,7 @@ namespace Venus_RT.Devices.EFEM
             };
 
             _backround = true;
+            _backroundlist.Add(_backroundMsg);
             return _socket.Write(_backroundMsg.ToString());
         }
         public override bool Clamp(ModuleName mod, bool isUnloadClamp)
@@ -598,6 +610,7 @@ namespace Venus_RT.Devices.EFEM
             };
 
             _backround = true;
+            _backroundlist.Add(_backroundMsg);
             _bIsUnloadClamp = isUnloadClamp;
             return _socket.Write(_backroundMsg.ToString());
         }
@@ -611,6 +624,7 @@ namespace Venus_RT.Devices.EFEM
             };
 
             _backround = true;
+            _backroundlist.Add(_backroundMsg);
             return _socket.Write(_backroundMsg.ToString());
         }
         public override bool SetThickness(ModuleName mod, string thickness)
@@ -623,6 +637,7 @@ namespace Venus_RT.Devices.EFEM
             };
 
             _backround = true;
+            _backroundlist.Add(_backroundMsg);
             return _socket.Write(_backroundMsg.ToString());
         }
         public override void SetRobotMovingInfo(RobotAction action, Hand hand, ModuleName target)
@@ -815,12 +830,17 @@ namespace Venus_RT.Devices.EFEM
         {
             if(message.Operation != EfemOperation.Ready)
             {
-                var operation = _backround ? _backroundMsg.Operation : _currentMsg.Operation;
-                if (operation != message.Operation)
+                if (_currentMsg.Operation != message.Operation && SearchForDeleteBackMsg(message))
                 {
-                    LOG.Write(eEvent.ERR_EFEM_COMMON_FAILED, ModuleName.EfemRobot, $"OnCommandUpdated() unexpected return: {message.Operation}, expect: {operation}");
+                    LOG.Write(eEvent.ERR_EFEM_COMMON_FAILED, ModuleName.EfemRobot, $"OnCommandUpdated() unexpected return: {message.Operation}, expect: {_currentMsg.Operation}");
                     return;
                 }
+                //var operation = _backround ? _backroundMsg.Operation : _currentMsg.Operation;
+                //if (operation != message.Operation)
+                //{
+                //    LOG.Write(eEvent.ERR_EFEM_COMMON_FAILED, ModuleName.EfemRobot, $"OnCommandUpdated() unexpected return: {message.Operation}, expect: {operation}");
+                //    return;
+                //}
             }
 
             switch(message.Operation)
@@ -850,6 +870,7 @@ namespace Venus_RT.Devices.EFEM
                             _LPMs[0].OnHomed();
                             _LPMs[1].OnHomed();
                             _LPMs[2].OnHomed();
+                            _backroundlist = new List<EfemMessage>() { };
                         }
                         else if(ModuleHelper.IsLoadPort(_currentMsg.Port))
                         {
@@ -901,6 +922,7 @@ namespace Venus_RT.Devices.EFEM
                         {
                             GripStateBlade2 = _currentMsg.Parameters[0];
                         }
+                        SearchForDeleteBackMsg(message);
                     }
                     break;
                 case EfemOperation.Ready:
@@ -928,6 +950,19 @@ namespace Venus_RT.Devices.EFEM
                     break;
             }
         }
+        private bool SearchForDeleteBackMsg(EfemMessage message)
+        {
+            //searchForDelete
+            for (int i = 0;i< _backroundlist.Count;i++)
+            {
+                if (_backroundlist[i].Operation == message.Operation && _backroundlist[i].Port == message.Port)
+                {
+                    _backroundlist.RemoveAt(i);//消除被去除后的空间 否则内存的GC变量将持续增长
+                    return true;
+                }
+            }
+            return false;
+        }
 
         async void SendBack(string data)
         {

+ 0 - 346
Venus/Venus_RT/Devices/VCE/HongHuVR.cs

@@ -1,346 +0,0 @@
-using Aitex.Core.RT.Log;
-using Aitex.Core.RT.SCCore;
-using Aitex.Core.Util;
-using Aitex.Sorter.Common;
-using MECF.Framework.Common.CommonData;
-using MECF.Framework.Common.Equipment;
-using MECF.Framework.Common.SubstrateTrackings;
-using MECF.Framework.RT.EquipmentLibrary.HardwareUnits.LoadPorts;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Text.RegularExpressions;
-using System.Threading.Tasks;
-using Venus_Core;
-using Venus_RT.Modules;
-
-namespace Venus_RT.Devices.VCE
-{
-    //泓浒
-    enum VRStep
-    {
-        Idle,
-        Home,
-        Move,
-        Halt,
-        Release,
-        Goto,
-        Pick,
-        PickExtend,
-        PickRetract,
-        Place,
-        PlaceExtend,
-        PlaceRetract,
-        Xfer,
-        CheckLoad_ArmA,
-        CheckLoad_ArmB,
-        SetLoad,
-        ReQueryLoad,
-    }
-    public class HongHuVR
-    {
-        private readonly AsyncSocket _socket;
-        private const string EOF = "\r";
-        private RState _status;
-        private bool _IsHomed;
-        private VRStep _currentStep = VRStep.Idle;
-        private Dictionary<ModuleName, int> _StationNumbers = new Dictionary<ModuleName, int>();
-        private RobotMoveInfo _robotMoveInfo = new RobotMoveInfo();
-        public RState Status { get { return _status; } }
-        public bool IsHomed { get { return _IsHomed; } }
-        private string Hand2Arm(Hand hand) => hand == Hand.Blade1 ? "B" : "A";
-
-        private readonly Regex _rex_check_load = new Regex(@"LOAD\s+(A|B)\s+(\w+)\s*");
-        private readonly Regex _rex_error_code = new Regex(@"_ERR\s+(\d+)\s*");
-        public RobotMoveInfo VaccumRobotMoveInfo { get { return _robotMoveInfo; } }
-
-        public Dictionary<string, string> _error2msg = new Dictionary<string, string>()
-        {
-            { "701" , "设备检查互锁,发现无法执行"},
-            { "722" , "设备动作,但是发生异常"},
-        };
-
-        public HongHuVR()
-        {
-
-            _socket = new AsyncSocket("", EOF);
-            _socket.Connect(SC.GetStringValue($"VacRobot.IPAddress"));
-            _socket.OnDataChanged += OnReceiveMessage;
-            _socket.OnErrorHappened += OnErrorHappen;
-
-            _status = RState.Init;
-            _IsHomed = false;
-        }
-        //初始化某个轴
-        //1.清错
-        //2.设备上电
-        //3.各轴按顺序运动
-        public bool Home()
-        {
-            _status = RState.Running;
-            _currentStep = VRStep.Home;
-            return _SendCommand("HOME ALL");
-        }
-        public bool Halt()
-        {
-            _status = RState.Running;
-            _currentStep = VRStep.Halt;
-            return _SendCommand("HALT");
-        }
-        public bool Release()
-        {
-            _status = RState.Running;
-            _currentStep = VRStep.Release;
-            return _SendCommand("RELEASE");
-        }
-        //public bool MOVE()
-        //{
-        //}
-        public bool Pick(ModuleName station, int slot, Hand hand)
-        {
-            if (!CheckRobotStatus())
-                return false;
-
-            _currentStep = VRStep.Pick;
-            _status = RState.Running;
-            SetRobotMovingInfo(RobotAction.Picking, hand, station);
-            return _SendCommand($"PICK {_StationNumbers[station]} SLOT {slot} ARM {Hand2Arm(hand)}");
-        }
-
-        public bool PickExtend(ModuleName station, int slot, Hand hand)
-        {
-            if (!CheckRobotStatus())
-                return false;
-
-            _currentStep = VRStep.PickExtend;
-            _status = RState.Running;
-            SetRobotMovingInfo(RobotAction.Picking, hand, station);
-            return _SendCommand($"PICK {_StationNumbers[station]} SLOT {slot} ARM {Hand2Arm(hand)} ENRT NR");
-        }
-
-        public bool PickRetract(ModuleName station, int slot, Hand hand)
-        {
-            if (!CheckRobotStatus())
-                return false;
-
-            _currentStep = VRStep.PickRetract;
-            _status = RState.Running;
-            SetRobotMovingInfo(RobotAction.Picking, hand, station);
-            return _SendCommand($"PICK {_StationNumbers[station]} SLOT {slot} ARM {Hand2Arm(hand)} STRT NR");
-        }
-        public bool Place(ModuleName station, int slot, Hand hand)
-        {
-            if (!CheckRobotStatus())
-                return false;
-
-            _currentStep = VRStep.Place;
-            _status = RState.Running;
-            SetRobotMovingInfo(RobotAction.Picking, hand, station);
-            return _SendCommand($"PLACE {_StationNumbers[station]} SLOT {slot} ARM {Hand2Arm(hand)}");
-        }
-        public bool PlaceExtend(ModuleName station, int slot, Hand hand)
-        {
-            if (!CheckRobotStatus())
-                return false;
-
-            _currentStep = VRStep.Place;
-            _status = RState.Running;
-            SetRobotMovingInfo(RobotAction.Picking, hand, station);
-            return _SendCommand($"PLACE {_StationNumbers[station]} SLOT {slot} ARM {Hand2Arm(hand)} ENRT NR");
-        }
-        public bool PlaceRetract(ModuleName station, int slot, Hand hand)
-        {
-            if (!CheckRobotStatus())
-                return false;
-
-            _currentStep = VRStep.Place;
-            _status = RState.Running;
-            SetRobotMovingInfo(RobotAction.Picking, hand, station);
-            return _SendCommand($"PLACE {_StationNumbers[station]} SLOT {slot} ARM {Hand2Arm(hand)} STRT NR");
-        }
-        public bool Transfer(ModuleName fromstation, ModuleName tostation, Hand hand)
-        {
-            if (!CheckRobotStatus())
-                return false;
-
-            _currentStep = VRStep.Xfer;
-            _status = RState.Running;
-            return _SendCommand($"XFER ARM {Hand2Arm(hand)} {_StationNumbers[fromstation]} {_StationNumbers[tostation]}");
-
-        }
-        public bool CheckLoad(Hand hand = Hand.Blade1)
-        {
-            if (_currentStep != VRStep.Home && _currentStep != VRStep.CheckLoad_ArmA && !CheckRobotStatus())
-                return false;
-
-            _currentStep = hand == Hand.Blade2 ? VRStep.CheckLoad_ArmB : VRStep.CheckLoad_ArmA;
-            _status = RState.Running;
-            return _SendCommand($"CHECK LOAD ARM {Hand2Arm(hand)}");
-        }
-        //public bool SETLOAD()
-        //{
-
-        //}
-        //public bool RQLOAD()
-        //{
-
-        //}
-        //public bool PICKALGN(){}
-        private bool _SendCommand(string cmd)
-        {
-            LOG.WriteSingeLine(eEvent.INFO_TM_ROBOT, ModuleName.VaccumRobot, $"Send Command to HongHu VaccumRobot: {cmd}");
-            return _socket.Write(cmd + EOF);
-        }
-
-        private bool CheckRobotStatus()
-        {
-            if (Status == RState.Init)
-            {
-                LOG.Write(eEvent.ERR_DEVICE_INFO, ModuleName.VaccumRobot, "VaccumRobot is not homed, please home first.");
-                return false;
-            }
-            else if (Status == RState.Running)
-            {
-                LOG.Write(eEvent.ERR_DEVICE_INFO, ModuleName.VaccumRobot, "VaccumRobot is busy, please wait a minute");
-                return false;
-            }
-            else if (Status == RState.Failed || Status == RState.Timeout)
-            {
-                LOG.Write(eEvent.ERR_DEVICE_INFO, ModuleName.VaccumRobot, "VaccumRobot has a error, please check and fix the hardware issue and home it");
-                return false;
-            }
-
-            return true;
-        }
-
-        private void OnReceiveMessage(string RevMsg)
-        {
-            LOG.WriteSingeLine(eEvent.INFO_TM_ROBOT, ModuleName.VaccumRobot, $"Receive message from HongHu VaccumRobot: {RevMsg}, while {_currentStep}");
-
-            if (_rex_error_code.IsMatch(RevMsg))
-            {
-                _IsHomed = false;
-                _status = RState.Failed;
-
-                var results = _rex_error_code.Match(RevMsg);
-                ErrorMessageHandler(results.Groups[1].Value);
-                return;
-            }
-
-            switch (_currentStep)
-            {
-                case VRStep.Goto:
-                case VRStep.Xfer:
-                case VRStep.Pick:
-                case VRStep.PickExtend:
-                case VRStep.PickRetract:
-                case VRStep.Place:
-                case VRStep.PlaceExtend:
-                case VRStep.PlaceRetract:
-                    {
-                        if (RevMsg.Trim() == "_RDY" || (RevMsg.Contains("_RDY") && !RevMsg.Contains("_ERR")))
-                        {
-                            _currentStep = VRStep.Idle;
-                            _status = RState.End;
-                        }
-                        else
-                        {
-                            ReportWrongMsg(RevMsg);
-                        }
-
-                        if (_currentStep != VRStep.PickExtend && _currentStep != VRStep.PlaceExtend)
-                            SetRobotMovingInfo(RobotAction.None, Hand.Both, ModuleName.VaccumRobot);
-                    }
-                    break;
-                case VRStep.Home:
-                    {
-
-                        if (RevMsg.Trim() == "_RDY")
-                        {
-                            //CheckLoad(Hand.Blade1);
-                            _currentStep = VRStep.Idle;
-                            _status = RState.End;
-                            _IsHomed = true;
-                        }
-                        else
-                            ReportWrongMsg(RevMsg);
-                    }
-                    break;
-                case VRStep.CheckLoad_ArmA:
-                    {
-                        if (_rex_check_load.IsMatch(RevMsg))
-                        {
-                            GetCheckLoadResult(RevMsg);
-
-                            CheckLoad(Hand.Blade2);
-                        }
-                        else
-                            ReportWrongMsg(RevMsg);
-                    }
-                    break;
-                case VRStep.CheckLoad_ArmB:
-                    {
-                        if (_rex_check_load.IsMatch(RevMsg))
-                        {
-                            GetCheckLoadResult(RevMsg);
-
-                            _currentStep = VRStep.Idle;
-                            _status = RState.End;
-                            _IsHomed = true;
-                        }
-                    }
-                    break;
-                default:
-                    if (!RevMsg.Contains("_EVENT"))
-                        ReportWrongMsg(RevMsg);
-                    break;
-            }
-        }
-
-        private void GetCheckLoadResult(string revMsg)
-        {
-            Match result = _rex_check_load.Match(revMsg);
-
-            string Arm = result.Groups[1].Value;
-            string WaferStatus = result.Groups[2].Value;
-            if (WaferStatus == "ON")
-            {
-                WaferManager.Instance.CreateWafer(ModuleName.VaccumRobot, Arm == "A" ? 0 : 1, Aitex.Core.Common.WaferStatus.Unknown);
-            }
-        }
-
-        private void ErrorMessageHandler(string errorcode)
-        {
-            string ErrorInfo;
-            if (_error2msg.ContainsKey(errorcode))
-            {
-                ErrorInfo = _error2msg[errorcode];
-                LOG.Write(eEvent.ERR_DEVICE_INFO, ModuleName.VaccumRobot, ErrorInfo);
-            }
-            else
-            {
-                LOG.Write(eEvent.ERR_DEVICE_INFO, ModuleName.VaccumRobot, $"Dictionary Not Contains error code:{errorcode}");
-            }
-        }
-
-        private void OnErrorHappen(ErrorEventArgs args)
-        {
-            Singleton<RouteManager>.Instance.TM.PostMsg(TMEntity.MSG.Error);
-            LOG.Write(eEvent.ERR_DEVICE_INFO, ModuleName.VaccumRobot, $"HongHu VaccumRobot Error: {args.Reason} while {_currentStep}");
-        }
-
-        private void ReportWrongMsg(string revMsg)
-        {
-            LOG.Write(eEvent.ERR_DEVICE_INFO, ModuleName.VaccumRobot, $"Receive wrong message:{revMsg} while {_currentStep}");
-        }
-
-        public void SetRobotMovingInfo(RobotAction action, Hand hand, ModuleName target)
-        {
-            _robotMoveInfo.Action = action;
-            _robotMoveInfo.ArmTarget = hand == Hand.Blade1 ? RobotArm.ArmA : (hand == Hand.Both ? RobotArm.Both : RobotArm.ArmB);
-            _robotMoveInfo.BladeTarget = $"{_robotMoveInfo.ArmTarget}.{target}";
-        }
-
-    }
-}

+ 31 - 2
Venus/Venus_RT/Devices/VCE/HongHuVce.cs

@@ -1,8 +1,10 @@
-using Aitex.Core.RT.Log;
+using Aitex.Core.Common;
+using Aitex.Core.RT.Log;
 using Aitex.Core.RT.SCCore;
 using Aitex.Core.Util;
 using MECF.Framework.Common.Communications;
 using MECF.Framework.Common.Equipment;
+using MECF.Framework.Common.SubstrateTrackings;
 using MECF.Framework.RT.ModuleLibrary.VceModules;
 using System;
 using System.Collections.Generic;
@@ -86,6 +88,23 @@ namespace Venus_RT.Devices.VCE
         public override bool IsReady => _status == RState.Init || _status == RState.End;
         public override bool IsError => _status == RState.Failed || _status == RState.Timeout;
         public override bool IsInit => _status == RState.Init;
+
+        private string[] _slotMap = new string[25];
+        public string SlotMap
+        {
+            get
+            {
+                if (_slotMap == null)
+                {
+                    _slotMap = new string[25];
+                }
+                for (int i = 0; i < _slotMap.Length; i++)
+                {
+                    _slotMap[i] = ((int)WaferManager.Instance.GetWafer(_moduleName, i).Status).ToString();
+                }
+                return string.Join("", _slotMap);
+            }
+        }
         #endregion
 
         //传入slot数量
@@ -198,7 +217,17 @@ namespace Venus_RT.Devices.VCE
                                 waferinfo = wafersingleinfo + waferinfo;//添加到数据中
                             }
                             //请将数据按照反向槽位进行解析存入到wafermanager中
-
+                            for (int i= waferinfo.Length - 1; i > 0; i--)
+                            {
+                                if (waferinfo[i] == '1')
+                                {
+                                    WaferManager.Instance.CreateWafer(_moduleName, waferinfo.Length - i, WaferStatus.Normal);
+                                }
+                                else
+                                {
+                                    WaferManager.Instance.CreateWafer(_moduleName, waferinfo.Length - i, WaferStatus.Empty);
+                                }
+                            }
                             break;
                     }
                 }

+ 10 - 1
Venus/Venus_RT/Modules/RouteManager.cs

@@ -18,7 +18,8 @@ using Venus_Core;
 using Venus_RT.Modules.PMs;
 using Aitex.Core.RT.Log;
 using Venus_RT.HostWrapper;
-
+using Venus_RT.Modules.VCE;
+using Venus_RT.Devices.PreAligner;
 
 namespace Venus_RT.Modules
 {
@@ -78,6 +79,9 @@ namespace Venus_RT.Modules
 
         public EfemEntity EFEM { get; private set; }
 
+        public VceEntity VCE { get; private set; }
+
+
         public string Name { get; set; }
 
         public bool IsAutoMode
@@ -171,6 +175,11 @@ namespace Venus_RT.Modules
             if (ModuleHelper.IsInstalled(ModuleName.EFEM))
                 EFEM = new EfemEntity();
 
+            if (ModuleHelper.IsInstalled(ModuleName.VCE1))
+                VCE = new VceEntity(ModuleName.VCE1);
+
+                
+
             fsm = new StateMachine<RouteManager>(Name, (int)RtState.Init, 200);
 
             SubscribeOperation();

+ 23 - 1
Venus/Venus_RT/Modules/TM/TMEntity.cs

@@ -19,6 +19,8 @@ using System.Timers;
 using Aitex.Core.RT.SCCore;
 using Aitex.Core.Backend;
 using System.Windows.Controls;
+using MECF.Framework.Common.DataCenter;
+using Venus_RT.Devices.VCE;
 
 namespace Venus_RT.Modules
 {
@@ -158,7 +160,27 @@ namespace Venus_RT.Modules
         {
             //_tm                 = Singleton<JetTM>.Instance;
             _tm                 = DEVICE.GetDevice<JetTM>("TM");
-            _robot              = new SIASUNRobot();
+            _robot = new SIASUNRobot();
+
+            //switch (SC.GetValue<int>($"TM.TMRobotType"))
+            //{
+            //    case 0:
+            //        _robot = new SIASUNRobot();
+            //        break;
+            //    case 1:
+            //        _robot = new HongHuVR();
+            //        break;
+            //}
+
+            //switch (SC.GetValue<int>($"TM.TMType"))
+            //{
+            //    case 0:
+            //        _tm = DEVICE.GetDevice<JetTM>("TM");
+            //        break;
+            //    case 1:
+            //        //_tm = DEVICE.GetDevice<HongHuTM>("TM");
+            //        break;
+            //}
 
             _pickRoutine    = new MFPickRoutine(_tm, _robot);
             _placeRoutine   = new MFPlaceRoutine(_tm, _robot);

+ 7 - 1
Venus/Venus_RT/Venus_RT.csproj

@@ -162,11 +162,12 @@
     <Compile Include="Devices\PreAligner\IPreAlign.cs" />
     <Compile Include="Devices\SkyPump.cs" />
     <Compile Include="Devices\SMCChiller.cs" />
+    <Compile Include="Devices\TM\HongHuTM.cs" />
     <Compile Include="Devices\TM\ITransferRobot.cs" />
     <Compile Include="Devices\TM\JetTM.cs" />
     <Compile Include="Devices\TM\SIASUNRobot.cs" />
     <Compile Include="Devices\VCE\HongHuVce.cs" />
-    <Compile Include="Devices\VCE\HongHuVR.cs" />
+    <Compile Include="Devices\TM\HongHuVR.cs" />
     <Compile Include="Devices\VirgoSignalTower.cs" />
     <Compile Include="FAs\FaEvent.cs" />
     <Compile Include="FAs\FaEventItem.cs" />
@@ -260,6 +261,7 @@
     <Compile Include="Modules\TM\MFSwapRoutine.cs" />
     <Compile Include="Modules\TM\MFVentRoutine.cs" />
     <Compile Include="Modules\TM\TMEntity.cs" />
+    <Compile Include="Modules\TM\VenusEntity\SETMEntity.cs" />
     <Compile Include="Modules\VCE\VceEntity.cs" />
     <Compile Include="Properties\AssemblyInfo.cs">
       <SubType>Code</SubType>
@@ -287,6 +289,7 @@
       <CopyToOutputDirectory>Always</CopyToOutputDirectory>
     </Content>
     <Resource Include="Config\PM\VenusSE\VenusSEIoDefine.xml" />
+    <Resource Include="Config\PM\VenusSE\VenusSEDeviceModel.xml" />
     <Content Include="Config\TM\DeviceModelVenus_MF.xml">
       <CopyToOutputDirectory>Always</CopyToOutputDirectory>
     </Content>
@@ -302,6 +305,9 @@
     <Content Include="Config\TM\TMInterlock.xml">
       <CopyToOutputDirectory>Always</CopyToOutputDirectory>
     </Content>
+    <Resource Include="Config\TM\VenusSE\_ioDefineVenus_MF.xml" />
+    <Resource Include="Config\TM\VenusSE\DeviceModelVenus_MF.xml" />
+    <Resource Include="Config\TM\VenusSE\TMInterlock.xml" />
     <Content Include="Config\TM\_ioDefineVenus_MF.xml">
       <CopyToOutputDirectory>Always</CopyToOutputDirectory>
     </Content>

+ 2 - 0
Venus/Venus_Simulator/Venus_Simulator.csproj

@@ -94,6 +94,7 @@
     <Compile Include="Devices\PendulumValveMockPMC.cs" />
     <Compile Include="Devices\PendulumValveMockPMB.cs" />
     <Compile Include="Devices\PendulumValveMockPMA.cs" />
+    <Compile Include="Devices\SETMSimulatorServer.cs" />
     <Compile Include="Devices\SkyPumpMockLL.cs" />
     <Compile Include="Devices\SkyPumpMockPMD.cs" />
     <Compile Include="Devices\SkyPumpMockPMC.cs" />
@@ -557,6 +558,7 @@
   </ItemGroup>
   <ItemGroup />
   <ItemGroup>
+    <Resource Include="Config\_ioDefineVenusSE_MF.xml" />
     <Content Include="Config\_ioDefineKepler2200A.xml">
       <CopyToOutputDirectory>Always</CopyToOutputDirectory>
     </Content>