Bläddra i källkod

优化压差开siltdoor功能

# Conflicts:
#	Venus/Venus_RT/Modules/RouteManager.cs
lixiang 1 år sedan
förälder
incheckning
46aa26403c

+ 3 - 2
Venus/Venus_MainPages/ViewModels/OperationOverViewModel.cs

@@ -979,11 +979,12 @@ namespace Venus_MainPages.ViewModels
 
         private void UIEvents_PMDoorRaiseChangedEvent(DoorPara obj)
         {
-            InvokeClient.Instance.Service.DoOperation($"{obj?.ModuleName}.SlitDoor.{obj?.IsOpen}");
+            //InvokeClient.Instance.Service.DoOperation($"{obj?.ModuleName}.SlitDoor.{obj?.IsOpen}");
+            InvokeClient.Instance.Service.DoOperation($"{obj?.ModuleName}.SetSlitDoor",obj.IsOpen=="Open"?true:false);
         }
         private void UIEvents_LLTDoorRaiseChangedEvent(DoorPara obj)
         {
-            InvokeClient.Instance.Service.DoOperation($"TM.{obj.ModuleName}TSlitDoor.{obj?.IsOpen}");
+            InvokeClient.Instance.Service.DoOperation($"TM.SetMFSlitDoor",obj.ModuleName, obj.IsOpen == "Open" ? true : false);
         }
         private void UIEvents_LLEDoorRaiseChangedEvent(DoorPara obj)
         {

+ 1 - 47
Venus/Venus_RT/Devices/IODevices/IoCylinder.cs

@@ -212,53 +212,7 @@ namespace Venus_RT.Devices
                     return true;
                 }
             }
-            string operation = isOpen ? "开" : "关";
-            if (Name == "SlitDoor")
-            {
-
-                bool tmIsOnline = (bool)DATA.Poll("TM.IsOnline");
-                if (tmIsOnline == true)
-                {
-                    int difference = SC.GetValue<int>($"TM.WithPMPressureDifference");
-                    int tmPressure = Convert.ToInt32(DATA.Poll("TM.TMProcessGauge.Value"));
-                    int pmPressure = Convert.ToInt32(DATA.Poll($"{Module}.ProcessHighPressure"));
-                    if (Math.Abs(tmPressure - pmPressure) > difference)
-                    {
-                        LOG.Write(eEvent.ERR_TM, Module, $"TM正在控压,{Module}与TM压差过大,不可以{operation}{Module}腔体SlitDoor");
-                        return true;
-                    }
-                }
-            }
-            if (Name == "LLATSlitDoor")
-            {
-                bool tmIsOnline = (bool)DATA.Poll("TM.IsOnline");
-                if (tmIsOnline == true)
-                {
-                    int difference = SC.GetValue<int>($"TM.WithPMPressureDifference");
-                    int tmPressure = Convert.ToInt32(DATA.Poll("TM.TMProcessGauge.Value"));
-                    int llPressure = Convert.ToInt32(DATA.Poll("TM.LLAPressureGauge.Value"));
-                    if (Math.Abs(tmPressure - llPressure) > difference)
-                    {
-                        LOG.Write(eEvent.ERR_TM, Module, $"TM正在控压,LLA与TM压差过大,不可以{operation}LLATSlitDoor");
-                        return true;
-                    }
-                }
-            }
-            if (Name == "LLBTSlitDoor")
-            {
-                bool tmIsOnline = (bool)DATA.Poll("TM.IsOnline");
-                if (tmIsOnline == true)
-                {
-                    int difference = SC.GetValue<int>($"TM.WithPMPressureDifference");
-                    int tmPressure = Convert.ToInt32(DATA.Poll("TM.TMProcessGauge.Value"));
-                    int llPressure = Convert.ToInt32(DATA.Poll("TM.LLBPressureGauge.Value"));
-                    if (Math.Abs(tmPressure - llPressure) > difference)
-                    {
-                        LOG.Write(eEvent.ERR_TM, Module, $"TM正在控压,LLB与TM压差过大,不可以{operation}LLBTSlitDoor");
-                        return true;
-                    }
-                }
-            }
+           
             ONSetPoint = isOpen;
             reason += _error;
             reason += " ";

+ 31 - 0
Venus/Venus_RT/Devices/JetVenusPM.cs

@@ -655,7 +655,38 @@ namespace Venus_RT.Devices
         {
           
             reason = string.Empty;
+            if (open)
+            {
+                bool _isATMMode = SC.GetValue<bool>("System.IsATMMode");
+                if (_isATMMode)
+                {
+                    if (!IsATM)
+                    {
+                        reason = $"{Module} is not ATM, can not open slit door";
+                        LOG.Write(eEvent.ERR_DEVICE_INFO, Module, reason);
+                        return false;
+                    }
 
+                    if (!IsTMATM)
+                    {
+                        reason = $"LoadLock is not ATM, can not open slit door";
+                        LOG.Write(eEvent.ERR_DEVICE_INFO, Module, reason);
+                        return false;
+                    }
+                }
+                else
+                {
+
+                    double maxPressureDifference = SC.GetValue<double>("System.PMTMMaxPressureDifference");
+                    if (Math.Abs(TMPressure - ChamberPressure) > maxPressureDifference)
+                    {
+                        reason = $"{Module} and TM pressure difference exceeds the max limit {maxPressureDifference}";
+                        LOG.Write(eEvent.ERR_DEVICE_INFO, Module, reason);
+                        return false;
+                    }
+                }
+
+            }
             return _slitDoor.SetCylinder(open, out reason);
         }
 

+ 6 - 0
Venus/Venus_RT/Devices/TM/JetTM.cs

@@ -371,6 +371,12 @@ namespace Venus_RT.Devices
                 _TMMfc.SetPoint = (int)(args[0]);
                 return true;
             });
+            OP.Subscribe($"TM.SetMFSlitDoor", (cmd, args) => 
+            {
+                var module = (ModuleName)Enum.Parse(typeof(ModuleName), args[0].ToString());
+                TurnMFSlitDoor(module, (bool)args[1], out _);
+                return true;
+            });
             _isATMMode = SC.GetValue<bool>("System.IsATMMode");
             _TMVacAtmMode.TurnValve(_isATMMode, out string _);
 

+ 4 - 4
Venus/Venus_RT/Devices/TM/SIASUNRobot.cs

@@ -121,7 +121,7 @@ namespace Venus_RT.Devices
             _currentOP = OPStep.PickExtend;
             _status = RState.Running;
             SetRobotMovingInfo(RobotAction.Extending, hand, chamber);
-            return _SendCommand($"PICK {_StationNumbers[chamber]} SLOT {slot + 1} ARM {Hand2Arm(hand)} ENRT");
+            return _SendCommand($"PICK {_StationNumbers[chamber]} SLOT {slot + 1} ARM {Hand2Arm(hand)} ENRT NR");
         }
         public bool PickRetract(ModuleName chamber, int slot, Hand hand)
         {
@@ -131,7 +131,7 @@ namespace Venus_RT.Devices
             _currentOP = OPStep.PickRetract;
             _status = RState.Running;
             SetRobotMovingInfo(RobotAction.Retracting, hand, chamber);
-            return _SendCommand($"PICK {_StationNumbers[chamber]} SLOT {slot + 1} ARM {Hand2Arm(hand)} STRT");
+            return _SendCommand($"PICK {_StationNumbers[chamber]} SLOT {slot + 1} ARM {Hand2Arm(hand)} STRT NR");
         }
         public bool PlaceExtend(ModuleName chamber, int slot, Hand hand)
         {
@@ -141,7 +141,7 @@ namespace Venus_RT.Devices
             _currentOP = OPStep.PlaceExtent;
             _status = RState.Running;
             SetRobotMovingInfo(RobotAction.Extending, hand, chamber);
-            return _SendCommand($"PLACE {_StationNumbers[chamber]} SLOT {slot + 1} ARM {Hand2Arm(hand)} ENRT");
+            return _SendCommand($"PLACE {_StationNumbers[chamber]} SLOT {slot + 1} ARM {Hand2Arm(hand)} ENRT NR");
         }
         public bool PlaceRetract(ModuleName chamber, int slot, Hand hand)
         {
@@ -152,7 +152,7 @@ namespace Venus_RT.Devices
             _status = RState.Running;
             SetRobotMovingInfo(RobotAction.Retracting, hand, chamber);
             
-            return _SendCommand($"PLACE {_StationNumbers[chamber]} SLOT {slot + 1} ARM {Hand2Arm(hand)} STRT");
+            return _SendCommand($"PLACE {_StationNumbers[chamber]} SLOT {slot + 1} ARM {Hand2Arm(hand)} STRT NR");
         }
         public bool Pick(ModuleName station, int slot, Hand hand)
         {