|
|
@@ -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 |
|
|
|