This commit is contained in:
1009473166@qq.com
2026-02-04 15:27:22 +08:00
parent 5fe90b8bb4
commit 83dc4efd72
16 changed files with 430 additions and 218 deletions

View File

@@ -71,8 +71,13 @@ public class ScheduleThread {
//读取信息初始化
plcReadInit();
//调度初始化
scheduleInit();
log.info("调度服务执行成功");
// startAllThread();
// startAllThread2();
}
/**
@@ -114,8 +119,8 @@ public class ScheduleThread {
ssjList.put(deviceSsj.getDeviceCode(), deviceSsj);
}
//plc输送机读取线程
PlcSsjRead plcSsjRead = new PlcSsjRead(ssjList, new PlcConnectInfo("127.0.0.1", 102));
// plc输送机读取线程
PlcSsjRead plcSsjRead = new PlcSsjRead(ssjList, new PlcConnectInfo("192.168.200.41", 102));
Thread plcSsjReadThread = new Thread(plcSsjRead);
plcSsjReadCustomThread = new CustomThread<PlcSsjRead>(plcSsjReadThread, plcSsjRead);
@@ -151,7 +156,7 @@ public class ScheduleThread {
for (DeviceTsj deviceTsj : deviceTsjs) {
tsjList.put(deviceTsj.getId().toString(), deviceTsj);
}
PlcTsjRead plcTsjRead = new PlcTsjRead(tsjList,new PlcConnectInfo("127.0.0.1", 102));
PlcTsjRead plcTsjRead = new PlcTsjRead(tsjList,new PlcConnectInfo("192.168.200.41", 102));
Thread plcTsjReadThread = new Thread(plcTsjRead);
plcTsjReadCustomThread = new CustomThread<>(plcTsjReadThread, plcTsjRead);
@@ -161,7 +166,7 @@ public class ScheduleThread {
for (DeviceCdz deviceCdz : deviceCdzs) {
cdzList.put(deviceCdz.getId().toString(), deviceCdz);
}
PlcCdzRead plcCdzRead = new PlcCdzRead(cdzList,new PlcConnectInfo("127.0.0.1", 102));
PlcCdzRead plcCdzRead = new PlcCdzRead(cdzList,new PlcConnectInfo("192.168.200.41", 102));
Thread plcCdzReadThread = new Thread(plcCdzRead);
plcCdzReadCustomThread = new CustomThread<>(plcCdzReadThread, plcCdzRead);
@@ -187,10 +192,10 @@ public class ScheduleThread {
*/
public void startAllThread2() {
monitoringCustomThread.thread.start();
//ssjThreadCustomThread.thread.start();
//tsjThreadCustomThread.thread.start();
//sRgvThreadCustomThread.thread.start();
//cdzThreadCustomThread.thread.start();
ssjThreadCustomThread.thread.start();
tsjThreadCustomThread.thread.start();
sRgvThreadCustomThread.thread.start();
cdzThreadCustomThread.thread.start();
isRun2 = true;
}