Commit 451a8d10 authored by wanghao's avatar wanghao

1 上下料 判断 传送带 是否有数据-测试

parent 903d93b7
...@@ -93,15 +93,15 @@ public class RobotArmCommandServiceImpl implements IRobotArmCommandService ...@@ -93,15 +93,15 @@ public class RobotArmCommandServiceImpl implements IRobotArmCommandService
robotArmCommandMapper.selectPendingLoadingCommands(); robotArmCommandMapper.selectPendingLoadingCommands();
if (!loadingCommands.isEmpty()) { if (!loadingCommands.isEmpty()) {
// 传送带检测先去掉 // 传送带检测先去掉
// boolean[] roboticArmEntryConveyorData = Modbus4jUtils.getRoboticArmEntryConveyorData(); boolean[] roboticArmEntryConveyorData = Modbus4jUtils.getRoboticArmEntryConveyorData();
// log.info("机械臂入口 conveyor 0状态: " + roboticArmEntryConveyorData[0]); log.info("机械臂入口 conveyor 0状态: " + roboticArmEntryConveyorData[0]);
// log.info("机械臂入口 conveyor 1状态: " + roboticArmEntryConveyorData[1]); log.info("机械臂入口 conveyor 1状态: " + roboticArmEntryConveyorData[1]);
// if(roboticArmEntryConveyorData[1]) { if(roboticArmEntryConveyorData[1]) {
// sendCommand(loadingCommands.get(0), "LOAD"); sendCommand(loadingCommands.get(0), "LOAD");
// return; return;
// } }
log.info("开始处理上料指令: {}", loadingCommands.get(0)); // log.info("开始处理上料指令: {}", loadingCommands.get(0));
sendCommand(loadingCommands.get(0), "LOAD"); // sendCommand(loadingCommands.get(0), "LOAD");
} }
// 2. 处理待执行的下料指令 // 2. 处理待执行的下料指令
...@@ -109,11 +109,11 @@ public class RobotArmCommandServiceImpl implements IRobotArmCommandService ...@@ -109,11 +109,11 @@ public class RobotArmCommandServiceImpl implements IRobotArmCommandService
robotArmCommandMapper.selectPendingUnloadingCommands(); robotArmCommandMapper.selectPendingUnloadingCommands();
if (!unloadingCommands.isEmpty()) { if (!unloadingCommands.isEmpty()) {
// boolean[] roboticArmExitConveyorData = Modbus4jUtils.getRoboticArmExitConveyorData(); boolean[] roboticArmExitConveyorData = Modbus4jUtils.getRoboticArmExitConveyorData();
// if(roboticArmExitConveyorData[1]) { if(roboticArmExitConveyorData[1]) {
log.info("开始处理下料指令: {}", unloadingCommands.get(0)); log.info("开始处理下料指令: {}", unloadingCommands.get(0));
sendCommand(unloadingCommands.get(0), "UNLOAD"); sendCommand(unloadingCommands.get(0), "UNLOAD");
// } }
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment