|
|
@@ -74,6 +74,9 @@ public class ExecuteTheRecipe { |
|
|
|
boolean isError = false; |
|
|
|
long startTime = System.currentTimeMillis(); //起始时间 |
|
|
|
showlog("开始烹饪菜谱【" + orderDetail.goodsName + "】"); |
|
|
|
ModbusCenter.rackWritePlc("输送线停止",true,null); |
|
|
|
Thread.sleep(500); |
|
|
|
ModbusCenter.rackWritePlc("输送线停止",false,null); |
|
|
|
try { |
|
|
|
//获取工艺 |
|
|
|
ArrayList<BPA_GOODS_PROCESS_DETAIL> goodsrecipes = GoodsProcessDetailDBUtil.getByGroupId(orderDetail.groupId); |
|
|
@@ -1150,6 +1153,7 @@ public class ExecuteTheRecipe { |
|
|
|
try { |
|
|
|
showlog("准备出菜!"); |
|
|
|
//先延迟 |
|
|
|
|
|
|
|
for (HashMap.Entry<String, String> entry : data.entrySet()) { |
|
|
|
String key = entry.getKey(); |
|
|
|
String value = entry.getValue(); |
|
|
@@ -1244,6 +1248,9 @@ public class ExecuteTheRecipe { |
|
|
|
}); |
|
|
|
|
|
|
|
Thread.sleep(100); |
|
|
|
ModbusCenter.rackWritePlc("输送线停止",true,null); |
|
|
|
Thread.sleep(500); |
|
|
|
ModbusCenter.rackWritePlc("输送线停止",false,null); |
|
|
|
ThreadWhile(deviceNum,deviceNum+"机器人到位请求炒锅出餐倒菜"); |
|
|
|
if(ConfigName.IsForcedEnd[deviceNum-1]){ |
|
|
|
Thread.sleep(100); |
|
|
@@ -1319,11 +1326,36 @@ public class ExecuteTheRecipe { |
|
|
|
try{ |
|
|
|
ThreadWhile(deviceNum,deviceNum+"炒锅出餐完成"); |
|
|
|
ConfigName.getInstance().isPutFinish = true; |
|
|
|
// if((Boolean) ModbusCenter.rackReadPlc("输送线进料菜盆检测")){ |
|
|
|
ModbusCenter.rackWritePlc("输送线启动",true,null); |
|
|
|
Thread.sleep(500); |
|
|
|
ModbusCenter.rackWritePlc("输送线启动",false,null); |
|
|
|
// } |
|
|
|
ModbusCenter.rackWritePlc("输送线启动",true,null); |
|
|
|
Thread.sleep(500); |
|
|
|
ModbusCenter.rackWritePlc("输送线启动",false,null); |
|
|
|
|
|
|
|
ThreadManager.get().execute(new Runnable() { |
|
|
|
@Override |
|
|
|
public void run() { |
|
|
|
try{ |
|
|
|
if(ModbusCenter.getListingValue("输送线出料菜盆检测") instanceof Boolean){ |
|
|
|
boolean isStart = (boolean) ModbusCenter.getListingValue("输送线出料菜盆检测"); |
|
|
|
long a = System.currentTimeMillis(); |
|
|
|
Thread.sleep(15000); |
|
|
|
while (!isStart) { |
|
|
|
Thread.sleep(1000); |
|
|
|
if ((System.currentTimeMillis() - a) > 1000 * 20) { |
|
|
|
break; |
|
|
|
} |
|
|
|
isStart = (boolean) ModbusCenter.getListingValue("输送线出料菜盆检测"); |
|
|
|
if(isStart){ |
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
ModbusCenter.rackWritePlc("输送线停止",true,null); |
|
|
|
Thread.sleep(500); |
|
|
|
ModbusCenter.rackWritePlc("输送线停止",false,null); |
|
|
|
}catch (Exception e){ |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}catch (Exception e){ |
|
|
|
|
|
|
|
} |
|
|
@@ -1334,11 +1366,36 @@ public class ExecuteTheRecipe { |
|
|
|
try{ |
|
|
|
ThreadWhile(deviceNum,deviceNum+"炒锅出餐完成"); |
|
|
|
ConfigName.getInstance().isPutFinish = true; |
|
|
|
// if((Boolean) ModbusCenter.rackReadPlc("输送线进料菜盆检测")){ |
|
|
|
ModbusCenter.rackWritePlc("输送线启动",true,null); |
|
|
|
Thread.sleep(500); |
|
|
|
ModbusCenter.rackWritePlc("输送线启动",false,null); |
|
|
|
// } |
|
|
|
ModbusCenter.rackWritePlc("输送线启动",true,null); |
|
|
|
Thread.sleep(500); |
|
|
|
ModbusCenter.rackWritePlc("输送线启动",false,null); |
|
|
|
|
|
|
|
ThreadManager.get().execute(new Runnable() { |
|
|
|
@Override |
|
|
|
public void run() { |
|
|
|
try{ |
|
|
|
if(ModbusCenter.getListingValue("输送线出料菜盆检测") instanceof Boolean){ |
|
|
|
boolean isStart = (boolean) ModbusCenter.getListingValue("输送线出料菜盆检测"); |
|
|
|
long a = System.currentTimeMillis(); |
|
|
|
Thread.sleep(15000); |
|
|
|
while (!isStart) { |
|
|
|
Thread.sleep(1000); |
|
|
|
if ((System.currentTimeMillis() - a) > 1000 * 20) { |
|
|
|
break; |
|
|
|
} |
|
|
|
isStart = (boolean) ModbusCenter.getListingValue("输送线出料菜盆检测"); |
|
|
|
if(isStart){ |
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
ModbusCenter.rackWritePlc("输送线停止",true,null); |
|
|
|
Thread.sleep(500); |
|
|
|
ModbusCenter.rackWritePlc("输送线停止",false,null); |
|
|
|
}catch (Exception e){ |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}catch (Exception e){ |
|
|
|
|
|
|
|
} |
|
|
|