From 04855df566ae02edda46ccb49b3dceabc39cf0d5 Mon Sep 17 00:00:00 2001 From: zhangchao <zc857179121@qq.com> Date: 星期五, 30 八月 2024 00:03:40 +0800 Subject: [PATCH] 1 --- src/main/java/com/zy/core/thread/SiemensDevpThread.java | 39 +++++++++++++++++++++++++++++++++++++++ 1 files changed, 39 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 9b5e210..95b8243 100644 --- a/src/main/java/com/zy/core/thread/SiemensDevpThread.java +++ b/src/main/java/com/zy/core/thread/SiemensDevpThread.java @@ -288,6 +288,45 @@ } } + + // 澶栧舰妫�娴� - 1妤� + Thread.sleep(50); + OperateResultExOne<byte[]> result4 = siemensS7Net.Read("DB101.1", (short)48); + if (result4.IsSuccess) { + StaProtocol staProtocol100 = station.get(100); + StaProtocol staProtocol110 = station.get(110); + for (int i=0 ;i<6;i++){ + boolean[] status = siemensS7Net.getByteTransform().TransBool(result4.Content, i, 1); + if (i==0){ + }else if (i==1){ + staProtocol100.setFrontErr(status[3]);// 鍓嶈秴闄� + staProtocol100.setBackErr(status[4]);// 鍚庤秴闄� + staProtocol100.setHighErr(status[5]); // 楂樿秴闄� + staProtocol100.setLeftErr(status[6]);// 宸﹁秴闄� + }else if (i==2){ + staProtocol100.setRightErr(status[0]);// 鍙宠秴闄� + + staProtocol110.setFrontErr(status[1]); + staProtocol110.setBackErr(status[2]); + staProtocol110.setHighErr(status[3]); + staProtocol110.setLeftErr(status[4]); + staProtocol110.setRightErr(status[5]); + }else if (i==3){ + }else if (i==4){ + staProtocol100.setBarcodeErr(status[2]); + staProtocol110.setBarcodeErr(status[3]); + }else if (i==5){ + staProtocol100.setWeightErr(status[0]); + staProtocol110.setWeightErr(status[1]); + staProtocol100.setBarcodeErr(status[2]); + staProtocol110.setBarcodeErr(status[3]); + } + + } + + } + + if (result.IsSuccess && result1.IsSuccess) { OutputQueue.DEVP.offer(MessageFormat.format("銆恵0}銆慬id:{1}] <<<<< 瀹炴椂鏁版嵁鏇存柊鎴愬姛",DateUtils.convert(new Date()), slave.getId())); -- Gitblit v1.9.1