Browse Source

update cell device rotation

chenkui 2 days ago
parent
commit
250aa4aede

+ 15 - 0
PunkHPX8_RT/Devices/VpwCell/VpwCellDevice.cs

@@ -6,6 +6,7 @@ using Aitex.Core.Util;
 using MECF.Framework.Common.Beckhoff.ModuleIO;
 using MECF.Framework.Common.CommonData.Prewet;
 using MECF.Framework.Common.CommonData.Vpw;
+using MECF.Framework.Common.Equipment;
 using MECF.Framework.Common.IOCore;
 using MECF.Framework.Common.Persistent.SRD;
 using MECF.Framework.Common.Persistent.Temperature;
@@ -267,11 +268,16 @@ namespace PunkHPX8_RT.Devices.VpwCell
                 LOG.WriteLog(eEvent.ERR_VPW, Module, $"Start rotation paramater is wrong");
                 return false;
             }
+<<<<<<< Updated upstream
             double targetPostion = (int)args[0]  * 6 * (int)args[1];
             object[] param = new object[] { "",targetPostion };
             int degSpeed = (int)args[0] * 6;
             SetRotationSpeed(degSpeed);
             return _rotationAxis.JogUpPosition("", param);
+=======
+            double targetPostion = (int)args[0] * 6 * (int)args[1];
+            return RotationProfilePosition(targetPostion);
+>>>>>>> Stashed changes
         }
 
         private bool StopRotationAction(string cmd, object[] args)
@@ -584,6 +590,15 @@ namespace PunkHPX8_RT.Devices.VpwCell
         /// <returns></returns>
         public bool RotationProfilePosition(double position)
         {
+            VpwMainDevice vpwCellDevice = DEVICE.GetDevice<VpwMainDevice>(ModuleName.VPWMain1.ToString());
+            if (vpwCellDevice != null)
+            {
+                if (!vpwCellDevice.CommonData.ChamberOpened && vpwCellDevice.CommonData.ChamberClosed)
+                {
+                    LOG.WriteLog(eEvent.ERR_AXIS, $"{Module}.{Name}", "chamber is not closed, Cannot execute GotoSavedPosition");
+                    return false;
+                }
+            }
             return _rotationAxis.ProfilePositionOperation(position);
         }
         /// <summary>

+ 1 - 10
PunkHPX8_RT/Devices/VpwCell/VpwRotationAxisInterLock.cs

@@ -53,16 +53,7 @@ namespace PunkHPX8_RT.Devices.VpwCell
                 LOG.WriteLog(eEvent.ERR_AXIS, $"{Module}.{Name}", "axis is switch off, Cannot execute GotoSavedPosition");
                 return false;
             }
-
-            VpwMainDevice vpwCellDevice = DEVICE.GetDevice<VpwMainDevice>(ModuleName.VPWMain1.ToString());
-            if (vpwCellDevice != null)
-            {
-                if (!vpwCellDevice.CommonData.ChamberOpened&&vpwCellDevice.CommonData.ChamberClosed)
-                {
-                    LOG.WriteLog(eEvent.ERR_AXIS, $"{Module}.{Name}", "chamber is not closed, Cannot execute GotoSavedPosition");
-                    return false;
-                }
-            }
+            
             return true;
         }
     }