From 7f16849cfa9362d32eaaf323c71350351f13b689 Mon Sep 17 00:00:00 2001
From: huang <1532065656@qq.com>
Date: 星期四, 11 九月 2025 08:51:15 +0800
Subject: [PATCH] 添加看板库位库存接口
---
JiuMuMesParent/moduleService/DeviceInteractionModule/src/main/java/com/mes/plcTaskThread/MachineEdging.java | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/JiuMuMesParent/moduleService/DeviceInteractionModule/src/main/java/com/mes/plcTaskThread/MachineEdging.java b/JiuMuMesParent/moduleService/DeviceInteractionModule/src/main/java/com/mes/plcTaskThread/MachineEdging.java
index 68f44f0..b2e43ba 100644
--- a/JiuMuMesParent/moduleService/DeviceInteractionModule/src/main/java/com/mes/plcTaskThread/MachineEdging.java
+++ b/JiuMuMesParent/moduleService/DeviceInteractionModule/src/main/java/com/mes/plcTaskThread/MachineEdging.java
@@ -48,7 +48,7 @@
this.lineConfigurationService = lineConfigurationService;
}
- public void plcStart() {
+ public void plcStart() throws Exception{
Machine machine=machineMapper.selectById(thisMachine.getId());
ModbusTcp modbusTcp1 =new ModbusTcp(machine.getIp(),machine.getPort(),machine.getFileName());
try {
@@ -325,12 +325,14 @@
}
@Override
public void run() {
- while (this != null) {
+ while (true) {
try {
Thread.sleep(1000);
plcStart();
} catch (InterruptedException e) {
e.printStackTrace();
+ } catch (Exception e) {
+ throw new RuntimeException(e);
}
}
}
--
Gitblit v1.8.0