From 0ed06e0a0520d9493732910d9545b1adc1a6afb9 Mon Sep 17 00:00:00 2001 From: zjj <3272660260@qq.com> Date: 星期一, 04 十二月 2023 09:35:56 +0800 Subject: [PATCH] #堆垛机plc异常显示 --- src/main/java/com/zy/core/thread/SiemensDevpThread.java | 22 ++++++++++++++++++++++ 1 files changed, 22 insertions(+), 0 deletions(-) diff --git a/src/main/java/com/zy/core/thread/SiemensDevpThread.java b/src/main/java/com/zy/core/thread/SiemensDevpThread.java index 619b4d1..f4c283d 100644 --- a/src/main/java/com/zy/core/thread/SiemensDevpThread.java +++ b/src/main/java/com/zy/core/thread/SiemensDevpThread.java @@ -346,10 +346,32 @@ staProtocol.setRightErr(status[4]); staProtocol.setWeightErr(status[5]); staProtocol.setBarcodeErr(status[6]); + } } + OperateResultExOne<byte[]> resultErr = siemensS7Net.Read("DB13.2", (short) 100); + if (resultErr.IsSuccess) { + for (int i = 0; i < staNoSize; i++) { + Integer siteId = staNos.get(i); // 绔欑偣缂栧彿 + boolean[] status = siemensS7Net.getByteTransform().TransBool(resultErr.Content, i*4, 1); + StaProtocol staProtocol = station.get(siteId); + staProtocol.setBreakerErr(status[0]); + staProtocol.setInfraredErr(status[1]); + staProtocol.setOutTimeErr(status[2]); + staProtocol.setSeizeSeatErr(status[3]); + staProtocol.setWrkYgoodsN(status[4]); + staProtocol.setInverterErr(status[5]); + staProtocol.setContactErr(status[6]); + staProtocol.setUpcontactErr(status[7]); + + } + } + + + + // //RGV鍙拌溅浣嶇疆 // Thread.sleep(200); // OperateResultExOne<byte[]> result3 = siemensS7Net.Read("DB100.0",(short)4); -- Gitblit v1.9.1