| | |
| | | } |
| | | } |
| | | |
| | | |
| | | // 外形检测 - 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())); |