From 023916a8b665bae6561d2fe414ffb8abc1fe2400 Mon Sep 17 00:00:00 2001 From: fyf Date: Sat, 30 Dec 2023 10:14:30 +0800 Subject: [PATCH] =?UTF-8?q?1.=E5=A2=9E=E5=8A=A0=E4=B8=80=E6=8B=96=E4=BA=8C?= =?UTF-8?q?=E4=B8=80=E6=8B=96=E5=9B=9B=20=20=E5=BC=BA=E5=88=B6=E7=BB=93?= =?UTF-8?q?=E6=9D=9F=E4=BB=BB=E5=8A=A1=202.=E8=B0=83=E6=95=B4=E6=8A=95?= =?UTF-8?q?=E6=96=99=E4=BD=8D=E7=BD=AE=E5=92=8C=E7=82=92=E5=88=B6=E4=BD=8D?= =?UTF-8?q?=E7=BD=AE=E7=9A=84=E9=BB=98=E8=AE=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../business/ExecuteTheRecipe.java | 31 +++++++++++++++++++ .../common/constant/ConfigName.java | 3 +- .../activity/BottomNavigationNewActivity.java | 4 +++ .../modules/home/fragment/Home1Fragment.java | 4 +++ 4 files changed, 41 insertions(+), 1 deletion(-) 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);//复位 + } } } });