diff --git a/app/src/main/java/com/bonait/bnframework/business/ExecuteTheRecipe.java b/app/src/main/java/com/bonait/bnframework/business/ExecuteTheRecipe.java index f7c5c338..3c43682b 100644 --- a/app/src/main/java/com/bonait/bnframework/business/ExecuteTheRecipe.java +++ b/app/src/main/java/com/bonait/bnframework/business/ExecuteTheRecipe.java @@ -634,6 +634,10 @@ public class ExecuteTheRecipe { } } + //默认去炒制位置1去等待 + BPA_GOODSRECIPE data3 = Get位置("高速", "炒菜位1"); + ExecuteOperationSteps(data3.processname, data3.processvalue); + //判断是否有烹饪时间 int val = 0; for (HashMap.Entry entry : data.entrySet()) { @@ -1018,6 +1022,10 @@ public class ExecuteTheRecipe { WriteMainPLC("炒锅投主料完成", true, null); } + //默认去炒制位置1去等待 + BPA_GOODSRECIPE data3 = Get位置("高速", "炒菜位1"); + ExecuteOperationSteps(data3.processname, data3.processvalue); + //判断是否有烹饪时间 int val = 0; for (HashMap.Entry entry : data.entrySet()) { @@ -1155,6 +1163,10 @@ public class ExecuteTheRecipe { WriteMainPLC("炒锅投主料完成", true, null); } + //默认去炒制位置1去等待 + BPA_GOODSRECIPE data3 = Get位置("高速", "炒菜位1"); + ExecuteOperationSteps(data3.processname, data3.processvalue); + //判断是否有烹饪时间 int val = 0; for (HashMap.Entry entry : data.entrySet()) { @@ -1224,6 +1236,10 @@ public class ExecuteTheRecipe { ExecuteTheRecipe.WritePLC("加热", true, null); }//再次释放加热 + //默认去炒制位置1去等待 + BPA_GOODSRECIPE data3 = Get位置("高速", "炒菜位1"); + ExecuteOperationSteps(data3.processname, data3.processvalue); + if (val > 0) { Thread.sleep(val * 1000); } @@ -1846,6 +1862,21 @@ public class ExecuteTheRecipe { } } + //机器人急停,制作订单 应该暂停 + + //强制结束任务 + Object IsStop = ReadMainPLC("强制结束任务"); + if (IsStop != null) { + if ((boolean) IsStop) + { + WriteMainPLC("强制结束任务", false, null);//复位 + + ExecuteTheRecipe.IsPause = false; + ExecuteTheRecipe.WritePLC("暂停开关", false, null); + ExecuteTheRecipe.SetForcedEnd();//设置强制结束 + } + } + // Object IsJT = ReadMainPLC("机器人急停"); // if (IsJT != null) { // if ((boolean) IsJT)//异常情况 diff --git a/app/src/main/java/com/bonait/bnframework/common/constant/ConfigName.java b/app/src/main/java/com/bonait/bnframework/common/constant/ConfigName.java index 9c3ba238..cf6a163b 100644 --- a/app/src/main/java/com/bonait/bnframework/common/constant/ConfigName.java +++ b/app/src/main/java/com/bonait/bnframework/common/constant/ConfigName.java @@ -1130,7 +1130,7 @@ public class ConfigName { put("炒菜完成请求出餐",8); put("炒锅出餐减速到位",9); //实时 put("炒锅请求投主料",10); - + put("强制结束任务完成",11);//炒锅反馈强制结束任务完成 put("机器人准备就绪",51);//修改就绪信号 put("机器人放辅料完成",52); @@ -1138,6 +1138,7 @@ public class ConfigName { put("商品下发",54); put("机器人急停",55);//true 异常 false 正常 put("机器人投放主料完成",56); + put("强制结束任务",57); put("商品信息",0); }}; 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 2760c9a2..4057bdf4 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 @@ -415,6 +415,10 @@ public class BottomNavigationNewActivity extends BaseActivity { ToastUtils.info("客官,当前菜品已强制结束!!!"); //初始化 ExecuteTheRecipe.BottomClick("初始化"); + if (ConfigName.getInstance().versionSelectionEnum.contains("一拖"))//通知任务结束 + { + ExecuteTheRecipe.WriteMainPLC("强制结束任务完成", true, null);//复位 + } } } }); 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 ab5f053c..9015fda7 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 @@ -623,6 +623,10 @@ public class Home1Fragment extends BaseFragment { ToastUtils.info("客官,当前菜品已强制结束!!!"); //初始化 ExecuteTheRecipe.BottomClick("初始化"); + if (ConfigName.getInstance().versionSelectionEnum.contains("一拖"))//通知任务结束 + { + ExecuteTheRecipe.WriteMainPLC("强制结束任务完成", true, null);//复位 + } } } });