Browse Source

提交

炒锅机器人_一拖多
liup 2 months ago
parent
commit
cc7fea888d
2 changed files with 14 additions and 13 deletions
  1. +6
    -6
      app/src/main/java/com/bonait/bnframework/business/ExecuteTheRecipe.java
  2. +8
    -7
      app/src/main/java/com/bonait/bnframework/business/ExecuteTheRecipe2.java

+ 6
- 6
app/src/main/java/com/bonait/bnframework/business/ExecuteTheRecipe.java View File

@@ -840,7 +840,7 @@ public class ExecuteTheRecipe {
// ThreadWhile(foodPosition+"#料仓检测有无");

Wait_Robot_No_Working();//等待机器人空闲
ModbusCenter.robotWritePlc(false,"炒锅允许倒料",true,null);
ModbusCenter.robotWritePlc(false,deviceNum+"炒锅允许倒料",true,null);
if(!MakeStatus){
return;
}
@@ -914,7 +914,7 @@ public class ExecuteTheRecipe {
ThreadWhile(foodPosition+"#料仓检测有无");

Wait_Robot_No_Working();//等待机器人空闲
ModbusCenter.robotWritePlc(false,"炒锅允许倒料",true,null);
ModbusCenter.robotWritePlc(false,deviceNum+"炒锅允许倒料",true,null);

ModbusCenter.robotWritePlc(true,foodPosition+"#库取原料倒至炒锅",true,null);
Thread.sleep(100);
@@ -967,7 +967,7 @@ public class ExecuteTheRecipe {
//检测盆是否存在

Wait_Robot_No_Working();//等待机器人空闲
ModbusCenter.robotWritePlc(false,"炒锅允许倒料",true,null);
ModbusCenter.robotWritePlc(false,deviceNum+"炒锅允许倒料",true,null);
if(!MakeStatus){
return;
}
@@ -1040,7 +1040,7 @@ public class ExecuteTheRecipe {
ThreadWhile(foodPosition+"#调料检测有无");

Wait_Robot_No_Working();//等待机器人空闲
ModbusCenter.robotWritePlc(false,"炒锅允许倒料",true,null);
ModbusCenter.robotWritePlc(false,deviceNum+"炒锅允许倒料",true,null);

ModbusCenter.robotWritePlc(true,foodPosition+"#库取调料倒至炒锅",true,null);
Thread.sleep(100);
@@ -1117,7 +1117,7 @@ public class ExecuteTheRecipe {

Thread.sleep(100);
ThreadWhile(deviceNum+"机器人到位请求炒锅出餐倒菜");
ModbusCenter.robotWritePlc(false,"炒锅出餐减速到位",false,null);
ModbusCenter.robotWritePlc(false,deviceNum+"炒锅出餐减速到位",false,null);
Thread.sleep(100);
BottomClick1("出菜");//自动去倒菜位
//一直等待机器移动到该位置,否则就一直等待 6s超时
@@ -1134,7 +1134,7 @@ public class ExecuteTheRecipe {
}
Object jsw = ReadPLC("炒锅倒菜减速位");//ListeningValue.get(name);
if (jsw != null) {
ModbusCenter.robotWritePlc(false,"炒锅出餐减速到位",jsw,null);
ModbusCenter.robotWritePlc(false,deviceNum+"炒锅出餐减速到位",jsw,null);
}
}
Thread.sleep(100);//10 *6


+ 8
- 7
app/src/main/java/com/bonait/bnframework/business/ExecuteTheRecipe2.java View File

@@ -21,6 +21,7 @@ import com.bonait.bnframework.modbus.ModbusCenter;
import com.bonait.bnframework.modbus.RackModbusTcpServer;
import com.bonait.bnframework.modbus.RobotModbusTcpServer;
import com.bonait.bnframework.modbus.Wok2ModbusTcpServer;
import com.bonait.bnframework.modbus.Wok2ModbusTcpServer;
import com.bonait.bnframework.newui.widget.NewToastUtil;

import org.greenrobot.eventbus.EventBus;
@@ -35,7 +36,7 @@ import java.util.Map;
*/
public class ExecuteTheRecipe2 {

private static final String TAG = "ExecuteTheRecipe==>";
private static final String TAG = "ExecuteTheRecipe2==>";
private static int deviceNum = 2;
/**
@@ -839,7 +840,7 @@ public class ExecuteTheRecipe2 {
// ThreadWhile(foodPosition+"#料仓检测有无");

Wait_Robot_No_Working();//等待机器人空闲
ModbusCenter.robotWritePlc(false,"炒锅允许倒料",true,null);
ModbusCenter.robotWritePlc(false,deviceNum+"炒锅允许倒料",true,null);
if(!MakeStatus){
return;
}
@@ -913,7 +914,7 @@ public class ExecuteTheRecipe2 {
ThreadWhile(foodPosition+"#料仓检测有无");

Wait_Robot_No_Working();//等待机器人空闲
ModbusCenter.robotWritePlc(false,"炒锅允许倒料",true,null);
ModbusCenter.robotWritePlc(false,deviceNum+"炒锅允许倒料",true,null);

ModbusCenter.robotWritePlc(true,foodPosition+"#库取原料倒至炒锅",true,null);
Thread.sleep(100);
@@ -966,7 +967,7 @@ public class ExecuteTheRecipe2 {
//检测盆是否存在

Wait_Robot_No_Working();//等待机器人空闲
ModbusCenter.robotWritePlc(false,"炒锅允许倒料",true,null);
ModbusCenter.robotWritePlc(false,deviceNum+"炒锅允许倒料",true,null);
if(!MakeStatus){
return;
}
@@ -1039,7 +1040,7 @@ public class ExecuteTheRecipe2 {
ThreadWhile(foodPosition+"#调料检测有无");

Wait_Robot_No_Working();//等待机器人空闲
ModbusCenter.robotWritePlc(false,"炒锅允许倒料",true,null);
ModbusCenter.robotWritePlc(false,deviceNum+"炒锅允许倒料",true,null);

ModbusCenter.robotWritePlc(true,foodPosition+"#库取调料倒至炒锅",true,null);
Thread.sleep(100);
@@ -1116,7 +1117,7 @@ public class ExecuteTheRecipe2 {

Thread.sleep(100);
ThreadWhile(deviceNum+"机器人到位请求炒锅出餐倒菜");
ModbusCenter.robotWritePlc(false,"炒锅出餐减速到位",false,null);
ModbusCenter.robotWritePlc(false,deviceNum+"炒锅出餐减速到位",false,null);
Thread.sleep(100);
BottomClick1("出菜");//自动去倒菜位
//一直等待机器移动到该位置,否则就一直等待 6s超时
@@ -1133,7 +1134,7 @@ public class ExecuteTheRecipe2 {
}
Object jsw = ReadPLC("炒锅倒菜减速位");//ListeningValue.get(name);
if (jsw != null) {
ModbusCenter.robotWritePlc(false,"炒锅出餐减速到位",jsw,null);
ModbusCenter.robotWritePlc(false,deviceNum+"炒锅出餐减速到位",jsw,null);
}
}
Thread.sleep(100);//10 *6


Loading…
Cancel
Save