Browse Source

add QDR Prewet function;

chenkui 3 months ago
parent
commit
2facb74aa2

+ 0 - 8
CyberX8_RT/App.config

@@ -64,14 +64,6 @@
 				<endpoint address="net.tcp://localhost:8777/WaferHolderDataService" binding="netTcpBinding" bindingConfiguration="Aitex_netTcpBinding" contract="MECF.Framework.Common.WaferHolder.IWaferHolderDataService" />
 			</service>
 		</services>
-
-		<client>
-			<endpoint address="net.tcp://localhost:9002/PMService" behaviorConfiguration="EndpointBehavior" binding="netTcpBinding" bindingConfiguration="Aitex_netTcpBinding" contract="ClusterInterface.IPmService" name="Client_IPECVDService" />
-			<endpoint address="net.tcp://localhost:9004/PMService" behaviorConfiguration="EndpointBehavior" binding="netTcpBinding" bindingConfiguration="Aitex_netTcpBinding" contract="ClusterInterface.IPmService" name="Client_IIBEService" />
-			<endpoint address="net.tcp://localhost:9006/PMService" behaviorConfiguration="EndpointBehavior" binding="netTcpBinding" bindingConfiguration="Aitex_netTcpBinding" contract="ClusterInterface.IPmService" name="Client_IICPService" />
-			<endpoint address="net.tcp://192.168.10.20:5771/EPDService" behaviorConfiguration="EndpointBehavior" binding="netTcpBinding" bindingConfiguration="Aitex_netTcpBinding" contract="EPInterface.IEPDService" name="Client_IEPDService" />
-			<endpoint address="net.tcp://192.168.10.20:5773/EPDCallbackService" behaviorConfiguration="EndpointBehavior" binding="netTcpBinding" bindingConfiguration="Aitex_netTcpBinding" contract="EPInterface.IEPDCallbackService" name="Client_IEPDCallbackService" />
-		</client>
 		<behaviors>
 			<serviceBehaviors>
 				<behavior name="BasicBehavior">

+ 0 - 1
CyberX8_RT/CyberX8_RT.csproj

@@ -465,7 +465,6 @@
     <Compile Include="Schedulers\SchedulerSequence.cs" />
     <Compile Include="Schedulers\SchedulerSequenceRecipeManager.cs" />
     <Compile Include="Schedulers\Transporter\SchedulerLoaderTransporter.cs" />
-    <Compile Include="Schedulers\SchedulerSequenceOldManager.cs" />
     <Compile Include="Schedulers\SchedulerSyncModuleMessage.cs" />
     <Compile Include="Schedulers\Transporter\TransporterAction.cs" />
   </ItemGroup>

+ 32 - 1
CyberX8_RT/Dispatch/WaferHolderTask.cs

@@ -23,6 +23,7 @@ using MECF.Framework.Common.RecipeCenter;
 using MECF.Framework.Common.ToolLayout;
 using Aitex.Core.RT.Routine;
 using CyberX8_RT.Schedulers.Transporter;
+using CyberX8_RT.Modules.Rinse;
 
 namespace CyberX8_RT.Dispatch
 {
@@ -47,6 +48,10 @@ namespace CyberX8_RT.Dispatch
     public delegate void WaferHolderTaskComplete(string id);
     public class WaferHolderTask
     {
+        #region 常量 
+        private const string PWT = "PWT";
+        #endregion
+
         #region 内部变量
         /// <summary>
         /// 调度步骤
@@ -417,7 +422,19 @@ namespace CyberX8_RT.Dispatch
             }
             else if (sequence.ModuleType == ModuleType.Rinse)
             {
-                AnalyseSchedulerRinseErrorState(sequence);
+                RinseItem rinseItem = RinseItemManager.Instance.GetRinseItem(sequence.ModuleName.ToString());
+                if (rinseItem == null)
+                {
+                    return;
+                }
+                if (rinseItem.SubType != PWT)
+                {
+                    AnalyseSchedulerRinseErrorState(sequence);
+                }
+                else
+                {
+                    AnalyseSchedulerPrewetErrorState(sequence);
+                }
             }
             else if (sequence.ModuleType == ModuleType.Metal)
             {
@@ -808,6 +825,20 @@ namespace CyberX8_RT.Dispatch
                         UpdateNextSequenceModule(_currentSequenceIndex + 1,avaibleModuleName);  
                     }
                 }
+                //下一步是QDR
+                else if (nextWaferHolderMoveItem.DestModuleType == ModuleType.Rinse && nextWaferHolderMoveItem.DestModule != ModuleName.Unknown)
+                {
+                    RinseEntity rinseEntity = Singleton<RouteManager>.Instance.GetModule<RinseEntity>(nextWaferHolderMoveItem.DestModule.ToString());
+                    if (rinseEntity != null && rinseEntity.IsAuto && rinseEntity.IsIdle && rinseEntity.WaferHolderInfo == null)
+                    {
+                        schedulerSequence.State = RState.End;
+                        _currentSequenceIndex++;
+                        nextWaferHolderMoveItem.SourceModule = ModuleName.Loader1;
+                        nextWaferHolderMoveItem.SourceModuleType = ModuleType.Loader;
+
+                        UpdateNextSequenceModule(_currentSequenceIndex + 1, nextWaferHolderMoveItem.DestModule);
+                    }
+                }
                 else if(nextWaferHolderMoveItem.DestModule==ModuleName.Loader1)
                 {
                     LoaderEntity loaderEntity = Singleton<RouteManager>.Instance.GetModule<LoaderEntity>(ModuleName.Loader1.ToString());

+ 2 - 2
CyberX8_RT/Modules/Loader/LoaderEntity.cs

@@ -350,7 +350,7 @@ namespace CyberX8_RT.Modules.Loader
             {
                 return false;
             }
-            bool crsASetUp = _crsAAxis.CheckPositionInStationIgnoreWaferSize(_crsAAxis.MotionData.MotorPosition, "Setup");
+            bool crsASetUp = _crsAAxis.CheckPositionIsInStation(_crsAAxis.MotionData.MotorPosition, $"Setup{SideAWaferSize}");
             if (!crsASetUp)
             {
                 return false;
@@ -360,7 +360,7 @@ namespace CyberX8_RT.Modules.Loader
             {
                 return false;
             }
-            bool crsBSetUp = _crsBAxis.CheckPositionInStationIgnoreWaferSize(_crsBAxis.MotionData.MotorPosition, "Setup");
+            bool crsBSetUp = _crsBAxis.CheckPositionInStationIgnoreWaferSize(_crsBAxis.MotionData.MotorPosition, $"Setup{SideBWaferSize}");
             if (!crsBSetUp)
             {
                 return false;

+ 1 - 1
CyberX8_RT/Modules/Loader/LoaderLoadSideRoutine.cs

@@ -430,7 +430,7 @@ namespace CyberX8_RT.Modules.Loader
             }
             JetAxisBase tiltAxis = DEVICE.GetDevice<JetAxisBase>($"{ModuleName.Loader1}.Tilt{side}");
             double tiltPosition = tiltAxis.MotionData.MotorPosition;
-            if (tiltAxis.CheckPositionIsInStation(tiltPosition, "VERT"))
+            if (!tiltAxis.CheckPositionIsInStation(tiltPosition, "VERT"))
             {
                 if (showError)
                 {

+ 53 - 229
CyberX8_RT/Modules/Metal/ReservoirRunRecipeRoutine.cs

@@ -161,6 +161,8 @@ namespace CyberX8_RT.Modules.Metal
         private bool _isVotlageWarningB = false;
         private bool _isCurrentWarningA = false;
         private bool _isCurrentWarningB = false;
+        private bool _isZeroCurrent = false;
+        private int _totalMicrosecond = 0;
         #endregion
         #region 属性
         /// <summary>
@@ -369,6 +371,11 @@ namespace CyberX8_RT.Modules.Metal
         /// <returns></returns>
         private bool StartPowerStep()
         {
+            if (_isZeroCurrent)
+            {
+                _startStepTime = DateTime.Now;
+                return true;
+            }
             if (string.IsNullOrEmpty(_side))
             {
                 bool result = StartPowerStep(_device.SideAPowerSupplier);
@@ -418,6 +425,10 @@ namespace CyberX8_RT.Modules.Metal
         /// <returns></returns>
         private bool CheckRecipeStepEndStatus()
         {
+            if (_isZeroCurrent)
+            {
+                return true;
+            }
             if (_startRecipeStep)
             {
                 if (string.IsNullOrEmpty(_side))
@@ -441,6 +452,10 @@ namespace CyberX8_RT.Modules.Metal
         /// <returns></returns>
         private bool CheckRecipeStepStopStatus()
         {
+            if (_isZeroCurrent)
+            {
+                return false;
+            }
             if (_startRecipeStep)
             {
                 if (string.IsNullOrEmpty(_side))
@@ -517,6 +532,9 @@ namespace CyberX8_RT.Modules.Metal
         /// </summary>
         private void UpdatePowerStepDatas()
         {
+            _isZeroCurrent = false;
+            double current = 0;
+            _totalMicrosecond = 0;
             _powerSupplierStepPeriodDatas.Clear();
             foreach (var item in _recipe.CurrentRampProfileSteps)
             {
@@ -528,6 +546,12 @@ namespace CyberX8_RT.Modules.Metal
                 step.Microsecond = 0;
                 step.Voltage = _recipe.VoltageWarningLevel;
                 _powerSupplierStepPeriodDatas.Add(step);
+                current += step.Current;
+                _totalMicrosecond += item.CurrentRampDurartionSeconds * 1000;
+            }
+            if (current == 0)
+            {
+                _isZeroCurrent = true;
             }
         }
         /// <summary>
@@ -611,20 +635,42 @@ namespace CyberX8_RT.Modules.Metal
         /// <returns></returns>
         private bool CheckMetalDisable()
         {
-
+            if (!_device.IsLinmotMotorOn)
+            {
+                LOG.WriteLog(eEvent.ERR_METAL, Module, "Linmot is not motor on");
+                Abort();
+                return true;
+            }
+            //CheckVotlageAndCurrent();
+            if (!CheckVoltageAndCurrentValid())
+            {
+                Abort();
+                return true;
+            }
+            return false;
+        }
+        /// <summary>
+        /// 检验电压电流的合理性
+        /// </summary>
+        /// <returns></returns>
+        private bool CheckVoltageAndCurrentValid()
+        {
+            //零电流不检验
+            if (_isZeroCurrent)
+            {
+                return true;
+            }
             if (string.IsNullOrEmpty(_side))
             {
                 if (!_device.SideAPowerSupplier.PowerSupplierData.Enabled)
                 {
                     LOG.WriteLog(eEvent.ERR_METAL, Module, "PowerA disable");
-                    Abort();
-                    return true;
+                    return false;
                 }
                 if (!_device.SideBPowerSupplier.PowerSupplierData.Enabled)
                 {
                     LOG.WriteLog(eEvent.ERR_METAL, Module, "PowerB disable");
-                    Abort();
-                    return true;
+                    return false;
                 }
             }
             else
@@ -632,36 +678,14 @@ namespace CyberX8_RT.Modules.Metal
                 if (_side == SIDE_A && !_device.SideAPowerSupplier.PowerSupplierData.Enabled)
                 {
                     LOG.WriteLog(eEvent.ERR_METAL, Module, "PowerA disable");
-                    Abort();
-                    return true;
+                    return false;
                 }
                 if (_side == SIDE_B && !_device.SideBPowerSupplier.PowerSupplierData.Enabled)
                 {
                     LOG.WriteLog(eEvent.ERR_METAL, Module, "PowerB disable");
-                    Abort();
-                    return true;
+                    return false;
                 }
             }
-            if (!_device.IsLinmotMotorOn)
-            {
-                LOG.WriteLog(eEvent.ERR_METAL, Module, "Linmot is not motor on");
-                Abort();
-                return true;
-            }
-            //CheckVotlageAndCurrent();
-            if (!CheckVoltageAndCurrentValid())
-            {
-                Abort();
-                return true;
-            }
-            return false;
-        }
-        /// <summary>
-        /// 检验电压电流的合理性
-        /// </summary>
-        /// <returns></returns>
-        private bool CheckVoltageAndCurrentValid()
-        {
             double sideACurrent = _device.SideAPowerSupplier.PowerSupplierData.Current;
             double sideAVoltage = _device.SideAPowerSupplier.PowerSupplierData.Voltage;
             double sideBCurrent = _device.SideBPowerSupplier.PowerSupplierData.Current;
@@ -701,206 +725,6 @@ namespace CyberX8_RT.Modules.Metal
             return true;
         }
         /// <summary>
-        /// 监控电流和电压
-        /// </summary>
-        private void CheckVotlageAndCurrent()
-        {
-            if (string.IsNullOrEmpty(_side))
-            {
-                //监控电压A面
-                MetalEntity metalEntity = Singleton<RouteManager>.Instance.GetModule<MetalEntity>(Module);
-                if (_device.SideAPowerSupplier.PowerSupplierData.Voltage > _recipe.VoltageWarningLevel && _device.SideAPowerSupplier.PowerSupplierData.Voltage < _recipe.VolatageLimitMax && !_isVotlageWarningA)
-                {
-                    _isVotlageWarningA = true;
-                    LOG.WriteLog(eEvent.WARN_METAL, Module, $"Current SideA Votlage {_device.SideAPowerSupplier.PowerSupplierData.Voltage} is large than recipe VolatageWarningLevel {_recipe.VoltageWarningLevel}");
-                }
-                if (_device.SideAPowerSupplier.PowerSupplierData.Voltage < _recipe.VolatageLimitMin)
-                {
-                    if (metalEntity != null)
-                    {
-                        metalEntity.PostMsg(MetalMsg.Error);
-                    }
-                    Abort();
-                    LOG.WriteLog(eEvent.ERR_METAL, Module, $"Current SideA Votlage {_device.SideAPowerSupplier.PowerSupplierData.Voltage} is lower than recipe VolatageLimitMin {_recipe.VolatageLimitMin}");
-                }
-                if (_device.SideAPowerSupplier.PowerSupplierData.Voltage > _recipe.VolatageLimitMax)
-                {
-                    if (metalEntity != null)
-                    {
-                        metalEntity.PostMsg(MetalMsg.Error);
-                    }
-                    Abort();
-                    LOG.WriteLog(eEvent.ERR_METAL, Module, $"Current SideA Votlage {_device.SideAPowerSupplier.PowerSupplierData.Voltage} is large than recipe VolatageLimitMin {_recipe.VolatageLimitMax}");
-                }
-                //监控电流A面
-                double currentWarningFault = _powerSupplierStepPeriodDatas[_stepIndex].Current * _recipe.CurrentWarningLevel * 0.01;
-                double currentErrorFault = _powerSupplierStepPeriodDatas[_stepIndex].Current * _recipe.FaultPercent * 0.01;
-                if (_device.SideAPowerSupplier.PowerSupplierData.Current > _powerSupplierStepPeriodDatas[_stepIndex].Current + currentErrorFault
-                    || _device.SideAPowerSupplier.PowerSupplierData.Current < _powerSupplierStepPeriodDatas[_stepIndex].Current - currentErrorFault)
-                {
-                    if (metalEntity != null)
-                    {
-                        metalEntity.PostMsg(MetalMsg.Error);
-                    }
-                    Abort();
-                    LOG.WriteLog(eEvent.ERR_METAL, Module, $"Current SideA Current {_device.SideAPowerSupplier.PowerSupplierData.Current} is not in " +
-                        $"recipe Range {_powerSupplierStepPeriodDatas[_stepIndex].Current - currentErrorFault} ~ {_powerSupplierStepPeriodDatas[_stepIndex].Current + currentErrorFault}");
-                }
-                if (!_isCurrentWarningA && ((_device.SideAPowerSupplier.PowerSupplierData.Current > _powerSupplierStepPeriodDatas[_stepIndex].Current + currentWarningFault && _device.SideAPowerSupplier.PowerSupplierData.Current < _powerSupplierStepPeriodDatas[_stepIndex].Current + currentErrorFault)
-                    || (_device.SideAPowerSupplier.PowerSupplierData.Current < _powerSupplierStepPeriodDatas[_stepIndex].Current - currentWarningFault && _device.SideAPowerSupplier.PowerSupplierData.Current > _powerSupplierStepPeriodDatas[_stepIndex].Current - currentErrorFault)))
-                {
-                    _isCurrentWarningA = true;
-                    LOG.WriteLog(eEvent.WARN_METAL, Module, $"Current SideA Current {_device.SideAPowerSupplier.PowerSupplierData.Current} is not in " +
-                        $"recipe Range {_powerSupplierStepPeriodDatas[_stepIndex].Current - currentWarningFault} ~ {_powerSupplierStepPeriodDatas[_stepIndex].Current + currentWarningFault}");
-                }
-
-                //监控电压B面
-                if (_device.SideBPowerSupplier.PowerSupplierData.Voltage > _recipe.VoltageWarningLevel && _device.SideBPowerSupplier.PowerSupplierData.Voltage < _recipe.VolatageLimitMax && !_isVotlageWarningB)
-                {
-                    _isVotlageWarningB = true;
-                    LOG.WriteLog(eEvent.WARN_METAL, Module, $"Current SideB Votlage {_device.SideBPowerSupplier.PowerSupplierData.Voltage} is large than recipe VolatageWarningLevel {_recipe.VoltageWarningLevel}");
-                }
-                if (_device.SideBPowerSupplier.PowerSupplierData.Voltage < _recipe.VolatageLimitMin)
-                {
-                    if (metalEntity != null)
-                    {
-                        metalEntity.PostMsg(MetalMsg.Error);
-                    }
-                    Abort();
-                    LOG.WriteLog(eEvent.ERR_METAL, Module, $"Current SideB Votlage {_device.SideBPowerSupplier.PowerSupplierData.Voltage} is lower than recipe VolatageLimitMin {_recipe.VolatageLimitMin}");
-                }
-                if (_device.SideBPowerSupplier.PowerSupplierData.Voltage > _recipe.VolatageLimitMax)
-                {
-                    if (metalEntity != null)
-                    {
-                        metalEntity.PostMsg(MetalMsg.Error);
-                    }
-                    Abort();
-                    LOG.WriteLog(eEvent.ERR_METAL, Module, $"Current SideB Votlage {_device.SideBPowerSupplier.PowerSupplierData.Voltage} is large than recipe VolatageLimitMin{_recipe.VolatageLimitMax}");
-                }
-                //监控电流B面
-                if (_device.SideBPowerSupplier.PowerSupplierData.Current > _powerSupplierStepPeriodDatas[_stepIndex].Current + currentErrorFault
-                    || _device.SideBPowerSupplier.PowerSupplierData.Current < _powerSupplierStepPeriodDatas[_stepIndex].Current - currentErrorFault)
-                {
-                    if (metalEntity != null)
-                    {
-                        metalEntity.PostMsg(MetalMsg.Error);
-                    }
-                    Abort();
-                    LOG.WriteLog(eEvent.ERR_METAL, Module, $"Current SideB Current {_device.SideBPowerSupplier.PowerSupplierData.Current} is not in " +
-                        $"recipe Range {_powerSupplierStepPeriodDatas[_stepIndex].Current - currentErrorFault} ~ {_powerSupplierStepPeriodDatas[_stepIndex].Current + currentErrorFault}");
-                }
-                if (!_isCurrentWarningB && ((_device.SideBPowerSupplier.PowerSupplierData.Current > _powerSupplierStepPeriodDatas[_stepIndex].Current + currentWarningFault && _device.SideBPowerSupplier.PowerSupplierData.Current < _powerSupplierStepPeriodDatas[_stepIndex].Current + currentErrorFault)
-                    || (_device.SideBPowerSupplier.PowerSupplierData.Current < _powerSupplierStepPeriodDatas[_stepIndex].Current - currentWarningFault && _device.SideBPowerSupplier.PowerSupplierData.Current > _powerSupplierStepPeriodDatas[_stepIndex].Current - currentErrorFault)))
-                {
-                    _isCurrentWarningB = true;
-                    LOG.WriteLog(eEvent.WARN_METAL, Module, $"Current SideB Current {_device.SideBPowerSupplier.PowerSupplierData.Current} is not in " +
-                        $"recipe Range {_powerSupplierStepPeriodDatas[_stepIndex].Current - currentWarningFault} ~ {_powerSupplierStepPeriodDatas[_stepIndex].Current + currentWarningFault}");
-                }
-            }
-            else
-            {
-                if (_side == SIDE_A)
-                {
-                    //监控电压A面
-                    MetalEntity metalEntity = Singleton<RouteManager>.Instance.GetModule<MetalEntity>(Module);
-                    if (_device.SideAPowerSupplier.PowerSupplierData.Voltage > _recipe.VoltageWarningLevel && _device.SideAPowerSupplier.PowerSupplierData.Voltage < _recipe.VolatageLimitMax && !_isVotlageWarningA)
-                    {
-                        _isVotlageWarningA = true;
-                        LOG.WriteLog(eEvent.WARN_METAL, Module, $"Current SideA Votlage {_device.SideAPowerSupplier.PowerSupplierData.Voltage} is large than recipe VolatageWarningLevel {_recipe.VoltageWarningLevel}");
-                    }
-                    if (_device.SideAPowerSupplier.PowerSupplierData.Voltage < _recipe.VolatageLimitMin)
-                    {
-                        if (metalEntity != null)
-                        {
-                            metalEntity.PostMsg(MetalMsg.Error);
-                        }
-                        Abort();
-                        LOG.WriteLog(eEvent.ERR_METAL, Module, $"Current SideA Votlage {_device.SideAPowerSupplier.PowerSupplierData.Voltage} is lower than recipe VolatageLimitMin {_recipe.VolatageLimitMin}");
-                    }
-                    if (_device.SideAPowerSupplier.PowerSupplierData.Voltage > _recipe.VolatageLimitMax)
-                    {
-                        if (metalEntity != null)
-                        {
-                            metalEntity.PostMsg(MetalMsg.Error);
-                        }
-                        Abort();
-                        LOG.WriteLog(eEvent.ERR_METAL, Module, $"Current SideA Votlage {_device.SideAPowerSupplier.PowerSupplierData.Voltage} is large than recipe VolatageLimitMin {_recipe.VolatageLimitMax}");
-                    }
-                    //监控电流A面
-                    double currentWarningFault = _powerSupplierStepPeriodDatas[_stepIndex].Current * _recipe.CurrentWarningLevel * 0.01;
-                    double currentErrorFault = _powerSupplierStepPeriodDatas[_stepIndex].Current * _recipe.FaultPercent * 0.01;
-                    if (_device.SideAPowerSupplier.PowerSupplierData.Current > _powerSupplierStepPeriodDatas[_stepIndex].Current + currentErrorFault
-                        || _device.SideAPowerSupplier.PowerSupplierData.Current < _powerSupplierStepPeriodDatas[_stepIndex].Current - currentErrorFault)
-                    {
-                        if (metalEntity != null)
-                        {
-                            metalEntity.PostMsg(MetalMsg.Error);
-                        }
-                        Abort();
-                        LOG.WriteLog(eEvent.ERR_METAL, Module, $"Current SideA Current {_device.SideAPowerSupplier.PowerSupplierData.Current} is not in " +
-                            $"recipe Range {_powerSupplierStepPeriodDatas[_stepIndex].Current - currentErrorFault} ~ {_powerSupplierStepPeriodDatas[_stepIndex].Current + currentErrorFault}");
-                    }
-                    if (!_isCurrentWarningA && ((_device.SideAPowerSupplier.PowerSupplierData.Current > _powerSupplierStepPeriodDatas[_stepIndex].Current + currentWarningFault && _device.SideAPowerSupplier.PowerSupplierData.Current < _powerSupplierStepPeriodDatas[_stepIndex].Current + currentErrorFault)
-                    || (_device.SideAPowerSupplier.PowerSupplierData.Current < _powerSupplierStepPeriodDatas[_stepIndex].Current - currentWarningFault && _device.SideAPowerSupplier.PowerSupplierData.Current > _powerSupplierStepPeriodDatas[_stepIndex].Current - currentErrorFault)))
-                    {
-                        _isCurrentWarningA = true;
-                        LOG.WriteLog(eEvent.WARN_METAL, Module, $"Current SideA Current {_device.SideAPowerSupplier.PowerSupplierData.Current} is not in " +
-                            $"recipe Range{_powerSupplierStepPeriodDatas[_stepIndex].Current - currentWarningFault} ~ {_powerSupplierStepPeriodDatas[_stepIndex].Current + currentWarningFault}");
-                    }
-                }
-                else
-                {
-                    //监控电压B面
-                    MetalEntity metalEntity = Singleton<RouteManager>.Instance.GetModule<MetalEntity>(Module);
-                    if (!_isVotlageWarningB && _device.SideBPowerSupplier.PowerSupplierData.Voltage > _recipe.VoltageWarningLevel && _device.SideBPowerSupplier.PowerSupplierData.Voltage < _recipe.VolatageLimitMax)
-                    {
-                        _isVotlageWarningB = true;
-                        LOG.WriteLog(eEvent.WARN_METAL, Module, $"Current SideB Votlage {_device.SideBPowerSupplier.PowerSupplierData.Voltage} is large than recipe VolatageWarningLevel {_recipe.VoltageWarningLevel}");
-                    }
-                    if (_device.SideBPowerSupplier.PowerSupplierData.Voltage < _recipe.VolatageLimitMin)
-                    {
-                        if (metalEntity != null)
-                        {
-                            metalEntity.PostMsg(MetalMsg.Error);
-                        }
-                        Abort();
-                        LOG.WriteLog(eEvent.ERR_METAL, Module, $"Current SideB Votlage {_device.SideBPowerSupplier.PowerSupplierData.Voltage} is lower than recipe VolatageLimitMin {_recipe.VolatageLimitMin}");
-                    }
-                    if (_device.SideBPowerSupplier.PowerSupplierData.Voltage > _recipe.VolatageLimitMax)
-                    {
-                        if (metalEntity != null)
-                        {
-                            metalEntity.PostMsg(MetalMsg.Error);
-                        }
-                        Abort();
-                        LOG.WriteLog(eEvent.ERR_METAL, Module, $"Current SideB Votlage {_device.SideBPowerSupplier.PowerSupplierData.Voltage} is large than recipe VolatageLimitMin {_recipe.VolatageLimitMax}");
-                    }
-                    //监控电流B面
-                    double currentWarningFault = _powerSupplierStepPeriodDatas[_stepIndex].Current * _recipe.CurrentWarningLevel * 0.01;
-                    double currentErrorFault = _powerSupplierStepPeriodDatas[_stepIndex].Current * _recipe.FaultPercent * 0.01;
-                    if (_device.SideBPowerSupplier.PowerSupplierData.Current > _powerSupplierStepPeriodDatas[_stepIndex].Current + currentErrorFault
-                        || _device.SideBPowerSupplier.PowerSupplierData.Current < _powerSupplierStepPeriodDatas[_stepIndex].Current - currentErrorFault)
-                    {
-                        if (metalEntity != null)
-                        {
-                            metalEntity.PostMsg(MetalMsg.Error);
-                        }
-                        Abort();
-                        LOG.WriteLog(eEvent.ERR_METAL, Module, $"Current SideB Current {_device.SideBPowerSupplier.PowerSupplierData.Current} is not in " +
-                            $"recipe Range{_powerSupplierStepPeriodDatas[_stepIndex].Current - currentErrorFault} ~ {_powerSupplierStepPeriodDatas[_stepIndex].Current + currentErrorFault}");
-                    }
-                    if (!_isCurrentWarningB && ((_device.SideBPowerSupplier.PowerSupplierData.Current > _powerSupplierStepPeriodDatas[_stepIndex].Current + currentWarningFault && _device.SideBPowerSupplier.PowerSupplierData.Current < _powerSupplierStepPeriodDatas[_stepIndex].Current + currentErrorFault)
-                     || (_device.SideBPowerSupplier.PowerSupplierData.Current < _powerSupplierStepPeriodDatas[_stepIndex].Current - currentWarningFault && _device.SideBPowerSupplier.PowerSupplierData.Current > _powerSupplierStepPeriodDatas[_stepIndex].Current - currentErrorFault)))
-                    {
-                        _isCurrentWarningB = true;
-                        LOG.WriteLog(eEvent.WARN_METAL, Module, $"Current SideB Current {_device.SideBPowerSupplier.PowerSupplierData.Current} is not in " +
-                            $"recipe Range {_powerSupplierStepPeriodDatas[_stepIndex].Current - currentWarningFault} ~ {_powerSupplierStepPeriodDatas[_stepIndex].Current + currentWarningFault}");
-                    }
-                }
-            }
-        }
-        /// <summary>
         /// 检验电流和电压合理性
         /// </summary>
         /// <param name="current"></param>

+ 64 - 2
CyberX8_RT/Modules/Transporter/TransporterEntity.cs

@@ -293,6 +293,7 @@ namespace CyberX8_RT.Modules.Transporter
             Transition(TransporterState.Retrying, TransporterMSG.PickUpMoveTo, RetryPickUpMoveTo, TransporterState.PickUpMoveToing);
             Transition(TransporterState.Retrying, TransporterMSG.PickUpValidate, RetryPickUpValidate, TransporterState.PickUpValidating);
             Transition(TransporterState.Retrying, TransporterMSG.Place, RetryPlace, TransporterState.Placing);
+            Transition(TransporterState.Retrying, TransporterMSG.MoveTo, RetryMoveTo, TransporterState.MovingTo);
             //ConfirmComplete
             Transition(TransporterState.Init, TransporterMSG.ConfirmComplete, ClearModuleAlarm, TransporterState.Init);
             Transition(TransporterState.Idle, TransporterMSG.ConfirmComplete, ClearModuleAlarm, TransporterState.Idle);
@@ -301,7 +302,8 @@ namespace CyberX8_RT.Modules.Transporter
             Transition(TransporterState.ConfirmCompleting, TransporterMSG.Transfer, ConfirmTransfer, TransporterState.Idle);
             Transition(TransporterState.ConfirmCompleting, TransporterMSG.PickUpValidate, ConfirmPickupValidate, TransporterState.PickUpValidateComplete);
             Transition(TransporterState.ConfirmCompleting, TransporterMSG.PickUpMoveTo, ConfirmPickupMoveto, TransporterState.PickUpMoveToComplete);
-            Transition(TransporterState.ConfirmCompleting, TransporterMSG.Place, ConfirmPlace, TransporterState.Idle);
+            Transition(TransporterState.ConfirmCompleting, TransporterMSG.Place, ConfirmPlace, TransporterState.Idle); 
+            Transition(TransporterState.ConfirmCompleting, TransporterMSG.MoveTo, ConfirmMoveto, TransporterState.ValidateMoveToComplete);
 
             EnumLoop<TransporterState>.ForEach((item) => { fsm.MapState((int)item, item.ToString()); });
 
@@ -682,6 +684,22 @@ namespace CyberX8_RT.Modules.Transporter
             return result;
         }
         /// <summary>
+        /// Retry Place
+        /// </summary>
+        /// <param name="param"></param>
+        /// <returns></returns>
+        private bool RetryMoveTo(object[] param)
+        {
+            int stepIndex = (int)param[0];
+            bool result = _moveToRoutine.Retry(stepIndex) == RState.Running;
+            if (result)
+            {
+                _currentRoutine = _moveToRoutine;
+                _targetCell = _moveToRoutine.TargetCell;
+            }
+            return result;
+        }
+        /// <summary>
         /// MoveTo超时
         /// </summary>
         /// <param name="param"></param>
@@ -693,12 +711,18 @@ namespace CyberX8_RT.Modules.Transporter
             {
                 _targetCell = "";
                 _currentRoutine = null;
+                if (Singleton<RouteManager>.Instance.IsAutoRunning)
+                {
+                    AlarmList alarmList = new AlarmList(Module.ToString(), ((TransporterState)fsm.State).ToString(), (int)TransporterMSG.MoveTo,
+                    _placeRoutine.ErrorMsg, _placeRoutine.ErrorStep, (int)AlarmType.Error);
+                    AlarmListManager.Instance.AddAlarm(alarmList);
+                }
                 PostMsg(TransporterMSG.Error);
                 return false;
             }
 
             bool result = ret == RState.End;
-            if(result)
+            if (result)
             {
                 _targetCell = "";
                 _currentRoutine = null;
@@ -709,6 +733,34 @@ namespace CyberX8_RT.Modules.Transporter
             }
             return result;
         }
+        /// <summary>
+        /// 确认Place是否完成
+        /// </summary>
+        /// <param name="param"></param>
+        /// <returns></returns>
+        private bool ConfirmMoveto(object[] param)
+        {
+            int stepIdex = (int)param[0];
+            bool result = _moveToRoutine.CheckCompleteCondition(stepIdex);
+            if (!result)
+            {
+                if (Singleton<RouteManager>.Instance.IsAutoRunning)
+                {
+                    AlarmList alarmList = new AlarmList(Module.ToString(), ((TransporterState)fsm.State).ToString(), (int)TransporterMSG.MoveTo,
+                    _moveToRoutine.ErrorMsg, _moveToRoutine.ErrorStep, (int)AlarmType.Error);
+                    AlarmListManager.Instance.AddAlarm(alarmList);
+                }
+                PostMsg(TransporterMSG.Error);
+            }
+            else
+            {
+                if (Singleton<RouteManager>.Instance.IsAutoRunning)
+                {
+                    AlarmListManager.Instance.CheckModuleAlamAndRemove(Module.ToString(), TransporterState.MovingTo.ToString());
+                }
+            }
+            return result;
+        }
         #endregion
 
         #region Place
@@ -740,6 +792,7 @@ namespace CyberX8_RT.Modules.Transporter
             if (result)
             {
                 _currentRoutine = _placeRoutine;
+                _targetCell = _placeRoutine.TargetCell;
             }
             return result;
         }
@@ -973,6 +1026,8 @@ namespace CyberX8_RT.Modules.Transporter
             if (result)
             {
                 _currentRoutine = _transferRoutine;
+                _sourceCell=_transferRoutine.SourceCell;
+                _targetCell=_transferRoutine.TargetCell;
             }
             return result;
         }
@@ -1290,6 +1345,8 @@ namespace CyberX8_RT.Modules.Transporter
             if (result)
             {
                 _currentRoutine = _pickUpMoveToRoutine;
+                _sourceCell = _pickUpMoveToRoutine.SourceCell;
+                _targetCell= _pickUpMoveToRoutine.TargetCell;
             }
             return result;
         }
@@ -1395,6 +1452,7 @@ namespace CyberX8_RT.Modules.Transporter
             if (result)
             {
                 _currentRoutine = _pickUpValidateRoutine;
+                _sourceCell = _pickUpValidateRoutine.SourceCell;
             }
             return result;
         }
@@ -1505,6 +1563,10 @@ namespace CyberX8_RT.Modules.Transporter
                 {
                     CheckToPostMessage<TransporterState, TransporterMSG>(eEvent.ERR_TRANSPORTER, Module.ToString(), (int)TransporterMSG.Place, alarmList.ModuleStep);
                 }
+                else if (alarmList.ModuleState == TransporterState.MovingTo.ToString())
+                {
+                    CheckToPostMessage<TransporterState, TransporterMSG>(eEvent.ERR_TRANSPORTER, Module.ToString(), (int)TransporterMSG.MoveTo, alarmList.ModuleStep);
+                }
                 else
                 {
                     PostMsg(TransporterMSG.Error);

+ 38 - 1
CyberX8_RT/Modules/Transporter/TransporterMoveToRoutine.cs

@@ -52,6 +52,11 @@ namespace CyberX8_RT.Modules.Transporter
         ProcessLayoutCellItem _cellItem;
         private bool _waferHolderPresent = false;
         #endregion
+
+        #region 属性
+        public string TargetCell { get { return _cellName; } }
+        #endregion
+
         /// <summary>
         /// 构造函数
         /// </summary>
@@ -240,6 +245,14 @@ namespace CyberX8_RT.Modules.Transporter
         public RState Start(params object[] objs)
         {
             _cellName = objs[0].ToString();
+            InitializeParameters();
+            return Runner.Start(Module,$"MoveTo {_cellName}");
+        }
+        /// <summary>
+        /// 初始化参数
+        /// </summary>
+        private void InitializeParameters()
+        {
             _elevatorAxis = DEVICE.GetDevice<JetAxisBase>($"{Module}.Elevator");
             _otherModule = Module == "Transporter2" ? "Transporter1" : "Transporter2";
             _otherElevatorAxis = DEVICE.GetDevice<JetAxisBase>($"{_otherModule}.Elevator");
@@ -248,7 +261,6 @@ namespace CyberX8_RT.Modules.Transporter
             _loaderRotationAxis = DEVICE.GetDevice<JetAxisBase>($"{ModuleName.Loader1}.Rotation");
             _conflictRoutine = new TransporterConflictRoutine(Module);
             _transporterCommon = DEVICE.GetDevice<TransporterCommon>($"{Module}.Common");
-            return Runner.Start(Module,$"MoveTo {_cellName}");
         }
         /// <summary>
         /// 启动校验条件
@@ -312,5 +324,30 @@ namespace CyberX8_RT.Modules.Transporter
             }
             return true;
         }
+
+        /// <summary>
+        /// 重试
+        /// </summary>
+        /// <param name="step"></param>
+        public RState Retry(int step)
+        {
+            InitializeParameters();
+            List<Enum> preStepIds = new List<Enum>();
+            return Runner.Retry(MoveToStep.CheckStatus, preStepIds, Module, "Moveto Retry");
+        }
+        /// <summary>
+        /// 检验前面Unload完成状态
+        /// </summary>
+        /// <returns></returns>
+        public bool CheckCompleteCondition(int index)
+        {
+            TransporterEntity transporterEntity = Singleton<RouteManager>.Instance.GetModule<TransporterEntity>(Module);
+            if (!_gantryAxis.CheckPositionIsInStation(_gantryAxis.MotionData.MotorPosition,_cellName))
+            {
+                NotifyError(eEvent.ERR_TRANSPORTER, $"gantry is not in {_cellName}", index);
+                return false;
+            }
+            return true;
+        }
     }
 }

+ 5 - 0
CyberX8_RT/Modules/Transporter/TransporterPickDownToRoutine.cs

@@ -77,6 +77,11 @@ namespace CyberX8_RT.Modules.Transporter
         private int _acceleration;
         private bool _bypassWaferHolderPresent;
         #endregion
+
+        #region 属性
+        public string TargetCell { get { return _cellName; } }
+        #endregion
+
         /// <summary>
         /// 构造函数
         /// </summary>

+ 5 - 0
CyberX8_RT/Modules/Transporter/TransporterPickUpFromRoutine.cs

@@ -74,6 +74,11 @@ namespace CyberX8_RT.Modules.Transporter
         private bool _bypassWaferHolderPresent;
         private int _pickMaxRetries = 2;
         #endregion
+
+        #region 属性
+        public string SourceCell { get { return _cellName; } }
+        #endregion
+
         /// <summary>
         /// 构造函数
         /// </summary>

+ 7 - 2
CyberX8_RT/Modules/Transporter/TransporterPickUpMoveToRoutine.cs

@@ -3,7 +3,6 @@ using Aitex.Core.RT.Log;
 using Aitex.Core.RT.Routine;
 using Aitex.Core.RT.SCCore;
 using Aitex.Core.Util;
-using MECF.Framework.Common.Beckhoff.Station;
 using MECF.Framework.Common.Equipment;
 using MECF.Framework.Common.Layout;
 using MECF.Framework.Common.Routine;
@@ -12,7 +11,6 @@ using MECF.Framework.Common.Utilities;
 using MECF.Framework.Common.WaferHolder;
 using CyberX8_Core;
 using CyberX8_RT.Devices.AXIS;
-using CyberX8_RT.Devices.AXIS.CANOpen;
 using CyberX8_RT.Devices.Facilities;
 using CyberX8_RT.Devices.TransPorter;
 using CyberX8_RT.Modules.Loader;
@@ -48,6 +46,13 @@ namespace CyberX8_RT.Modules.Transporter
         private TransporterPickUpFromRoutine _pickUpRoutine;
         private TransporterMoveToRoutine _moveToRoutine;
         #endregion
+
+        #region 属性
+        public string SourceCell { get { return _fromCellName; } }
+
+        public string TargetCell { get { return _toCellName; } }
+        #endregion
+
         /// <summary>
         /// 构造函数
         /// </summary>

+ 4 - 0
CyberX8_RT/Modules/Transporter/TransporterPickUpValidateRoutine.cs

@@ -45,6 +45,10 @@ namespace CyberX8_RT.Modules.Transporter
         private bool _validate = false;
         #endregion
 
+        #region 属性
+        public string SourceCell { get { return _cellName; } }
+        #endregion
+
         /// <summary>
         /// 构造函数
         /// </summary>

+ 6 - 0
CyberX8_RT/Modules/Transporter/TransporterTransferRoutine.cs

@@ -55,6 +55,12 @@ namespace CyberX8_RT.Modules.Transporter
         private bool _bypassWaferHolderPresent;
         #endregion
 
+        #region 属性
+        public string SourceCell { get { return _fromCellName; } }
+
+        public string TargetCell { get { return _toCellName; } }
+        #endregion
+
         /// <summary>
         /// 构造函数
         /// </summary>

+ 32 - 24
CyberX8_RT/Schedulers/SchedulerSequenceManager.cs

@@ -359,20 +359,22 @@ namespace CyberX8_RT.Schedulers
             SchedulerSequence loaderToBufferSequence = CreateLoaderTransporterSequence(loaderMoveToBufferAction,null,sequenceRecipe.SubstrateSize, ref index);
             schedulerSequences.Add(loaderToBufferSequence);
             //解析sequence recipe后续的工序
-            var result = AnalyseSequenceRecipeScheduler(sequenceRecipe);
+            var sequences = AnalyseSequenceRecipeScheduler(sequenceRecipe);
+            SchedulerSequence firstSequence = sequences[0];
             //buffer to recipe第一个工序
-            TransporterAction bufferToFirstAction = GenerateTransporterTransferAction(moduleName, ModuleType.Buffer, ModuleName.Unknown, result.firstModuleType);
+            TransporterAction bufferToFirstAction = GenerateTransporterTransferAction(moduleName, ModuleType.Buffer, firstSequence.ModuleName, firstSequence.ModuleType);
             SchedulerSequence bufferSequence = CreateLoaderTransporterSequence(bufferToFirstAction,null,sequenceRecipe.SubstrateSize, ref index);
             schedulerSequences.Add(bufferSequence);
             //调整工序后面的索引
-            foreach (SchedulerSequence item in result.sequences)
+            foreach (SchedulerSequence item in sequences)
             {
                 item.SequenceIndex = index;
                 index++;
             }
-            schedulerSequences.AddRange(result.sequences);
+            schedulerSequences.AddRange(sequences);
             //从recipe最后工序
-            TransporterAction lastToBufferAction = GenerateTransporterTransferAction(ModuleName.Unknown, result.lastModuleType, moduleName, ModuleType.Buffer);
+            SchedulerSequence lastSequence = sequences[sequences.Count - 1];
+            TransporterAction lastToBufferAction = GenerateTransporterTransferAction(lastSequence.ModuleName, lastSequence.ModuleType, moduleName, ModuleType.Buffer);
             SchedulerSequence lastToBufferSequence = CreateLoaderTransporterSequence(lastToBufferAction,null,sequenceRecipe.SubstrateSize, ref index);
             schedulerSequences.Add(lastToBufferSequence);
             return schedulerSequences;
@@ -383,10 +385,8 @@ namespace CyberX8_RT.Schedulers
         /// </summary>
         /// <param name="sequenceRecipe"></param>
         /// <returns></returns>
-        private (ModuleType firstModuleType,List<SchedulerSequence> sequences,ModuleType lastModuleType) AnalyseSequenceRecipeScheduler(SequenceRecipe sequenceRecipe)
+        private List<SchedulerSequence> AnalyseSequenceRecipeScheduler(SequenceRecipe sequenceRecipe)
         {
-            ModuleType firstModuleType = default;
-            ModuleType lastModuleType = default;
             List<SchedulerSequence> schedulerSequences= new List<SchedulerSequence>();
             List<SchedulerSequence> tmpLst = new List<SchedulerSequence>();
             var  processResult = AnalyseLastProcessRecipeIndex(sequenceRecipe.Recipes);
@@ -400,7 +400,23 @@ namespace CyberX8_RT.Schedulers
                     continue;
                 }
                 SchedulerSequence schedulerSequence = new SchedulerSequence();
-                schedulerSequence.ModuleName = ModuleName.Unknown;
+                if (i == 0 && item.ToLower().EndsWith("qdr.rcp"))
+                {
+                    RinseItem rinsePwtItem = RinseItemManager.Instance.GetPrewetRinseItem();
+                    if (rinsePwtItem != null)
+                    {
+                        schedulerSequence.ModuleName = (ModuleName)Enum.Parse(typeof(ModuleName), rinsePwtItem.ModuleName);
+                        schedulerSequence.SchedulerModule = SchedulerManager.Instance.GetScheduler(schedulerSequence.ModuleName);
+                    }
+                    else
+                    {
+                        schedulerSequence.ModuleName = ModuleName.Unknown;
+                    }
+                }
+                else
+                {
+                    schedulerSequence.ModuleName = ModuleName.Unknown;
+                }
                 schedulerSequence.ModuleType=SequenceRecipeManager.Instance.GetModuleType(item);
                 schedulerSequence.SequenceIndex=i;
                 schedulerSequence.WaferSize = sequenceRecipe.SubstrateSize;
@@ -409,21 +425,13 @@ namespace CyberX8_RT.Schedulers
                 schedulerSequence.SequenceType = sequenceRecipe.SequenceType;
                 schedulerSequence.State = RState.Init;
                 schedulerSequence.MaterialType = MaterialType.WaferHolder;
-                tmpLst.Add(schedulerSequence);
-                if (i == 0)
-                {
-                    firstModuleType = schedulerSequence.ModuleType;
-                }
-                if(i==lastIndex)
-                {
-                    lastModuleType = schedulerSequence.ModuleType;
-                }
-                else
+                tmpLst.Add(schedulerSequence); 
+                if (i != lastIndex)
                 {
                     string nextModule = sequenceRecipe.Recipes[i + 1];
-                    schedulerSequence.NextModuleType= SequenceRecipeManager.Instance.GetModuleType(nextModule);
-                    MECF.Framework.Common.RecipeCenter.RecipeType nextRecipeType = SequenceRecipeManager.Instance.GetRecipeType(nextModule); 
-                    schedulerSequence.NextRecipe= SequenceRecipeManager.Instance.LoadSequenceTypeRecipe(sequenceRecipe.SequenceType,nextModule,nextRecipeType);
+                    schedulerSequence.NextModuleType = SequenceRecipeManager.Instance.GetModuleType(nextModule);
+                    MECF.Framework.Common.RecipeCenter.RecipeType nextRecipeType = SequenceRecipeManager.Instance.GetRecipeType(nextModule);
+                    schedulerSequence.NextRecipe = SequenceRecipeManager.Instance.LoadSequenceTypeRecipe(sequenceRecipe.SequenceType, nextModule, nextRecipeType);
                 }
                 schedulerSequence.IsProcessSequece = true;
                 if(i==processResult.lastIndex)
@@ -442,13 +450,13 @@ namespace CyberX8_RT.Schedulers
                 {
                     TransporterAction transporterAction = new TransporterAction();
                     transporterAction.ActionMsg = TransporterMSG.Transfer;
-                    WaferHolderMoveItem moveItem = new WaferHolderMoveItem(ModuleName.Unknown, tmpLst[i].ModuleType, ModuleName.Unknown, tmpLst[i + 1].ModuleType);
+                    WaferHolderMoveItem moveItem = new WaferHolderMoveItem(tmpLst[i].ModuleName, tmpLst[i].ModuleType, tmpLst[i+1].ModuleName, tmpLst[i + 1].ModuleType);
                     transporterAction.Parameter = moveItem;
                     SchedulerSequence schedulerSequence=CreateProcessTransporterSequence(transporterAction,sequenceRecipe.SubstrateSize,ref index);
                     schedulerSequences.Add(schedulerSequence);
                 }
             }
-            return (firstModuleType,schedulerSequences,lastModuleType);
+            return schedulerSequences;
         }
         /// <summary>
         /// 分析最后加工recipe索引

File diff suppressed because it is too large
+ 0 - 1195
CyberX8_RT/Schedulers/SchedulerSequenceOldManager.cs


+ 42 - 0
CyberX8_RT/Schedulers/SchedulerSequenceRecipeManager.cs

@@ -14,6 +14,7 @@ using System.Collections.Generic;
 using System.Linq;
 using System.Text;
 using System.Threading.Tasks;
+using CyberX8_RT.Modules.Rinse;
 
 namespace CyberX8_RT.Schedulers
 {
@@ -46,6 +47,47 @@ namespace CyberX8_RT.Schedulers
                 {
                     continue;
                 }
+                if (item.ToLower().EndsWith("srd.rcp") && !checkSrd)
+                {
+                    continue;
+                }
+                if (i == 0 && item.ToLower().EndsWith("qdr.rcp"))
+                {
+                    RinseItem rinseItem = RinseItemManager.Instance.GetPrewetRinseItem();
+                    if (rinseItem == null)
+                    {
+                        if (showError)
+                        {
+                            LOG.WriteLog(eEvent.ERR_SEQUENCE, "System", $"sequence {sequenceRecipe.Ppid} has no pwt rinse cell");
+                        }
+                        return false;
+                    }
+                    RinseEntity rinseEntity = Singleton<RouteManager>.Instance.GetModule<RinseEntity>(rinseItem.ModuleName.ToString());
+                    if (rinseEntity == null)
+                    {
+                        if (showError)
+                        {
+                            LOG.WriteLog(eEvent.ERR_SEQUENCE, "System", $"sequence {sequenceRecipe.Ppid} has no pwt rinse entity");
+                        }
+                        return false;
+                    }
+                    if (!rinseEntity.IsAuto)
+                    {
+                        if (showError)
+                        {
+                            LOG.WriteLog(eEvent.ERR_SEQUENCE, "System", $"sequence {sequenceRecipe.Ppid} {rinseEntity.Module} is not avaible");
+                        }
+                        return false;
+                    }
+                    if (rinseEntity.IsError)
+                    {
+                        if (showError)
+                        {
+                            LOG.WriteLog(eEvent.ERR_SEQUENCE, "System", $"sequence {sequenceRecipe.Ppid} {rinseEntity.Module} is in error state");
+                        }
+                        return false;
+                    }
+                }
                 ModuleType moduleType = SequenceRecipeManager.Instance.GetModuleType(item);
                 if (moduleType == ModuleType.None)
                 {

+ 0 - 5
CyberX8_UI/App.config

@@ -52,11 +52,6 @@
 			<endpoint address="net.tcp://localhost:8775/AccountService" behaviorConfiguration="EndpointBehavior" binding="netTcpBinding" bindingConfiguration="Aitex_netTcpBinding" contract="Aitex.Core.Account.IAccountService" name="Client_IAccountService"/>
 			<endpoint address="net.tcp://localhost:8777/WaferHolderDataService" behaviorConfiguration="EndpointBehavior" binding="netTcpBinding" bindingConfiguration="Aitex_netTcpBinding" contract="MECF.Framework.Common.WaferHolder.IWaferHolderDataService" name="Client_IWaferHolderDataService"/>
 
-
-			<endpoint address="net.tcp://localhost:9002/PMService" behaviorConfiguration="EndpointBehavior" binding="netTcpBinding" bindingConfiguration="Aitex_netTcpBinding" contract="ClusterInterface.IPmService" name="Client_IPECVDService"/>
-			<endpoint address="net.tcp://localhost:9004/PMService" behaviorConfiguration="EndpointBehavior" binding="netTcpBinding" bindingConfiguration="Aitex_netTcpBinding" contract="ClusterInterface.IPmService" name="Client_IIBEService"/>
-			<endpoint address="net.tcp://localhost:9006/PMService" behaviorConfiguration="EndpointBehavior" binding="netTcpBinding" bindingConfiguration="Aitex_netTcpBinding" contract="ClusterInterface.IPmService" name="Client_IICPService"/>
-
 		</client>
 	</system.serviceModel>
 </configuration>

+ 1 - 1
Framework/Common/Log/LogManager.cs

@@ -67,7 +67,7 @@ namespace Aitex.Core.RT.Log
             }
             else if (deleteTimer.Interval == 60 * 1000)
             {
-                if (DateTime.Now.Hour != 0 && DateTime.Now.Minute != 0)//下一次是0点
+                if (DateTime.Now.Hour != 0 && DateTime.Now.Minute != 10)//下一次是0点10分钟
                 {
                     return;
                 }

+ 25 - 3
Framework/Common/ToolLayout/CellItemManager.cs

@@ -14,6 +14,10 @@ namespace MECF.Framework.Common.ToolLayout
 {
     public class CellItemManager : Singleton<CellItemManager>
     {
+        #region 常量 
+        private const string PWT = "PWT";
+        #endregion
+
         #region 内部变量
         /// <summary>
         /// cell数组
@@ -80,7 +84,7 @@ namespace MECF.Framework.Common.ToolLayout
         private List<LayoutCellItem> GetMetalNearbyRinseItems(string metalName)
         {
             List<LayoutCellItem> layoutCellItems = new List<LayoutCellItem>();
-            if(_layoutCellModuleIdDic.ContainsKey(metalName))
+            if (_layoutCellModuleIdDic.ContainsKey(metalName))
             {
                 int cellId = _layoutCellModuleIdDic[metalName];
                 bool checkBackRinse = false;
@@ -93,6 +97,15 @@ namespace MECF.Framework.Common.ToolLayout
                     }
                     if (item.ModuleType == ModuleType.Rinse.ToString())
                     {
+                        RinseItem rinseItem = RinseItemManager.Instance.GetRinseItem(item.ModuleName);
+                        if (rinseItem == null)
+                        {
+                            continue;
+                        }
+                        if (rinseItem.SubType == PWT)
+                        {
+                            continue;
+                        }
                         if (item.Installed)
                         {
                             layoutCellItems.Add(item);
@@ -120,12 +133,21 @@ namespace MECF.Framework.Common.ToolLayout
                 for (int i = cellId; i < _layoutCellItems.Length; i++)
                 {
                     LayoutCellItem item = _layoutCellItems[i];
-                    if(item==null)
+                    if (item == null)
                     {
                         continue;
                     }
                     if (item.ModuleType == ModuleType.Rinse.ToString())
                     {
+                        RinseItem rinseItem = RinseItemManager.Instance.GetRinseItem(item.ModuleName);
+                        if (rinseItem == null)
+                        {
+                            continue;
+                        }
+                        if (rinseItem.SubType == PWT)
+                        {
+                            continue;
+                        }
                         if (item.Installed)
                         {
                             layoutCellItems.Add(item);
@@ -149,7 +171,7 @@ namespace MECF.Framework.Common.ToolLayout
                         break;
                     }
                 }
-                
+
             }
             return layoutCellItems;
         }

+ 5 - 0
Framework/Common/ToolLayout/RinseItem.cs

@@ -16,5 +16,10 @@ namespace MECF.Framework.Common.ToolLayout
         /// Resisitivity ID 
         /// </summary>
         public string ResistivityID { get; set; }
+
+        /// <summary>
+        /// 子类型(QDR-正常Rinse,PWT--可以预湿)
+        /// </summary>
+        public string SubTyppe { get; set; }
     }
 }

+ 18 - 0
Framework/Common/ToolLayout/RinseItemManager.cs

@@ -16,6 +16,7 @@ namespace MECF.Framework.Common.ToolLayout
         /// 前缀
         /// </summary>
         private const string PREFIX = "Rinse";
+        private const string PWT = "PWT";
         #endregion
         #region 内部变量
         /// <summary>
@@ -61,5 +62,22 @@ namespace MECF.Framework.Common.ToolLayout
         {
             return _moduleItemDictionary.ContainsKey(moduleName) ? _moduleItemDictionary[moduleName]:null;
         }
+        /// <summary>
+        /// 获取预湿的Rinse
+        /// </summary>
+        /// <returns></returns>
+        public RinseItem GetPrewetRinseItem()
+        {
+            List<string> lst = _moduleItemDictionary.Keys.ToList();
+            foreach (var item in lst)
+            {
+                RinseItem rinseItem = _moduleItemDictionary[item];
+                if (rinseItem.SubType == PWT)
+                {
+                    return rinseItem;
+                }
+            }
+            return null;
+        }
     }
 }

+ 8 - 4
Framework/Common/WCF/ServiceClientWrapper.cs

@@ -7,6 +7,7 @@ using Aitex.Core.RT.Log;
 using System.Windows;
 using Aitex.Core.Utilities;
 using System.Threading;
+using System.Reflection;
 
 namespace Aitex.Core.WCF
 {
@@ -76,9 +77,12 @@ namespace Aitex.Core.WCF
                 ((IClientChannel)_proxy).Abort();
                 _proxy = _factory.CreateChannel();
             }
-
+            DateTime dateTime = DateTime.Now;
+            string method = "";
             try
             {
+                MethodInfo methodInfo= action.GetMethodInfo();
+                method = methodInfo.Name;
                 action(_proxy);
 
                 if (_isInError)
@@ -94,7 +98,7 @@ namespace Aitex.Core.WCF
                 if (!_isInError)
                 {
                     _isInError = true;
-                    LOG.WriteExeption(_serviceName + " 连接已经断开。", ex);
+                    LOG.WriteExeption(_serviceName + " disconnect。", ex);
                 }
             }
             catch (ProtocolException ex)
@@ -102,7 +106,7 @@ namespace Aitex.Core.WCF
                 if (!_isInError)
                 {
                     _isInError = true;
-                    LOG.WriteExeption(_serviceName + " 服务程序异常。", ex);
+                    LOG.WriteExeption($"{_serviceName} service method {method} start {dateTime.ToString("yyyy-MM-dd HH:mm:ss.fff")} process exception。", ex);
                 }
             }
             catch (Exception ex)
@@ -110,7 +114,7 @@ namespace Aitex.Core.WCF
                 if (!_isInError)
                 {
                     _isInError = true;
-                    LOG.WriteExeption(_serviceName + " 服务异常", ex);
+                    LOG.WriteExeption($"{_serviceName} service method {method} start {dateTime.ToString("yyyy-MM-dd HH:mm:ss.fff")} exception", ex);
                 }
             }