Browse Source

Revise SRDLoaderRoutine;

niuyx 2 weeks ago
parent
commit
f0806c0b53

+ 11 - 1
CyberX8_RT/Modules/SRD/SRDLoaderRoutine.cs

@@ -118,6 +118,12 @@ namespace CyberX8_RT.Modules.SRD
             //    NotifyError(eEvent.ERR_SRD, "Rotation is not homed", 0);
             //    return false;
             //}
+            //Check Vacuum off
+            if (!_srdCommon.CommonData.ChuckVacuum)
+            {
+                NotifyError(eEvent.ERR_SRD, "Chuck Vacuum is on", 0);
+                return false;
+            }
             //Check LiftUp
             if (!_srdCommon.CommonData.LiftUp)
             {
@@ -164,6 +170,10 @@ namespace CyberX8_RT.Modules.SRD
         private bool GetWaferSize()
         {
             WaferInfo waferInfo = WaferManager.Instance.GetWafer(ModuleNameString.ToEnum(Module), 0);
+            if (waferInfo == null)
+            {
+                return false;
+            }
             switch (waferInfo.Size)
             {
                 case WaferSize.WS0:
@@ -313,7 +323,7 @@ namespace CyberX8_RT.Modules.SRD
         /// <returns></returns>
         private bool CheckChuckVacuumOnEndStatus()
         {
-            return _srdCommon.Status == RState.End && _srdCommon.CommonData.ChuckVacuum;
+            return _srdCommon.Status == RState.End && !_srdCommon.CommonData.ChuckVacuum;
         }
         /// <summary>
         /// 检验ChuckVacuumOn结束状态

+ 4 - 0
CyberX8_Simulator/Devices/WagoSocketSimulator.cs

@@ -416,8 +416,12 @@ namespace CyberX8_Simulator.Devices
             if (DINameIndexDic.ContainsKey("r_SRD2_200_FLIPPER3_OUT")) DIBytes[DINameIndexDic["r_SRD2_200_FLIPPER3_OUT"]] = 1;
             if (DONameIndexDic.ContainsKey("c_SRD1_150_FLIPPERS_IN")) DOBytes[DONameIndexDic["c_SRD1_150_FLIPPERS_IN"]] = 1;
             if (DONameIndexDic.ContainsKey("c_SRD2_150_FLIPPERS_IN")) DOBytes[DONameIndexDic["c_SRD2_150_FLIPPERS_IN"]] = 1;
+            if (DONameIndexDic.ContainsKey("c_SRD1_200_FLIPPERS_IN")) DOBytes[DONameIndexDic["c_SRD1_200_FLIPPERS_IN"]] = 1;
+            if (DONameIndexDic.ContainsKey("c_SRD2_200_FLIPPERS_IN")) DOBytes[DONameIndexDic["c_SRD2_200_FLIPPERS_IN"]] = 1;
             if (DONameIndexDic.ContainsKey("c_SRD1_LIFT_UP")) DOBytes[DONameIndexDic["c_SRD1_LIFT_UP"]] = 1;
             if (DONameIndexDic.ContainsKey("c_SRD2_LIFT_UP")) DOBytes[DONameIndexDic["c_SRD2_LIFT_UP"]] = 1;
+            if (DINameIndexDic.ContainsKey("r_SRD1_WAFER_PRESENT")) DIBytes[DINameIndexDic["r_SRD1_WAFER_PRESENT"]] = 1;
+            if (DINameIndexDic.ContainsKey("r_SRD2_WAFER_PRESENT")) DIBytes[DINameIndexDic["r_SRD2_WAFER_PRESENT"]] = 1;
             //Metal
             if (AINameIndexDic.ContainsKey("r_PUMP4_FLOW")) AIShorts[AINameIndexDic["r_PUMP4_FLOW"]] = 3277;