Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
Z
zhmes-agecal
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
耿迪迪
zhmes-agecal
Commits
451a8d10
Commit
451a8d10
authored
Nov 06, 2025
by
wanghao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1 上下料 判断 传送带 是否有数据-测试
parent
903d93b7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
12 deletions
+12
-12
RobotArmCommandServiceImpl.java
...ehong/system/service/impl/RobotArmCommandServiceImpl.java
+12
-12
No files found.
zhmes-agecal-system/src/main/java/com/zehong/system/service/impl/RobotArmCommandServiceImpl.java
View file @
451a8d10
...
@@ -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"
);
//
}
}
}
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment