现场调试修改

This commit is contained in:
lsymicc
2026-09-08 22:23:58 +08:00
parent f944d7fef5
commit 7a7532f8bd
38 changed files with 1099 additions and 599 deletions

View File

@@ -39,8 +39,9 @@ public class PlcDdj1Read extends Thread {
try {
if (IsConnect()) {
readPlcDdj(msgDdj);
Thread.sleep(800);
Thread.sleep(1000);
} else {
Thread.sleep(2000);
reConnect();
}
} catch (InterruptedException e) {
@@ -54,7 +55,7 @@ public class PlcDdj1Read extends Thread {
}
private void readPlcDdj(MsgDdj msgDdj) {
OperateResultExOne<byte[]> read2 = readWriteNet.Read(msgDdj.getPlcDbReadAddress(), Convert.toShort("38"));
OperateResultExOne<byte[]> read2 = readWriteNet.Read(msgDdj.getPlcDbReadAddress(), Convert.toShort("32"));
String ddsx = "0";
if (read2.IsSuccess) {
ddsx = SoftBasic.ByteToHexString(read2.Content);
@@ -71,6 +72,7 @@ public class PlcDdj1Read extends Thread {
msgDdj.setMbch(ParseUtil.optInt(22, ddsx));
msgDdj.setYxxf(ParseUtil.optInt(24, ddsx));
msgDdj.setXtxh(ParseUtil.optInt(26, ddsx));
msgDdj.setHeight(ParseUtil.optInt(30, ddsx));
msgDdj.setCurrentRow(ParseUtil.optInt(12, ddsx));
msgDdj.setCurrentColumn(ParseUtil.optInt(14, ddsx));

View File

@@ -39,8 +39,9 @@ public class PlcDdj2Read extends Thread {
try {
if (IsConnect()) {
readPlcDdj(msgDdj);
Thread.sleep(800);
Thread.sleep(1000);
} else {
Thread.sleep(2000);
reConnect();
}
} catch (InterruptedException e) {
@@ -54,7 +55,7 @@ public class PlcDdj2Read extends Thread {
}
private void readPlcDdj(MsgDdj msgDdj) {
OperateResultExOne<byte[]> read2 = readWriteNet.Read(msgDdj.getPlcDbReadAddress(), Convert.toShort("38"));
OperateResultExOne<byte[]> read2 = readWriteNet.Read(msgDdj.getPlcDbReadAddress(), Convert.toShort("34"));
String ddsx = "0";
if (read2.IsSuccess) {
ddsx = SoftBasic.ByteToHexString(read2.Content);
@@ -71,10 +72,12 @@ public class PlcDdj2Read extends Thread {
msgDdj.setMbch(ParseUtil.optInt(22, ddsx));
msgDdj.setYxxf(ParseUtil.optInt(24, ddsx));
msgDdj.setXtxh(ParseUtil.optInt(26, ddsx));
msgDdj.setDqxd(ParseUtil.optInt(30, ddsx));
msgDdj.setHeight(ParseUtil.optInt(32, ddsx));
msgDdj.setCurrentRow(ParseUtil.optInt(26, ddsx));
msgDdj.setCurrentColumn(ParseUtil.optInt(26, ddsx));
msgDdj.setCurrentFloor(ParseUtil.optInt(26, ddsx));
msgDdj.setCurrentRow(ParseUtil.optInt(12, ddsx));
msgDdj.setCurrentColumn(ParseUtil.optInt(14, ddsx));
msgDdj.setCurrentFloor(ParseUtil.optInt(16, ddsx));
}
}