Selaa lähdekoodia

update simulator

chenkui 1 kuukausi sitten
vanhempi
commit
cc0e47497a

+ 9 - 9
CyberX8_RT/Config/Devices/GalilControllerCfg-Simulator.xml

@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="utf-8"?>
 <?xml version="1.0" encoding="utf-8"?>
 <GalilControllerConfig>
 <GalilControllerConfig>
 	<GalilDeviceConfig Module="PUF1" IpAddress="127.0.0.1" Port="58678" SendTimeout="2000" RecvTimeout="2000" GalilType="Galil40">
 	<GalilDeviceConfig Module="PUF1" IpAddress="127.0.0.1" Port="58678" SendTimeout="2000" RecvTimeout="2000" GalilType="Galil40">
-		<GalilAxisConfig Name="Flip" Index="0" Type="Galil">
+		<GalilAxisConfig Name="Flip" Index="0" Type="Galil"  CNType="-1">
 			<Speed>1000000</Speed>
 			<Speed>1000000</Speed>
 			<Acceleration>2000000</Acceleration>
 			<Acceleration>2000000</Acceleration>
 			<Deceleration>2000000</Deceleration>
 			<Deceleration>2000000</Deceleration>
@@ -15,7 +15,7 @@
 			<NegativeTorqueLimit>130</NegativeTorqueLimit>
 			<NegativeTorqueLimit>130</NegativeTorqueLimit>
 			<PositiveTorqueLimit>20</PositiveTorqueLimit>
 			<PositiveTorqueLimit>20</PositiveTorqueLimit>
 		</GalilAxisConfig>
 		</GalilAxisConfig>
-		<GalilAxisConfig Name="Rotation" Index="1" Type="Galil">
+		<GalilAxisConfig Name="Rotation" Index="1" Type="Galil"  CNType="-1">
 			<Speed>500000</Speed>
 			<Speed>500000</Speed>
 			<Acceleration>500000</Acceleration>
 			<Acceleration>500000</Acceleration>
 			<Deceleration>250000</Deceleration>
 			<Deceleration>250000</Deceleration>
@@ -31,7 +31,7 @@
 		</GalilAxisConfig>
 		</GalilAxisConfig>
 	</GalilDeviceConfig>
 	</GalilDeviceConfig>
 	<GalilDeviceConfig Module="Loader1" IpAddress="127.0.0.2" Port="58679" SendTimeout="2000" RecvTimeout="2000"  GalilType="Galil21">
 	<GalilDeviceConfig Module="Loader1" IpAddress="127.0.0.2" Port="58679" SendTimeout="2000" RecvTimeout="2000"  GalilType="Galil21">
-		<GalilAxisConfig Name="LSA" Index="4" Type="GalilLipsel">
+		<GalilAxisConfig Name="LSA" Index="4" Type="GalilLipsel"  CNType="-1">
 			<Speed>150000</Speed>
 			<Speed>150000</Speed>
 			<Acceleration>200000</Acceleration>
 			<Acceleration>200000</Acceleration>
 			<Deceleration>200000</Deceleration>
 			<Deceleration>200000</Deceleration>
@@ -45,7 +45,7 @@
 			<NegativeTorqueLimit>130</NegativeTorqueLimit>
 			<NegativeTorqueLimit>130</NegativeTorqueLimit>
 			<PositiveTorqueLimit>20</PositiveTorqueLimit>
 			<PositiveTorqueLimit>20</PositiveTorqueLimit>
 		</GalilAxisConfig>
 		</GalilAxisConfig>
-		<GalilAxisConfig Name="TiltA" Index="5" Type="Galil">
+		<GalilAxisConfig Name="TiltA" Index="5" Type="Galil"  CNType="-1">
 			<Speed>150000</Speed>
 			<Speed>150000</Speed>
 			<Acceleration>200000</Acceleration>
 			<Acceleration>200000</Acceleration>
 			<Deceleration>200000</Deceleration>
 			<Deceleration>200000</Deceleration>
@@ -59,7 +59,7 @@
 			<NegativeTorqueLimit>130</NegativeTorqueLimit>
 			<NegativeTorqueLimit>130</NegativeTorqueLimit>
 			<PositiveTorqueLimit>20</PositiveTorqueLimit>
 			<PositiveTorqueLimit>20</PositiveTorqueLimit>
 		</GalilAxisConfig>
 		</GalilAxisConfig>
-		<GalilAxisConfig Name="ShuttleA" Index="6" Type="Galil">
+		<GalilAxisConfig Name="ShuttleA" Index="6" Type="Galil"  CNType="-1">
 			<Speed>200000</Speed>
 			<Speed>200000</Speed>
 			<Acceleration>200000</Acceleration>
 			<Acceleration>200000</Acceleration>
 			<Deceleration>200000</Deceleration>
 			<Deceleration>200000</Deceleration>
@@ -73,7 +73,7 @@
 			<NegativeTorqueLimit>130</NegativeTorqueLimit>
 			<NegativeTorqueLimit>130</NegativeTorqueLimit>
 			<PositiveTorqueLimit>20</PositiveTorqueLimit>
 			<PositiveTorqueLimit>20</PositiveTorqueLimit>
 		</GalilAxisConfig>
 		</GalilAxisConfig>
-		<GalilAxisConfig Name="Rotation" Index="3" Type="Galil">
+		<GalilAxisConfig Name="Rotation" Index="3" Type="Galil"  CNType="-1">
 			<Speed>100000</Speed>
 			<Speed>100000</Speed>
 			<Acceleration>50000</Acceleration>
 			<Acceleration>50000</Acceleration>
 			<Deceleration>50000</Deceleration>
 			<Deceleration>50000</Deceleration>
@@ -87,7 +87,7 @@
 			<NegativeTorqueLimit>130</NegativeTorqueLimit>
 			<NegativeTorqueLimit>130</NegativeTorqueLimit>
 			<PositiveTorqueLimit>20</PositiveTorqueLimit>
 			<PositiveTorqueLimit>20</PositiveTorqueLimit>
 		</GalilAxisConfig>
 		</GalilAxisConfig>
-		<GalilAxisConfig Name="LSB" Index="0" Type="GalilLipsel">
+		<GalilAxisConfig Name="LSB" Index="0" Type="GalilLipsel"  CNType="-1">
 			<Speed>150000</Speed>
 			<Speed>150000</Speed>
 			<Acceleration>200000</Acceleration>
 			<Acceleration>200000</Acceleration>
 			<Deceleration>200000</Deceleration>
 			<Deceleration>200000</Deceleration>
@@ -101,7 +101,7 @@
 			<NegativeTorqueLimit>130</NegativeTorqueLimit>
 			<NegativeTorqueLimit>130</NegativeTorqueLimit>
 			<PositiveTorqueLimit>20</PositiveTorqueLimit>
 			<PositiveTorqueLimit>20</PositiveTorqueLimit>
 		</GalilAxisConfig>
 		</GalilAxisConfig>
-		<GalilAxisConfig Name="TiltB" Index="1" Type="Galil">
+		<GalilAxisConfig Name="TiltB" Index="1" Type="Galil"  CNType="-1">
 			<Speed>150000</Speed>
 			<Speed>150000</Speed>
 			<Acceleration>200000</Acceleration>
 			<Acceleration>200000</Acceleration>
 			<Deceleration>200000</Deceleration>
 			<Deceleration>200000</Deceleration>
@@ -115,7 +115,7 @@
 			<NegativeTorqueLimit>130</NegativeTorqueLimit>
 			<NegativeTorqueLimit>130</NegativeTorqueLimit>
 			<PositiveTorqueLimit>20</PositiveTorqueLimit>
 			<PositiveTorqueLimit>20</PositiveTorqueLimit>
 		</GalilAxisConfig>
 		</GalilAxisConfig>
-		<GalilAxisConfig Name="ShuttleB" Index="2" Type="Galil">
+		<GalilAxisConfig Name="ShuttleB" Index="2" Type="Galil"  CNType="-1">
 			<Speed>200000</Speed>
 			<Speed>200000</Speed>
 			<Acceleration>200000</Acceleration>
 			<Acceleration>200000</Acceleration>
 			<Deceleration>200000</Deceleration>
 			<Deceleration>200000</Deceleration>

+ 1 - 12
CyberX8_RT/Modules/PUF/PufCalibrateRoutine.cs

@@ -21,7 +21,6 @@ namespace CyberX8_RT.Modules.PUF
         #endregion
         #endregion
         private enum PufCalibrateStep
         private enum PufCalibrateStep
         {
         {
-            CheckValid,
             VacuumOff,
             VacuumOff,
             SaveConfig,
             SaveConfig,
             End
             End
@@ -47,27 +46,17 @@ namespace CyberX8_RT.Modules.PUF
 
 
         public RState Monitor()
         public RState Monitor()
         {
         {
-            Runner.Run(PufCalibrateStep.CheckValid,CheckValid,100)
-                .Run(PufCalibrateStep.VacuumOff, VacuumAOff, CheckVacuumOff, _timeOut)
+            Runner.Run(PufCalibrateStep.VacuumOff, VacuumAOff, _timeOut)
                 .Run(PufCalibrateStep.SaveConfig, SaveConfig, NullFun, _timeOut)
                 .Run(PufCalibrateStep.SaveConfig, SaveConfig, NullFun, _timeOut)
                 .End(PufCalibrateStep.End,NullFun);
                 .End(PufCalibrateStep.End,NullFun);
 
 
             return Runner.Status; 
             return Runner.Status; 
         }
         }
-        private bool CheckValid()
-        {
-            return true;
-        }
         private bool VacuumAOff()
         private bool VacuumAOff()
         {
         {
             return _vacuum.VacuumAOff();
             return _vacuum.VacuumAOff();
         }
         }
 
 
-        private bool CheckVacuumOff()
-        {
-            return DATA.Poll<bool>($"{Module}",CHUCKA_RELEASE);
-        }
-
         private bool SaveConfig()
         private bool SaveConfig()
         {
         {
             _distanceSensor.SaveConfig(_offset1, _offset2);
             _distanceSensor.SaveConfig(_offset1, _offset2);

+ 6 - 20
CyberX8_RT/Modules/PUF/PufOnlyPlaceToLoaderRoutine.cs

@@ -131,7 +131,12 @@ namespace CyberX8_RT.Modules.PUF
         {
         {
             if (ModuleHelper.IsInstalled(ModuleName.Loader1))
             if (ModuleHelper.IsInstalled(ModuleName.Loader1))
             {
             {
-                return _loaderCrsAxis.Status == RState.Failed;
+                bool result= _loaderCrsAxis.Status == RState.Failed;
+                if (result)
+                {
+                    NotifyError(eEvent.ERR_PUF, $"lipsel axis goto unlock failed", 0);
+                }
+                return result;
             }
             }
             else
             else
             {
             {
@@ -274,25 +279,6 @@ namespace CyberX8_RT.Modules.PUF
             return false;
             return false;
         }
         }
         /// <summary>
         /// <summary>
-        /// 检验存在Wafer
-        /// </summary>
-        /// <returns></returns>
-        private bool CheckWaferAbsent()
-        {
-            if (_side == SideA)
-            {
-                return _vacuum.ChuckAVacuumStatus == WAFER_ABSENT;
-            }
-            else if (_side == SideB)
-            {
-                return _vacuum.ChuckBVacuumStatus == WAFER_ABSENT;
-            }
-            else
-            {
-                return false;
-            }
-        }
-        /// <summary>
         /// 启动
         /// 启动
         /// </summary>
         /// </summary>
         /// <param name="objs"></param>
         /// <param name="objs"></param>

+ 14 - 4
CyberX8_RT/Modules/PUF/PufPlaceToLoaderRoutine.cs

@@ -63,6 +63,10 @@ namespace CyberX8_RT.Modules.PUF
         /// </summary>
         /// </summary>
         public void Abort()
         public void Abort()
         {
         {
+            if (_onlyPlaceToLoaderRoutine != null)
+            {
+                _onlyPlaceToLoaderRoutine.Abort();
+            }
             _flipAxis.StopPositionOperation();
             _flipAxis.StopPositionOperation();
             _rotationAxis.StopPositionOperation();
             _rotationAxis.StopPositionOperation();
             Runner.Stop("Manual Abort");            
             Runner.Stop("Manual Abort");            
@@ -107,6 +111,7 @@ namespace CyberX8_RT.Modules.PUF
             RState state = _onlyPlaceToLoaderRoutine.Monitor();
             RState state = _onlyPlaceToLoaderRoutine.Monitor();
             if(state==RState.Failed||state==RState.Timeout)
             if(state==RState.Failed||state==RState.Timeout)
             {
             {
+                NotifyError(eEvent.ERR_PUF, "puf place wafer failed", 0);
                 return true;
                 return true;
             }
             }
             return false;
             return false;
@@ -156,7 +161,12 @@ namespace CyberX8_RT.Modules.PUF
         /// <returns></returns>
         /// <returns></returns>
         private bool CheckRotationPositionRunStop()
         private bool CheckRotationPositionRunStop()
         {
         {
-            return _rotationAxis.Status == RState.Failed;
+            bool result= _rotationAxis.Status == RState.Failed;
+            if (result)
+            {
+                NotifyError(eEvent.ERR_PUF, "rotation axis goto home failed", 0);
+            }
+            return result;
         }
         }
         /// <summary>
         /// <summary>
         /// 启动
         /// 启动
@@ -219,16 +229,16 @@ namespace CyberX8_RT.Modules.PUF
                     return false;
                     return false;
                 }
                 }
                 JetAxisBase loaderRotationaxis = DEVICE.GetDevice<JetAxisBase>($"{ModuleName.Loader1}.Rotation");
                 JetAxisBase loaderRotationaxis = DEVICE.GetDevice<JetAxisBase>($"{ModuleName.Loader1}.Rotation");
+                string side = _side == SIDE_A ? "A" : "B";
                 if (loaderRotationaxis != null)
                 if (loaderRotationaxis != null)
                 {
                 {
                     double loaderRotationPosition = loaderRotationaxis.MotionData.MotorPosition;
                     double loaderRotationPosition = loaderRotationaxis.MotionData.MotorPosition;
-                    if (!loaderRotationaxis.CheckPositionIsInStation(loaderRotationPosition, "LOADA"))
+                    if (!loaderRotationaxis.CheckPositionIsInStation(loaderRotationPosition, $"LOAD{_side}"))
                     {
                     {
-                        NotifyError(eEvent.ERR_PUF, $"Loader Rotation {loaderRotationPosition} is not in LOADA", -1);
+                        NotifyError(eEvent.ERR_PUF, $"Loader Rotation {loaderRotationPosition} is not in LOAD{_side}", -1);
                         return false;
                         return false;
                     }
                     }
                 }
                 }
-                string side = _side == SIDE_A ? "A" : "B";
                 //Loader1.SwingA 在Open
                 //Loader1.SwingA 在Open
                 JetAxisBase loaderShuttleAAxis = DEVICE.GetDevice<JetAxisBase>($"{ModuleName.Loader1}.Shuttle{side}");
                 JetAxisBase loaderShuttleAAxis = DEVICE.GetDevice<JetAxisBase>($"{ModuleName.Loader1}.Shuttle{side}");
                 if (loaderShuttleAAxis != null)
                 if (loaderShuttleAAxis != null)

+ 8 - 4
CyberX8_RT/Modules/PUF/PufPlaceVacuumCheckRoutine.cs

@@ -18,9 +18,10 @@ namespace CyberX8_RT.Modules.PUF
     {
     {
         private enum PlaceVacuumStep
         private enum PlaceVacuumStep
         {
         {
-            VerticalGotoLoaderPlaceDown,
-            VerticalGotoLoaderPlaceDownWait,
+            ChuckOut,
+            CheckChuckOut,
             VacuumOff,
             VacuumOff,
+            VacuumDelay,
             ChuckIn,
             ChuckIn,
             CheckChuckIn,
             CheckChuckIn,
             VacuumOn,
             VacuumOn,
@@ -80,8 +81,11 @@ namespace CyberX8_RT.Modules.PUF
         /// <returns></returns>
         /// <returns></returns>
         public RState Monitor()
         public RState Monitor()
         {
         {
-            Runner.Run(PlaceVacuumStep.VacuumOff, VacuumOff, _delay_1ms)
-                 .Run(PlaceVacuumStep.ChuckIn, () => { return _chuckRoutine.Start(false) == RState.Running; }, NullFun, 100)
+            Runner.Run(PlaceVacuumStep.ChuckOut, () => { return _chuckRoutine.Start(true) == RState.Running; }, NullFun, 100)
+                .WaitWithStopCondition(PlaceVacuumStep.CheckChuckOut, () => CommonFunction.CheckRoutineEndState(_chuckRoutine), () => CommonFunction.CheckRoutineStopState(_chuckRoutine))
+                .Run(PlaceVacuumStep.VacuumOff, VacuumOff, _delay_1ms)
+                .Delay(PlaceVacuumStep.VacuumDelay,500)
+                .Run(PlaceVacuumStep.ChuckIn, () => { return _chuckRoutine.Start(false) == RState.Running; }, NullFun, 100)
                 .WaitWithStopCondition(PlaceVacuumStep.CheckChuckIn, () => CommonFunction.CheckRoutineEndState(_chuckRoutine), () => CommonFunction.CheckRoutineStopState(_chuckRoutine))
                 .WaitWithStopCondition(PlaceVacuumStep.CheckChuckIn, () => CommonFunction.CheckRoutineEndState(_chuckRoutine), () => CommonFunction.CheckRoutineStopState(_chuckRoutine))
                 .Run(PlaceVacuumStep.VacuumOn, VacuumOn, _delay_1ms)
                 .Run(PlaceVacuumStep.VacuumOn, VacuumOn, _delay_1ms)
                 .Delay(PlaceVacuumStep.Delay, _chuckValveSwitchingTimeDelayInMilliSeconds)
                 .Delay(PlaceVacuumStep.Delay, _chuckValveSwitchingTimeDelayInMilliSeconds)

+ 2 - 2
Framework/SimulatorCore/Commons/SocketDeviceViewModel.cs

@@ -110,7 +110,7 @@ namespace MECF.Framework.Simulator.Core.Commons
                 TransactionLogItems.Add(new TransactionLogItem() { Incoming = obj, OccurTime = DateTime.Now.ToString("HH:mm:ss.fff") });
                 TransactionLogItems.Add(new TransactionLogItem() { Incoming = obj, OccurTime = DateTime.Now.ToString("HH:mm:ss.fff") });
                 if (TransactionLogItems.Count > maxItemNumber)
                 if (TransactionLogItems.Count > maxItemNumber)
                     TransactionLogItems = new ObservableCollection<TransactionLogItem>(TransactionLogItems.Skip(1).Take(maxItemNumber).ToList());
                     TransactionLogItems = new ObservableCollection<TransactionLogItem>(TransactionLogItems.Skip(1).Take(maxItemNumber).ToList());
-                Poll();
+                //Poll();
             }));
             }));
         }
         }
 
 
@@ -121,7 +121,7 @@ namespace MECF.Framework.Simulator.Core.Commons
                 TransactionLogItems.Add(new TransactionLogItem() { Outgoing = obj, OccurTime = DateTime.Now.ToString("HH:mm:ss.fff") });
                 TransactionLogItems.Add(new TransactionLogItem() { Outgoing = obj, OccurTime = DateTime.Now.ToString("HH:mm:ss.fff") });
                 if (TransactionLogItems.Count > maxItemNumber)
                 if (TransactionLogItems.Count > maxItemNumber)
                     TransactionLogItems = new ObservableCollection<TransactionLogItem>(TransactionLogItems.Skip(1).Take(maxItemNumber).ToList());
                     TransactionLogItems = new ObservableCollection<TransactionLogItem>(TransactionLogItems.Skip(1).Take(maxItemNumber).ToList());
-                Poll();
+                //Poll();
             }));
             }));
         }
         }