|
|
|
@ -147,14 +147,17 @@ public class DeviceRunner implements CommandLineRunner { |
|
|
|
// - 大卷B分切信号:0x502 |
|
|
|
int cuta = 500; |
|
|
|
int cutb = 502; |
|
|
|
int cutab = 508; |
|
|
|
int bit1 = collectUtil.readHoldingRegister(ip, port, cuta); |
|
|
|
logger.info("卷A分切信号:{}", bit1); |
|
|
|
// 卷B分切信号 |
|
|
|
int bit2 = collectUtil.readHoldingRegister(ip, port, cutb); |
|
|
|
logger.info("卷B分切信号:{}", bit2); |
|
|
|
int bit3 = collectUtil.readHoldingRegister(ip, port, cutab); |
|
|
|
logger.info("大卷AB分切信号:{}", bit3); |
|
|
|
|
|
|
|
String nextRollNo = ""; |
|
|
|
|
|
|
|
if(bit3 == 1){ |
|
|
|
if (bit1 == 1) { |
|
|
|
// 获取寄存器信息 |
|
|
|
List<Integer> list = getConnectData(deviceInfo); |
|
|
|
@ -189,6 +192,7 @@ public class DeviceRunner implements CommandLineRunner { |
|
|
|
deviceGatherService.scanRollNo(deviceInfo, rollNo, nextRollNo); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
public static float bytesToFloat(byte[] bytes) { |
|
|
|
ByteBuffer buffer = ByteBuffer.wrap(bytes); |
|
|
|
|