| | |
| | | |
| | | |
| | | //外形检测 三期 |
| | | OperateResultExOne<byte[]> resultErrsanqi = siemensS7Net.Read("DB101.160", (short) 8); |
| | | OperateResultExOne<byte[]> resultErrsanqi = siemensS7Net.Read("DB101.160", (short) (staNoSize * 8)); |
| | | if (resultErrsanqi.IsSuccess) { |
| | | boolean[] status = siemensS7Net.getByteTransform().TransBool(resultErrsanqi.Content, 0, 1); |
| | | StaProtocol staProtocol = station.get(311); |
| | | staProtocol.setFrontErr(status[0]); |
| | | staProtocol.setBackErr(status[1]); |
| | | staProtocol.setHighErr(status[2]); |
| | | staProtocol.setLeftErr(status[3]); |
| | | staProtocol.setRightErr(status[4]); |
| | | staProtocol.setWeightErr(status[5]); |
| | | staProtocol.setBarcodeErr(status[6]); |
| | | for (int i = 0; i < staNoSize; i++) { |
| | | Integer siteId = staNos.get(i); // 站点编号 |
| | | boolean[] status = siemensS7Net.getByteTransform().TransBool(resultErrsanqi.Content, i * 4, 1); |
| | | StaProtocol staProtocol = station.get(siteId); |
| | | staProtocol.setFrontErr(status[0]); |
| | | staProtocol.setBackErr(status[1]); |
| | | staProtocol.setHighErr(status[2]); |
| | | staProtocol.setLeftErr(status[3]); |
| | | staProtocol.setRightErr(status[4]); |
| | | staProtocol.setWeightErr(status[5]); |
| | | staProtocol.setBarcodeErr(status[6]); |
| | | } |
| | | } |
| | | |
| | | |