Przeglądaj źródła

1.修改PM home时,先Do Reset

JET-YDB\JET-YANGDB 1 tydzień temu
rodzic
commit
f3e147f249
2 zmienionych plików z 37 dodań i 0 usunięć
  1. 5 0
      VirgoRT/Devices/JetPM.cs
  2. 32 0
      VirgoRT/Modules/PMs/PMHomeRoutine.cs

+ 5 - 0
VirgoRT/Devices/JetPM.cs

@@ -512,6 +512,11 @@ namespace VirgoRT.Devices
             _SubstrateTemperature?.SetMessager(SC.GetValue<int>($"{Module}.SubstrateTemperatureTCTMDiff"));
             _SubstrateTemperature?.SetMessager(SC.GetValue<int>($"{Module}.SubstrateTemperatureTCTMDiff"));
             _ForelineTemperature?.SetMessager(SC.GetValue<int>($"{Module}.ForelineTemperatureTCTMDiff"));
             _ForelineTemperature?.SetMessager(SC.GetValue<int>($"{Module}.ForelineTemperatureTCTMDiff"));
             _CHBWallTemperature?.SetMessager(SC.GetValue<int>($"{Module}.CHBWallTemperatureTCTMDiff"));
             _CHBWallTemperature?.SetMessager(SC.GetValue<int>($"{Module}.CHBWallTemperatureTCTMDiff"));
+            //_ResetPlcSignal?.Reset();
+        }
+
+        public void ResetPlcSignal()
+        {
             _ResetPlcSignal?.Reset();
             _ResetPlcSignal?.Reset();
         }
         }
 
 

+ 32 - 0
VirgoRT/Modules/PMs/PMHomeRoutine.cs

@@ -10,6 +10,8 @@ namespace VirgoRT.Modules.PMs
         enum RoutineStep
         enum RoutineStep
         {
         {
             LiftPinOrig,
             LiftPinOrig,
+            ResetPlcSignal,
+            ResetPlcSignalDelay,
             Home,
             Home,
         }
         }
 
 
@@ -36,6 +38,8 @@ namespace VirgoRT.Modules.PMs
             {
             {
                 if (_chamber != null && _chamber.IsInstalled)
                 if (_chamber != null && _chamber.IsInstalled)
                 {
                 {
+                    ResetPlcSignal((int)RoutineStep.ResetPlcSignal, 10);
+                    TimeDelay((int)RoutineStep.ResetPlcSignalDelay, 10);
                     SetLiftPinPos((int)RoutineStep.LiftPinOrig,     MovementPosition.Origin,    200);
                     SetLiftPinPos((int)RoutineStep.LiftPinOrig,     MovementPosition.Origin,    200);
                     Home((int)RoutineStep.Home,                     10);
                     Home((int)RoutineStep.Home,                     10);
                 }
                 }
@@ -63,6 +67,34 @@ namespace VirgoRT.Modules.PMs
         {
         {
         }
         }
 
 
+        public void ResetPlcSignal(int id, int timeout)
+        {
+            Tuple<bool, Result> ret = ExecuteAndWait(id, () =>
+            {
+                Notify($"Run {_chamber.Name} ResetPlcSignal");
+
+                _chamber.ResetPlcSignal();
+
+                return true;
+            }, () => true, timeout * 1000);
+
+            if (ret.Item1)
+            {
+                if (ret.Item2 == Result.FAIL)
+                {
+                    Stop($"{_chamber.Name} ResetPlcSignal error");
+                    throw new RoutineFaildException();
+                }
+                else if (ret.Item2 == Result.TIMEOUT) //timeout
+                {
+                    Stop($"ResetPlcSignal timeout, over {timeout} seconds");
+                    throw new RoutineFaildException();
+                }
+                else
+                    throw new RoutineBreakException();
+            }
+        }
+
         public void Home(int id, int timeout)
         public void Home(int id, int timeout)
         {
         {
             Tuple<bool, Result> ret = ExecuteAndWait(id, () =>
             Tuple<bool, Result> ret = ExecuteAndWait(id, () =>