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 | 26 ++++++++++++++++++++++++++ 1 files changed, 26 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 d803b8b..f4c283d 100644 --- a/src/main/java/com/zy/core/thread/SiemensDevpThread.java +++ b/src/main/java/com/zy/core/thread/SiemensDevpThread.java @@ -346,8 +346,30 @@ 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鍙拌溅浣嶇疆 @@ -466,11 +488,15 @@ //鏇存柊鎸囦护鐘舵�� commandInfo.setCommandStatus(CommandStatusType.COMPLETE.id);//杈撻�佺嚎鐩存帴瀹屾垚鐘舵�� + commandInfo.setExecuteTime(now); commandInfo.setCompleteTime(now); commandInfoService.updateById(commandInfo); //鏇存柊鎸囦护鏃ュ織 commandInfoLog.setDeviceLog("鎸囦护涓嬪彂鎴愬姛"); + commandInfoLog.setCommandStatus(CommandStatusType.COMPLETE.id);//杈撻�佺嚎鐩存帴瀹屾垚鐘舵�� + commandInfoLog.setExecuteTime(now); + commandInfoLog.setCompleteTime(now); commandInfoLogService.insert(commandInfoLog); //鏇存柊浠诲姟姝ュ簭 -- Gitblit v1.9.1