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
439a952c
Commit
439a952c
authored
Sep 23, 2025
by
wanghao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1 测试 501 502 503 端口号
parent
d06703a1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
12 deletions
+14
-12
RobotArmCommandServiceImpl.java
...ehong/system/service/impl/RobotArmCommandServiceImpl.java
+13
-11
TStoreyInfoServiceImpl.java
...om/zehong/system/service/impl/TStoreyInfoServiceImpl.java
+1
-1
No files found.
zhmes-agecal-system/src/main/java/com/zehong/system/service/impl/RobotArmCommandServiceImpl.java
View file @
439a952c
...
@@ -126,20 +126,22 @@ public class RobotArmCommandServiceImpl implements IRobotArmCommandService
...
@@ -126,20 +126,22 @@ public class RobotArmCommandServiceImpl implements IRobotArmCommandService
// 如果是下料,则 先断电再去下料
// 如果是下料,则 先断电再去下料
if
(
"UNLOAD"
.
equals
(
commandType
))
{
if
(
"UNLOAD"
.
equals
(
commandType
))
{
String
trayCode
=
command
.
getTrayCode
();
String
trayCode
=
command
.
getTrayCode
();
String
[]
split
=
trayCode
.
split
(
"-"
);
if
(
StringUtils
.
isNotBlank
(
trayCode
))
{
String
[]
split
=
trayCode
.
split
(
"-"
);
TEquipmentInfo
tEquipmentInfo
=
equipmentInfoMapper
.
selectTEquipmentInfoByCode
(
split
[
0
]);
TEquipmentInfo
tEquipmentInfo
=
equipmentInfoMapper
.
selectTEquipmentInfoByCode
(
split
[
0
]);
int
layer
=
Integer
.
parseInt
(
split
[
0
]);
int
layer
=
Integer
.
parseInt
(
split
[
0
]);
try
{
try
{
ModbusMaster
master
=
Modbus4jUtils
.
getMaster
(
tEquipmentInfo
.
getfPowerOutageIp
(),
tEquipmentInfo
.
getfPowerOutagePort
());
ModbusMaster
master
=
Modbus4jUtils
.
getMaster
(
tEquipmentInfo
.
getfPowerOutageIp
(),
tEquipmentInfo
.
getfPowerOutagePort
());
Modbus4jUtils
.
writeCoil
(
master
,
1
,
layer
,
false
);
Modbus4jUtils
.
writeCoil
(
master
,
1
,
layer
,
false
);
log
.
info
(
"已发送断电指令 - 设备:{} 层:{}"
,
tEquipmentInfo
.
getfEquipmentCode
(),
layer
);
log
.
info
(
"已发送断电指令 - 设备:{} 层:{}"
,
tEquipmentInfo
.
getfEquipmentCode
(),
layer
);
master
.
destroy
();
master
.
destroy
();
}
catch
(
ModbusTransportException
|
ModbusInitException
e
)
{
}
catch
(
ModbusTransportException
|
ModbusInitException
e
)
{
log
.
info
(
"下料发送断电指令失败 - 设备:{} 层:{}"
,
tEquipmentInfo
.
getfEquipmentCode
(),
layer
);
log
.
info
(
"下料发送断电指令失败 - 设备:{} 层:{}"
,
tEquipmentInfo
.
getfEquipmentCode
(),
layer
);
throw
new
RuntimeException
(
e
);
throw
new
RuntimeException
(
e
);
}
}
}
}
}
...
...
zhmes-agecal-system/src/main/java/com/zehong/system/service/impl/TStoreyInfoServiceImpl.java
View file @
439a952c
...
@@ -339,7 +339,7 @@ public class TStoreyInfoServiceImpl implements ITStoreyInfoService
...
@@ -339,7 +339,7 @@ public class TStoreyInfoServiceImpl implements ITStoreyInfoService
registerOffset
=
Arrays
.
asList
(
55
,
56
,
57
,
58
,
59
,
60
,
61
,
62
,
63
,
64
,
65
,
66
,
67
,
68
,
69
,
70
,
71
,
72
);
registerOffset
=
Arrays
.
asList
(
55
,
56
,
57
,
58
,
59
,
60
,
61
,
62
,
63
,
64
,
65
,
66
,
67
,
68
,
69
,
70
,
71
,
72
);
}
}
ModbusResultHandler
modbusResultHandler
=
new
ModbusResultHandler
();
ModbusResultHandler
modbusResultHandler
=
new
ModbusResultHandler
();
deviceStatusReaderAndTimeSetter
.
startMultiDeviceMonitoring
(
split
[
0
],
Integer
.
parseInt
(
split
[
1
]),
registerOffset
,
modbusResultHandler
,
null
);
deviceStatusReaderAndTimeSetter
.
startMultiDeviceMonitoring
(
split
[
0
],
Integer
.
parseInt
(
split
[
1
]),
registerOffset
,
modbusResultHandler
,
ModbusResultHandler
.
createDefaultStopCondition
()
);
return
null
;
return
null
;
...
...
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