浏览代码

Revise jobcreate and lottrack bugs;

niuyx 3 月之前
父节点
当前提交
6497945cbe

+ 2 - 1
CyberX8_MainPages/ViewModels/SequenceRecipeViewModel.cs

@@ -303,9 +303,10 @@ namespace CyberX8_MainPages.ViewModels
         {
             //Wafer尺寸集合
             WaferSizeLst = new List<int>();
+            WaferSizeLst.Add(100);
+            WaferSizeLst.Add(150);
             WaferSizeLst.Add(200);
             WaferSizeLst.Add(300);
-
             string crstypeContent = QueryDataClient.Instance.Service.GetConfig($"System.LSType").ToString();
             if (!string.IsNullOrEmpty(crstypeContent))
             {

+ 37 - 14
CyberX8_RT/Devices/Dryer/DryerDevice.cs

@@ -559,9 +559,19 @@ namespace CyberX8_RT.Devices.Dryer
         {
             string currentOperation = "Disabled";
             DryerEntity dryerEntity = Singleton<RouteManager>.Instance.GetModule<DryerEntity>(Module);
-            if(dryerEntity == null || _dryerPersistentValue == null) return false;
-            if (_dryerPersistentValue.OperatingMode != "Disabled") dryerEntity.EnterInit();
-            _dryerPersistentValue.OperatingMode = currentOperation;
+            if (dryerEntity != null && _dryerPersistentValue != null && _dryerPersistentValue.OperatingMode != currentOperation)
+            {
+                string preOperation = _dryerPersistentValue.OperatingMode;
+                if (dryerEntity.IsBusy)
+                {
+                    LOG.WriteLog(eEvent.ERR_DRYER, Module, $"{Module} is Busy, can't switch to Disabled mode");
+                    return false;
+                }
+                dryerEntity.EnterInit();
+                _dryerPersistentValue.OperatingMode = currentOperation;
+
+                LOG.WriteLog(eEvent.INFO_DRYER, Module, $"Operating mode is switched from {preOperation} to {currentOperation}");
+            }
             DryerPersistentManager.Instance.UpdatePersistentValue(Module);
             return true;
         }
@@ -575,16 +585,20 @@ namespace CyberX8_RT.Devices.Dryer
         {
             string currentOperation = "Manual";
             DryerEntity dryerEntity = Singleton<RouteManager>.Instance.GetModule<DryerEntity>(Module);
-            if (dryerEntity == null || _dryerPersistentValue == null) return false;
-            if(_dryerPersistentValue.OperatingMode == "Auto" && dryerEntity.IsBusy)
+            if (dryerEntity != null && _dryerPersistentValue != null && _dryerPersistentValue.OperatingMode != currentOperation)
             {
-                LOG.WriteLog(eEvent.ERR_DRYER, Module, $"{Module} is Busy, can't change to manual mode");
-                return false;
+                string preOperation = _dryerPersistentValue.OperatingMode;
+                if (dryerEntity.IsBusy)
+                {
+                    LOG.WriteLog(eEvent.ERR_DRYER, Module, $"{Module} is Busy, can't switch to Manual mode");
+                    return false;
+                }
+                dryerEntity.EnterInit();
+                _dryerPersistentValue.OperatingMode = currentOperation;
+
+                LOG.WriteLog(eEvent.INFO_DRYER, Module, $"Operating mode is switched from {preOperation} to {currentOperation}");
             }
-            if (_dryerPersistentValue.OperatingMode != "Manual") dryerEntity.EnterInit();
-            _dryerPersistentValue.OperatingMode = currentOperation;
             DryerPersistentManager.Instance.UpdatePersistentValue(Module);
-            
             return true;
         }
         /// <summary>
@@ -597,11 +611,20 @@ namespace CyberX8_RT.Devices.Dryer
         {
             string currentOperation = "Auto";
             DryerEntity dryerEntity = Singleton<RouteManager>.Instance.GetModule<DryerEntity>(Module);
-            if (dryerEntity == null || _dryerPersistentValue == null) return false;
-            if (_dryerPersistentValue.OperatingMode != "Auto") dryerEntity.EnterInit();
-            _dryerPersistentValue.OperatingMode= currentOperation;
+            if (dryerEntity != null && _dryerPersistentValue != null && _dryerPersistentValue.OperatingMode != currentOperation)
+            {
+                string preOperation = _dryerPersistentValue.OperatingMode;
+                if (dryerEntity.IsBusy)
+                {
+                    LOG.WriteLog(eEvent.ERR_DRYER, Module, $"{Module} is Busy, can't switch to Auto mode");
+                    return false;
+                }
+                dryerEntity.EnterInit();
+                _dryerPersistentValue.OperatingMode = currentOperation;
+
+                LOG.WriteLog(eEvent.INFO_DRYER, Module, $"Operating mode is switched from {preOperation} to {currentOperation}");
+            }
             DryerPersistentManager.Instance.UpdatePersistentValue(Module);
-            
             return true;
         }
         /// <summary>

+ 40 - 12
CyberX8_RT/Devices/Prewet/PrewetDevice.cs

@@ -394,9 +394,20 @@ namespace CyberX8_RT.Devices.Prewet
         {
             string currentOperation = "Disabled";
             PrewetEntity prewetEntity = Singleton<RouteManager>.Instance.GetModule<PrewetEntity>(Module);
-            if (prewetEntity == null || _prewetPersistentValue == null) return false;
-            if (_prewetPersistentValue.OperatingMode != "Disabled") prewetEntity.EnterInit();
-            _prewetPersistentValue.OperatingMode = currentOperation;
+            if (prewetEntity != null && _prewetPersistentValue != null && _prewetPersistentValue.OperatingMode != currentOperation)
+            {
+                string preOperation = _prewetPersistentValue.OperatingMode;
+                if (prewetEntity.IsBusy)
+                {
+                    LOG.WriteLog(eEvent.ERR_PREWET, Module, $"{Module} is Busy, can't switch to Disabled mode");
+                    return false;
+                }
+                prewetEntity.EnterInit();
+                _prewetPersistentValue.OperatingMode = currentOperation;
+
+                LOG.WriteLog(eEvent.INFO_PREWET, Module, $"Operating mode is switched from {preOperation} to {currentOperation}");
+            }
+
             PrewetPersistentManager.Instance.UpdatePersistentValue(Module);
             return true;
         }
@@ -410,14 +421,20 @@ namespace CyberX8_RT.Devices.Prewet
         {
             string currentOperation = "Manual";
             PrewetEntity prewetEntity = Singleton<RouteManager>.Instance.GetModule<PrewetEntity>(Module);
-            if (prewetEntity == null || _prewetPersistentValue == null) return false;
-            if (_prewetPersistentValue.OperatingMode == "Auto" && prewetEntity.IsBusy)
+            if (prewetEntity != null && _prewetPersistentValue != null && _prewetPersistentValue.OperatingMode != currentOperation)
             {
-                LOG.WriteLog(eEvent.ERR_PREWET, Module, $"{Module} is Busy, can't change to manual mode");
-                return false;
+                string preOperation = _prewetPersistentValue.OperatingMode;
+                if (prewetEntity.IsBusy)
+                {
+                    LOG.WriteLog(eEvent.ERR_PREWET, Module, $"{Module} is Busy, can't switch to Manual mode");
+                    return false;
+                }
+                prewetEntity.EnterInit();
+                _prewetPersistentValue.OperatingMode = currentOperation;
+
+                LOG.WriteLog(eEvent.INFO_PREWET, Module, $"Operating mode is switched from {preOperation} to {currentOperation}");
             }
-            if (_prewetPersistentValue.OperatingMode != "Manual") prewetEntity.EnterInit();
-            _prewetPersistentValue.OperatingMode = currentOperation;
+
             PrewetPersistentManager.Instance.UpdatePersistentValue(Module);
             return true;
         }
@@ -431,9 +448,20 @@ namespace CyberX8_RT.Devices.Prewet
         {
             string currentOperation = "Auto";
             PrewetEntity prewetEntity = Singleton<RouteManager>.Instance.GetModule<PrewetEntity>(Module);
-            if (prewetEntity == null || _prewetPersistentValue == null) return false;
-            if (_prewetPersistentValue.OperatingMode != "Auto") prewetEntity.EnterInit();
-            _prewetPersistentValue.OperatingMode = currentOperation;
+            if (prewetEntity != null && _prewetPersistentValue != null && _prewetPersistentValue.OperatingMode != currentOperation)
+            {
+                string preOperation = _prewetPersistentValue.OperatingMode;
+                if (prewetEntity.IsBusy)
+                {
+                    LOG.WriteLog(eEvent.ERR_PREWET, Module, $"{Module} is Busy, can't switch to Auto mode");
+                    return false;
+                }
+                prewetEntity.EnterInit();
+                _prewetPersistentValue.OperatingMode = currentOperation;
+
+                LOG.WriteLog(eEvent.INFO_PREWET, Module, $"Operating mode is switched from {preOperation} to {currentOperation}");
+            }
+
             PrewetPersistentManager.Instance.UpdatePersistentValue(Module);
             return true;
         }

+ 40 - 12
CyberX8_RT/Devices/Rinse/RinseDevice.cs

@@ -263,9 +263,20 @@ namespace CyberX8_RT.Devices.Rinse
         {
             string currentOperation = "Disabled";
             RinseEntity rinseEntity = Singleton<RouteManager>.Instance.GetModule<RinseEntity>(Module);
-            if (rinseEntity == null || _rinsePersistentValue == null) return false;
-            if (_rinsePersistentValue.OperatingMode != "Disabled") rinseEntity.EnterInit();
-            _rinsePersistentValue.OperatingMode = currentOperation;
+            if (rinseEntity != null && _rinsePersistentValue != null && _rinsePersistentValue.OperatingMode != currentOperation)
+            {
+                string preOperation = _rinsePersistentValue.OperatingMode;
+                if (rinseEntity.IsBusy)
+                {
+                    LOG.WriteLog(eEvent.ERR_RINSE, Module, $"{Module} is Busy, can't switch to Disabled mode");
+                    return false;
+                }
+                rinseEntity.EnterInit();
+                _rinsePersistentValue.OperatingMode = currentOperation;
+
+                LOG.WriteLog(eEvent.INFO_RINSE, Module, $"Operating mode is switched from {preOperation} to {currentOperation}");
+            }
+
             RinsePersistentManager.Instance.UpdatePersistentValue(Module);
             return true;
         }
@@ -279,14 +290,20 @@ namespace CyberX8_RT.Devices.Rinse
         {
             string currentOperation = "Manual";
             RinseEntity rinseEntity = Singleton<RouteManager>.Instance.GetModule<RinseEntity>(Module);
-            if (rinseEntity == null || _rinsePersistentValue == null) return false;
-            if (_rinsePersistentValue.OperatingMode == "Auto" && rinseEntity.IsBusy)
+            if (rinseEntity != null && _rinsePersistentValue != null && _rinsePersistentValue.OperatingMode != currentOperation)
             {
-                LOG.WriteLog(eEvent.ERR_RINSE, Module, $"{Module} is Busy, can't change to manual mode");
-                return false;
+                string preOperation = _rinsePersistentValue.OperatingMode;
+                if (rinseEntity.IsBusy)
+                {
+                    LOG.WriteLog(eEvent.ERR_RINSE, Module, $"{Module} is Busy, can't switch to Manual mode");
+                    return false;
+                }
+                rinseEntity.EnterInit();
+                _rinsePersistentValue.OperatingMode = currentOperation;
+
+                LOG.WriteLog(eEvent.INFO_RINSE, Module, $"Operating mode is switched from {preOperation} to {currentOperation}");
             }
-            if (_rinsePersistentValue.OperatingMode != "Manual") rinseEntity.EnterInit();
-            _rinsePersistentValue.OperatingMode = currentOperation;
+
             RinsePersistentManager.Instance.UpdatePersistentValue(Module);
             return true;
         }
@@ -300,9 +317,20 @@ namespace CyberX8_RT.Devices.Rinse
         {
             string currentOperation = "Auto";
             RinseEntity rinseEntity = Singleton<RouteManager>.Instance.GetModule<RinseEntity>(Module);
-            if (rinseEntity == null || _rinsePersistentValue == null) return false;
-            if (_rinsePersistentValue.OperatingMode != "Auto") rinseEntity.EnterInit();
-            _rinsePersistentValue.OperatingMode = currentOperation;
+            if (rinseEntity != null && _rinsePersistentValue != null && _rinsePersistentValue.OperatingMode != currentOperation)
+            {
+                string preOperation = _rinsePersistentValue.OperatingMode;
+                if (rinseEntity.IsBusy)
+                {
+                    LOG.WriteLog(eEvent.ERR_RINSE, Module, $"{Module} is Busy, can't switch to Auto mode");
+                    return false;
+                }
+                rinseEntity.EnterInit();
+                _rinsePersistentValue.OperatingMode = currentOperation;
+
+                LOG.WriteLog(eEvent.INFO_RINSE, Module, $"Operating mode is switched from {preOperation} to {currentOperation}");
+            }
+
             RinsePersistentManager.Instance.UpdatePersistentValue(Module);
             return true;
         }

+ 39 - 12
CyberX8_RT/Devices/SRD/SrdCommonDevice.cs

@@ -344,9 +344,20 @@ namespace CyberX8_RT.Devices.SRD
         {
             string currentOperation = "Disabled";
             SRDEntity srdEntity = Singleton<RouteManager>.Instance.GetModule<SRDEntity>(Module);
-            if (srdEntity == null || _srdPersistentValue == null) return false;
-            if (_srdPersistentValue.OperatingMode != "Disabled") srdEntity.EnterInit();
-            SRDPersistentManager.Instance.UpdateOperationModeValue(Module,currentOperation);
+            if (srdEntity != null && _srdPersistentValue != null && _srdPersistentValue.OperatingMode != currentOperation)
+            {
+                string preOperation = _srdPersistentValue.OperatingMode;
+                if (srdEntity.IsBusy)
+                {
+                    LOG.WriteLog(eEvent.ERR_SRD, Module, $"{Module} is Busy, can't change to Disabled mode");
+                    return false;
+                }
+                srdEntity.EnterInit();
+                SRDPersistentManager.Instance.UpdateOperationModeValue(Module, currentOperation);
+
+                LOG.WriteLog(eEvent.INFO_SRD, Module, $"Operating mode is switched from {preOperation} to {currentOperation}");
+            }
+
             return true;
         }
         /// <summary>
@@ -359,14 +370,19 @@ namespace CyberX8_RT.Devices.SRD
         {
             string currentOperation = "Manual";
             SRDEntity srdEntity = Singleton<RouteManager>.Instance.GetModule<SRDEntity>(Module);
-            if (srdEntity == null || _srdPersistentValue == null) return false;
-            if (_srdPersistentValue.OperatingMode == "Auto" && srdEntity.IsBusy)
+            if (srdEntity != null && _srdPersistentValue != null && _srdPersistentValue.OperatingMode != currentOperation)
             {
-                LOG.WriteLog(eEvent.ERR_SRD, Module, $"{Module} is Busy, can't change to manual mode");
-                return false;
+                string preOperation = _srdPersistentValue.OperatingMode;
+                if (srdEntity.IsBusy)
+                {
+                    LOG.WriteLog(eEvent.ERR_SRD, Module, $"{Module} is Busy, can't change to Manual mode");
+                    return false;
+                }
+                srdEntity.EnterInit();
+                SRDPersistentManager.Instance.UpdateOperationModeValue(Module, currentOperation);
+
+                LOG.WriteLog(eEvent.INFO_SRD, Module, $"Operating mode is switched from {preOperation} to {currentOperation}");
             }
-            if (_srdPersistentValue.OperatingMode != "Manual") srdEntity.EnterInit();
-            SRDPersistentManager.Instance.UpdateOperationModeValue(Module,currentOperation);
             return true;
         }
         /// <summary>
@@ -379,9 +395,20 @@ namespace CyberX8_RT.Devices.SRD
         {
             string currentOperation = "Auto";
             SRDEntity srdEntity = Singleton<RouteManager>.Instance.GetModule<SRDEntity>(Module);
-            if (srdEntity == null || _srdPersistentValue == null) return false;
-            if (_srdPersistentValue.OperatingMode != "Auto") srdEntity.EnterInit();
-            SRDPersistentManager.Instance.UpdateOperationModeValue(Module,currentOperation);
+            if (srdEntity != null && _srdPersistentValue != null && _srdPersistentValue.OperatingMode != currentOperation)
+            {
+                string preOperation = _srdPersistentValue.OperatingMode;
+                if (srdEntity.IsBusy)
+                {
+                    LOG.WriteLog(eEvent.ERR_SRD, Module, $"{Module} is Busy, can't switch to Auto mode");
+                    return false;
+                }
+                srdEntity.EnterInit();
+                SRDPersistentManager.Instance.UpdateOperationModeValue(Module, currentOperation);
+
+                LOG.WriteLog(eEvent.INFO_SRD, Module, $"Operating mode is switched from {preOperation} to {currentOperation}");
+            }
+
             return true;
         }
         /// <summary>

+ 21 - 1
CyberX8_RT/Dispatch/JobProcesser.cs

@@ -227,13 +227,14 @@ namespace CyberX8_RT.Dispatch
             {
                 bool waferCacheCheck = WaferManager.Instance.CheckStartUpCache(ref reason);
                 if (!waferCacheCheck)
-                {
+                {                   
                     return true;
                 }
 
                 bool waferHolderCacheCheck = WaferHolderManager.Instance.CheckStartUpWaferHolderBuffer(ref reason);
                 if (!waferHolderCacheCheck)
                 {
+                    ClearWafersSeqName(cj);
                     return false;
                 }
 
@@ -241,6 +242,7 @@ namespace CyberX8_RT.Dispatch
                 LoaderEntity loaderEntity = Singleton<RouteManager>.Instance.GetModule<LoaderEntity>(ModuleName.Loader1.ToString());
                 if (loaderEntity != null && loaderEntity.WaferHolderInfo != null)
                 {
+                    ClearWafersSeqName(cj);
                     reason = "Loader Has WaferHolder";
                     LOG.WriteLog(eEvent.WARN_ROUTER, ModuleName.System.ToString(), reason);
                     return false;
@@ -267,16 +269,19 @@ namespace CyberX8_RT.Dispatch
                 {
                     reason = $"sequence recipe file {pj.Sequence} is not exist";
                     LOG.WriteLog(eEvent.WARN_ROUTER, ModuleName.System.ToString(), reason);
+                    ClearWafersSeqName(cj);
                     return false;
                 }
                 sequenceRecipe.SequenceType = sequenceType;
                 if (!SchedulerSequenceRecipeManager.Instance.CheckSequenceRecipeAvaible(sequenceRecipe,ref reason))
                 {
+                    ClearWafersSeqName(cj);
                     return false;
                 }
                 if(!SchedulerSequenceRecipeManager.Instance.ExistAvaibleProcessCell(sequenceRecipe,true,true))
                 {
                     reason = "sequence meets no avaible cell";
+                    ClearWafersSeqName(cj);
                     return false;
                 }
                 pj.SequenceRecipe= sequenceRecipe;
@@ -288,6 +293,7 @@ namespace CyberX8_RT.Dispatch
                 {
                     reason = $"sequence wafersize {pj.SequenceRecipe.SubstrateSize} is not matched wafer wafersize {slotWafersSize}";
                     LOG.WriteLog(eEvent.WARN_ROUTER, ModuleName.System.ToString(), reason);
+                    ClearWafersSeqName(cj);
                     return false;
                 }
 
@@ -297,6 +303,7 @@ namespace CyberX8_RT.Dispatch
                 {
                     reason = $"loader is not matched wafer wafersize {waferSize}";
                     LOG.WriteLog(eEvent.WARN_ROUTER, ModuleName.System.ToString(), reason);
+                    ClearWafersSeqName(cj);
                     return false;
                 }
                 int dummyCount = 0;
@@ -314,6 +321,7 @@ namespace CyberX8_RT.Dispatch
                 {
                     reason = $"dummy is not matched wafer wafersize {waferSize}";
                     LOG.WriteLog(eEvent.WARN_ROUTER, ModuleName.System.ToString(), reason);
+                    ClearWafersSeqName(cj);
                     return false;
                 }
                 string crsType = pj.SequenceRecipe.CrsType;
@@ -325,6 +333,7 @@ namespace CyberX8_RT.Dispatch
                     {
                         reason = $"buffer has not enough wafer shuttle";
                         LOG.WriteLog(eEvent.WARN_ROUTER, ModuleName.System.ToString(), reason);
+                        ClearWafersSeqName(cj);
                         return false;
                     }
                 }
@@ -335,6 +344,7 @@ namespace CyberX8_RT.Dispatch
                     {
                         reason = $"buffer has not enough wafer shuttle";
                         LOG.WriteLog(eEvent.WARN_ROUTER, ModuleName.System.ToString(), reason);
+                        ClearWafersSeqName(cj);
                         return false;
                     }
                 }
@@ -801,5 +811,15 @@ namespace CyberX8_RT.Dispatch
         {
             return _loadportControlJobDic.ContainsKey(loadPort)?_loadportControlJobDic[loadPort]:null;
         }
+        /// <summary>
+        /// 清除WaferSeqName信息
+        /// </summary>
+        private void ClearWafersSeqName(ControlJobInfo cj)
+        {
+            foreach (var item in cj.LotWafers)
+            {
+                item.SequenceName = "";
+            }
+        }
     }
 }

+ 1 - 1
CyberX8_RT/Modules/Dryer/DryerLotTrackUtil.cs

@@ -45,7 +45,7 @@ namespace CyberX8_RT.Modules.Dryer
                         {
                             strPath = waferInfoA.LotTrackPath;
                         }
-                        else if (waferInfoA != null && !string.IsNullOrEmpty(waferInfoA.LotId))
+                        else if (waferInfoB != null && !string.IsNullOrEmpty(waferInfoB.LotId))
                         {
                             strPath = waferInfoB.LotTrackPath;
                         }

+ 1 - 1
CyberX8_RT/Modules/Metal/MetalLotTrackUtil.cs

@@ -45,7 +45,7 @@ namespace CyberX8_RT.Modules.Metal
                         {
                             strPath = waferInfoA.LotTrackPath;
                         }
-                        else if (waferInfoA != null && !string.IsNullOrEmpty(waferInfoA.LotId))
+                        else if (waferInfoB != null && !string.IsNullOrEmpty(waferInfoB.LotId))
                         {
                             strPath = waferInfoB.LotTrackPath;
                         }

+ 1 - 1
CyberX8_RT/Modules/Prewet/PrewetLotTrackUtil.cs

@@ -43,7 +43,7 @@ namespace CyberX8_RT.Modules.Prewet
                         {
                             strPath = waferInfoA.LotTrackPath;
                         }
-                        else if (waferInfoA != null && !string.IsNullOrEmpty(waferInfoA.LotId))
+                        else if (waferInfoB != null && !string.IsNullOrEmpty(waferInfoB.LotId))
                         {
                             strPath = waferInfoB.LotTrackPath;
                         }

+ 37 - 37
CyberX8_RT/Modules/Prewet/PrewetProcessRoutine.cs

@@ -66,7 +66,7 @@ namespace CyberX8_RT.Modules.Prewet
         public void Abort()
         {
             _linMotAxis.StopOperation("", null);
-           _prewetDevice.PumpDisableOperation("pump disable", null);
+            _prewetDevice.PumpValveClose();
             Runner.Stop("Manual Abort");
         }
         /// <summary>
@@ -97,22 +97,22 @@ namespace CyberX8_RT.Modules.Prewet
                 LOG.WriteLog(eEvent.ERR_PREWET, Module, "reset linmot error");
                 return false;
             }
-            _prewetDevice.PrewetPumpData.PumpSpeedAuto = true;
+            //_prewetDevice.PrewetPumpData.PumpSpeedAuto = true;
             //更新Pump status状态
-            string statusContent = _prewetDevice.PrewetPumpData.PumpStatus ? "On" : "Off";
-            _prewetDevice.PrewetPumpData.PumpModel = "Auto";
-            _prewetDevice.PrewetPumpData.PumpStatusContent = $"{_prewetDevice.PrewetPumpData.PumpModel}: {statusContent}";
+            //string statusContent = _prewetDevice.PrewetPumpData.PumpStatus ? "On" : "Off";
+            //_prewetDevice.PrewetPumpData.PumpModel = "Auto";
+            //_prewetDevice.PrewetPumpData.PumpStatusContent = $"{_prewetDevice.PrewetPumpData.PumpModel}: {statusContent}";
 
-            result = _prewetDevice.PumpSpeed();
-            if (!result)
-            {
-                LOG.WriteLog(eEvent.ERR_PREWET, Module, "pump speed error");
-                return false;
-            }
-            bool pumpEnableResult = _prewetDevice.PumpEnableOperation("", null);
+            //result = _prewetDevice.PumpSpeed();
+            //if (!result)
+            //{
+            //    LOG.WriteLog(eEvent.ERR_PREWET, Module, "pump speed error");
+            //    return false;
+            //}
+            bool pumpEnableResult = _prewetDevice.PumpValveOpen();
             if (!pumpEnableResult)
             {
-                LOG.WriteLog(eEvent.ERR_PREWET, Module, "pump enable error");
+                LOG.WriteLog(eEvent.ERR_PREWET, Module, "pump valve open error");
                 return false;
             }
             return true;
@@ -123,7 +123,7 @@ namespace CyberX8_RT.Modules.Prewet
         /// <returns></returns>
         private bool WaitProcessEndStatus()
         {
-            if (_prewetDevice.Status == RState.End && _linMotAxis.Status == RState.End)
+            if (_linMotAxis.Status == RState.End)
             {
                 return true;
             }
@@ -135,11 +135,11 @@ namespace CyberX8_RT.Modules.Prewet
         /// <returns></returns>
         private bool CheckProcessFailedStatus()
         {
-            if (_prewetDevice.Status == RState.Failed)
-            {
-                LOG.WriteLog(eEvent.ERR_PREWET, Module, "prewet device status is error");
-                return true;
-            }
+            //if (_prewetDevice.Status == RState.Failed)
+            //{
+            //    LOG.WriteLog(eEvent.ERR_PREWET, Module, "prewet device status is error");
+            //    return true;
+            //}
             if (_linMotAxis.Status == RState.Failed)
             {
                 LOG.WriteLog(eEvent.ERR_PREWET, Module, "linmot status is error");
@@ -152,7 +152,7 @@ namespace CyberX8_RT.Modules.Prewet
         /// </summary>
         private bool StartAdjustSpeed()
         {
-            _prewetDevice.IsStartAutoSpeed = true;
+            //_prewetDevice.IsStartAutoSpeed = true;
             return true;
         }
         /// <summary>
@@ -169,15 +169,15 @@ namespace CyberX8_RT.Modules.Prewet
                 return false;
             }
 
-            if (!_prewetDevice.PrewetPumpData.PumpStatus)
-            {
-                LOG.WriteLog(eEvent.ERR_PREWET, Module, "pump status if off");
-                return false;
-            }
+            //if (!_prewetDevice.PrewetPumpData.PumpStatus)
+            //{
+            //    LOG.WriteLog(eEvent.ERR_PREWET, Module, "pump status if off");
+            //    return false;
+            //}
             bool result = _linMotAxis.StartPosition("", new object[] { _recipe.NumberOfScans });
             if (!result)
             {
-                _prewetDevice.PumpDisableOperation("pump disable", null);
+                _prewetDevice.PumpValveClose();
                 LOG.WriteLog(eEvent.ERR_PREWET, Module, "linmot start scan error");
                 return false;
             }
@@ -207,14 +207,14 @@ namespace CyberX8_RT.Modules.Prewet
         {
             if (_linMotAxis.Status == RState.Failed||_linMotAxis.Status==RState.Timeout)
             {
-                _prewetDevice.PumpDisable();
+                _prewetDevice.PumpValveClose();
                 return true;
             }
 
             if (_prewetDevice.PrewetPumpData.PumpPressureData.IsError)
             {
                 _linMotAxis.StopOperation("",null);
-                _prewetDevice.PumpDisableOperation("pump disable", null);
+                _prewetDevice.PumpValveClose();
                 LOG.WriteLog(eEvent.ERR_PREWET, Module, $"pump pressure status {_prewetDevice.PrewetPumpData.PumpPressureData.Value} is in error");
                 return true;
             }
@@ -231,7 +231,7 @@ namespace CyberX8_RT.Modules.Prewet
             {
                 LOG.WriteLog(eEvent.ERR_PREWET, Module, $"pump flow status {_prewetDevice.PrewetPumpData.PumpFlowData.Value} is in error");
                 _linMotAxis.StopOperation("", null);
-                _prewetDevice.PumpDisableOperation("pump disable", null);
+                _prewetDevice.PumpValveClose();
                 return true;
             }
             if (_prewetDevice.PrewetPumpData.PumpPressureData.IsWarning)
@@ -252,12 +252,12 @@ namespace CyberX8_RT.Modules.Prewet
         /// <returns></returns>
         private bool ProcessComplete()
         {
-            //bool result = _prewetDevice.PumpValveClose();
-            //if (!result)
-            //{
-            //    LOG.WriteLog(eEvent.ERR_PREWET, Module, "pump valve close");
-            //    return false;
-            //}
+            bool result = _prewetDevice.PumpValveClose();
+            if (!result)
+            {
+                LOG.WriteLog(eEvent.ERR_PREWET, Module, "pump valve close error");
+                return false;
+            }
 
             //result = _prewetDevice.PumpDisable();
             //if (!result)
@@ -265,8 +265,8 @@ namespace CyberX8_RT.Modules.Prewet
             //    LOG.WriteLog(eEvent.ERR_PREWET, Module, "pump enable close");
             //    return false;
             //}
-            bool result = _prewetDevice.PumpDisableOperation("pump disable",null);
-            return result;
+            //bool result = _prewetDevice.PumpDisableOperation("pump disable",null);
+            return true;
         }
         private bool CheckPumpValveClose()
         {

+ 1 - 1
CyberX8_RT/Modules/Rinse/RinseLotTrackUtil.cs

@@ -43,7 +43,7 @@ namespace CyberX8_RT.Modules.Rinse
                         {
                             strPath = waferInfoA.LotTrackPath;
                         }
-                        else if (waferInfoA != null && !string.IsNullOrEmpty(waferInfoA.LotId))
+                        else if (waferInfoB != null && !string.IsNullOrEmpty(waferInfoB.LotId))
                         {
                             strPath = waferInfoB.LotTrackPath;
                         }

+ 4 - 6
CyberX8_RT/Modules/SRD/SRDLotTrackUtil.cs

@@ -71,16 +71,14 @@ namespace CyberX8_RT.Modules.SRD
                     sw.WriteLine($"Recipe:{headerData.Recipe}");
                     sw.WriteLine($"ProcessTime:{headerData.ProcessTime}");
                     sw.Write(CVS_SPLIT_CHAR);
-                    string str = $"TimeStamp{CVS_SPLIT_CHAR}StateMachine{CVS_SPLIT_CHAR}WaterPressure{CVS_SPLIT_CHAR}WaterFlow{CVS_SPLIT_CHAR}WaferPresence{CVS_SPLIT_CHAR}" +
-                        $"RotationSpeed{CVS_SPLIT_CHAR}ArmPosition{CVS_SPLIT_CHAR}N2BelowOn{CVS_SPLIT_CHAR}WaterAbove{CVS_SPLIT_CHAR}WaterBelow{CVS_SPLIT_CHAR}SpinTorque{CVS_SPLIT_CHAR}" +
-                        $"ArmTorque{CVS_SPLIT_CHAR}LoaderDIEnable{CVS_SPLIT_CHAR}ExhaustOn{CVS_SPLIT_CHAR}ChuckVacuumOn{CVS_SPLIT_CHAR}ChuckVacuumPressure";
+                    string str = $"TimeStamp{CVS_SPLIT_CHAR}StateMachine{CVS_SPLIT_CHAR}WaterPressure{CVS_SPLIT_CHAR}WaterFlow{CVS_SPLIT_CHAR}" +
+                        $"RotationSpeed{CVS_SPLIT_CHAR}WaterOn{CVS_SPLIT_CHAR}LoaderDIEnable{CVS_SPLIT_CHAR}ChuckVacuumOn{CVS_SPLIT_CHAR}ChuckVacuumPressure";
                     sw.WriteLine(str);
                     for (int i = 0; i < datas.Count; i++)
                     {
                         SRDLotTrackData data = datas[i];
-                        string tmp = $"{CVS_SPLIT_CHAR}{data.TimeStamp.ToString("HH:mm:ss")}{CVS_SPLIT_CHAR}{data.StateMachine}{CVS_SPLIT_CHAR}{data.WaterPressure}{CVS_SPLIT_CHAR}{data.WaterFlow}{CVS_SPLIT_CHAR}{data.WaferPresence}{CVS_SPLIT_CHAR}" +
-                        $"{data.RotationSpeed}{CVS_SPLIT_CHAR}{data.ArmPosition}{CVS_SPLIT_CHAR}{data.N2BelowOn}{CVS_SPLIT_CHAR}{data.WaterAbove}{CVS_SPLIT_CHAR}{data.WaterBelow}{CVS_SPLIT_CHAR}{data.SpinTorque}{CVS_SPLIT_CHAR}" +
-                        $"{data.ArmTorque}{CVS_SPLIT_CHAR}{data.LoaderDIEnable}{CVS_SPLIT_CHAR}{data.ExhaustOn}{CVS_SPLIT_CHAR}{data.ChuckVacuumOn}{CVS_SPLIT_CHAR}{data.ChuckVacuumPressure}";
+                        string tmp = $"{CVS_SPLIT_CHAR}{data.TimeStamp.ToString("HH:mm:ss")}{CVS_SPLIT_CHAR}{data.StateMachine}{CVS_SPLIT_CHAR}{data.WaterPressure}{CVS_SPLIT_CHAR}{data.WaterFlow}{CVS_SPLIT_CHAR}" +
+                        $"{data.RotationSpeed}{CVS_SPLIT_CHAR}{data.WaterOn}{CVS_SPLIT_CHAR}{data.LoaderDIEnable}{CVS_SPLIT_CHAR}{data.ChuckVacuumOn}{CVS_SPLIT_CHAR}{data.ChuckVacuumPressure}";
                         sw.WriteLine(tmp);
                     }
                     sw.WriteLine("");

+ 8 - 14
CyberX8_RT/Modules/SRD/SRDProcessRecipeRoutine.cs

@@ -202,7 +202,6 @@ namespace CyberX8_RT.Modules.SRD
             SRDPersistentValue srdPersistentValue = SRDPersistentManager.Instance.GetModulePersistentValue(Module);
             if(srdPersistentValue.OperatingMode.Equals("Manual")) _isManual = true;
 
-
             _header.SoftWareVersion = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString();
             _header.Recipe = $"{_srdRecipe.Ppid}.srd.rcp";
             if (SC.ContainsItem("System.ToolID")) _header.ToolID = SC.GetStringValue("System.ToolID");
@@ -249,7 +248,7 @@ namespace CyberX8_RT.Modules.SRD
             bool result = CommonFunction.CheckRoutineStopState(_loaderRoutine);
             if (result)
             {
-                //AddLotTrackData();
+                AddLotTrackData();
                 if (_srdCommonDevice != null)
                 {
                     _srdCommonDevice.EnterErrorOperation();
@@ -297,7 +296,7 @@ namespace CyberX8_RT.Modules.SRD
             bool result = CommonFunction.CheckRoutineStopState(_runRecipeRoutine);
             if (result)
             {
-                //AddLotTrackData(); 
+                AddLotTrackData(); 
                 if (_srdCommonDevice != null)
                 {
                     _srdCommonDevice.EnterErrorOperation();
@@ -341,7 +340,7 @@ namespace CyberX8_RT.Modules.SRD
             bool result= CommonFunction.CheckRoutineStopState(_unloaderRoutine);
             if (result)
             {
-                //AddLotTrackData();
+                AddLotTrackData();
                 NotifyError(eEvent.ERR_SRD, _unloaderRoutine.ErrorMsg, 0);
             }
             return result;
@@ -381,7 +380,7 @@ namespace CyberX8_RT.Modules.SRD
             //记录Lottrack
             if (DateTime.Now.Subtract(_lotTackTime).TotalMilliseconds >= LOTTRACK_TIME)
             {
-                //AddLotTrackData();
+                AddLotTrackData();
                 _lotTackTime = DateTime.Now;
             }
         }
@@ -395,20 +394,15 @@ namespace CyberX8_RT.Modules.SRD
             SRDLotTrackData data = new SRDLotTrackData();
             data.TimeStamp = DateTime.Now;
             data.StateMachine = GetCurrentStateMachine();
-            data.ArmPosition = _armAxis.MotionData.MotorPosition;
             data.WaterPressure = _srdCommonDevice.CommonData.WaterPressure;
-            data.WaferPresence =  $"{_srdCommonDevice.WaferPresence}:{_srdCommonDevice.CommonData.WaferPresence}";
             data.ChuckVacuumOn = _srdCommonDevice.CommonData.ChuckVacuum;
             data.ChuckVacuumPressure = _srdCommonDevice.CommonData.VacuumValue;
-            data.ArmTorque = _armAxis.MotionData.ActualTorque;
-            data.SpinTorque = _rotationAxis.MotionData.ActualTorque;
+            //data.SpinTorque = _rotationAxis.MotionData.ActualTorque;
             data.RotationSpeed = _rotationAxis.MotionData.ActualVelocity;
-            data.N2BelowOn = false;
-            data.WaterAbove = _srdCommonDevice.CommonData.WaterAbove;
-            data.WaterBelow = _srdCommonDevice.CommonData.WaterBelow;
-            data.ExhaustOn = _srdCommonDevice.CommonData.ExhaustOn;
+            data.WaterOn = _srdCommonDevice.CommonData.WaterOn;
+            data.WaterFlow = _srdCommonDevice.CommonData.WaterFlow;
             data.LoaderDIEnable = _facilities.LoaderDiEnable;
-            data.WaterFlow = 0;
+            
             _datas.Add(data);
         }
 

+ 9 - 5
CyberX8_RT/Modules/SRD/SRDRunRecipeRoutine.cs

@@ -181,11 +181,11 @@ namespace CyberX8_RT.Modules.SRD
         private bool CheckPreCondition()
         {
             //Check Rotation Home
-            //if (!_rotationAxis.IsHomed)
-            //{
-            //    NotifyError(eEvent.ERR_SRD, "Rotation is not homed", 0);
-            //    return false;
-            //}
+            if (!_rotationAxis.IsHomed)
+            {
+                NotifyError(eEvent.ERR_SRD, "Rotation is not homed", 0);
+                return false;
+            }
             //Check LiftUp
             if (_srdCommon.CommonData.LiftUp)
             {
@@ -298,6 +298,8 @@ namespace CyberX8_RT.Modules.SRD
         /// <returns></returns>
         private bool CheckWaterPressure()
         {
+            if (_srdRecipe.MinWaterPressure == 0 && _srdRecipe.MaxWaterPressure == 0) return true;
+
             if (_srdCommon.CommonData.WaterPressure < _srdRecipe.MinWaterPressure)
             {
                 NotifyError(eEvent.ERR_SRD, $"Water Pressure {_srdCommon.CommonData.WaterPressure} is less than recipe's MinWaterPressure {_srdRecipe.MinWaterPressure}", 0);
@@ -375,6 +377,8 @@ namespace CyberX8_RT.Modules.SRD
         /// <returns></returns>
         private bool WaterFlowCheck()
         {
+            if (_srdRecipe.MaxSRDWaterFlow == 0 && _srdRecipe.MinSRDWaterFlow == 0) return true;
+
             if (_srdCommon.CommonData.WaterFlow > _srdRecipe.MaxSRDWaterFlow)
             {
                 NotifyError(eEvent.ERR_SRD, $"{Module} Water Flow:{_srdCommon.CommonData.WaterFlow} is over recipe's MaxSRDWaterFlow:{_srdRecipe.MaxSRDWaterFlow}", 0);

+ 2 - 2
CyberX8_Themes/UserControls/PrewetUIControl.xaml

@@ -118,8 +118,8 @@
 
         <!--右边进水阀-->
 
-        <userControls:FlowPipe Margin="406,380,294,62" IsFlowing="{Binding ElementName=self,Path=PumpData.PumpEnable}" IsReverse="True"/>
-        <userControls:FlowPipe Margin="506,380,194,62" IsFlowing="{Binding ElementName=self,Path=PumpData.PumpEnable}" IsReverse="True"/>
+        <userControls:FlowPipe Margin="406,380,294,62" IsFlowing="{Binding ElementName=self,Path=PumpData.PumpValve}" IsReverse="True"/>
+        <userControls:FlowPipe Margin="506,380,194,62" IsFlowing="{Binding ElementName=self,Path=PumpData.PumpValve}" IsReverse="True"/>
         <Canvas Width="50" Height="80" Margin="441,370,309,0">
             <userControls:PrewetTankControl/>
             <Rectangle Width="20" Height="40" Canvas.Left="6" Canvas.Top="24" HorizontalAlignment="Left" VerticalAlignment="Top" Visibility="{Binding ElementName=self,Path=PumpData.PumpValve,Converter={StaticResource boolToVisibility2}}">

+ 1 - 1
CyberX8_Themes/UserControls/SRDUIControl.xaml

@@ -48,7 +48,7 @@
 
             <Ellipse Width="45" Height="45" Fill="#F8F8F8" Stroke="Transparent" StrokeThickness="2" Canvas.Left="105" Canvas.Top="50" HorizontalAlignment="Center" VerticalAlignment="Top"/>
             <!--WaterBelow-->
-            <local:FlowPipe IsFlowing="{Binding ElementName=self,Path=CommonData.WaterBelow}" RotateTransformValue="90" Canvas.Left="244.5" Canvas.Top="90" Height="9" HorizontalAlignment="Left" VerticalAlignment="Center" Width="56" />
+            <local:FlowPipe IsFlowing="{Binding ElementName=self,Path=CommonData.WaterOn}" RotateTransformValue="90" Canvas.Left="244.5" Canvas.Top="90" Height="9" HorizontalAlignment="Left" VerticalAlignment="Center" Width="56" />
             <Image Source="pack://application:,,,/CyberX8_Themes;component/Themes/Images/parts/SRDWaterHead.png" Canvas.Left="234" Canvas.Top="137" Height="31" Width="12" HorizontalAlignment="Center" VerticalAlignment="Center" />
             <!--Rotation-->
             <Canvas Height="209" Width="210" Canvas.Left="135" Canvas.Top="141" RenderTransformOrigin="0.5,0.5">

+ 4 - 1
Framework/Common/CommonData/SRD/SRDLotTrackData.cs

@@ -69,6 +69,9 @@ namespace MECF.Framework.Common.CommonData.SRD
         /// 真空压力
         /// </summary>
         public double ChuckVacuumPressure { get; set; }
-        
+        /// <summary>
+        /// Water On
+        /// </summary>
+        public bool WaterOn { get; set; }
     }
 }