diff --git a/app/src/main/java/com/bonait/bnframework/modules/home/activity/BottomNavigationNewActivity.java b/app/src/main/java/com/bonait/bnframework/modules/home/activity/BottomNavigationNewActivity.java index 1d75bb98..f9616f46 100644 --- a/app/src/main/java/com/bonait/bnframework/modules/home/activity/BottomNavigationNewActivity.java +++ b/app/src/main/java/com/bonait/bnframework/modules/home/activity/BottomNavigationNewActivity.java @@ -534,13 +534,27 @@ public class BottomNavigationNewActivity extends BaseActivity { ExecuteTheRecipe.BottomClick("平移-去" + writeValue); Log.d("移动去", writeValue); } else { - ExecuteTheRecipe.BottomClick("平移-去1号位"); - Log.d("移动去", "1号位"); + Object val1= ExecuteTheRecipe.ReadPLC("平移轴在1号位"); + if(val1!=null) + { + if(!(boolean) (val1)) //平移轴不在在一号位 + { + ExecuteTheRecipe.BottomClick1("平移-去1号位"); + Log.d("移动去", "1号位"); + } + } } } else { if (!MakeCipe.processname.equals("主料")) { - ExecuteTheRecipe.BottomClick("平移-去1号位"); - Log.d("移动去", "1号位"); + Object val1= ExecuteTheRecipe.ReadPLC("平移轴在1号位"); + if(val1!=null) + { + if(!(boolean) (val1)) //平移轴不在在一号位 + { + ExecuteTheRecipe.BottomClick1("平移-去1号位"); + Log.d("移动去", "1号位"); + } + } } } } diff --git a/app/src/main/java/com/bonait/bnframework/modules/home/fragment/Home1Fragment.java b/app/src/main/java/com/bonait/bnframework/modules/home/fragment/Home1Fragment.java index 08a88c70..dfc59153 100644 --- a/app/src/main/java/com/bonait/bnframework/modules/home/fragment/Home1Fragment.java +++ b/app/src/main/java/com/bonait/bnframework/modules/home/fragment/Home1Fragment.java @@ -742,16 +742,31 @@ public class Home1Fragment extends BaseFragment { writeValue = value; } } + ExecuteTheRecipe.BottomClick1("平移-去" + writeValue); Log.d("移动去", writeValue); } else { - ExecuteTheRecipe.BottomClick1("平移-去1号位"); - Log.d("移动去", "1号位"); + Object val1= ExecuteTheRecipe.ReadPLC("平移轴在1号位"); + if(val1!=null) + { + if(!(boolean) (val1)) //平移轴不在在一号位 + { + ExecuteTheRecipe.BottomClick1("平移-去1号位"); + Log.d("移动去", "1号位"); + } + } } } else { if (!MakeCipe.processname.equals("主料")) { - ExecuteTheRecipe.BottomClick1("平移-去1号位"); - Log.d("移动去", "1号位"); + Object val1= ExecuteTheRecipe.ReadPLC("平移轴在1号位"); + if(val1!=null) + { + if(!(boolean) (val1)) //平移轴不在在一号位 + { + ExecuteTheRecipe.BottomClick1("平移-去1号位"); + Log.d("移动去", "1号位"); + } + } } } }