| | |
| | | * 读取状态 ====> 整块plc |
| | | */ |
| | | private void readsanqi() throws InterruptedException { |
| | | ArrayList<Integer> staNos = getStaNo(); |
| | | int staNoSize = staNos.size(); |
| | | ArrayList<Integer> staNos = staNos3; |
| | | int staNoSize = staNos3.size(); |
| | | |
| | | // |
| | | OperateResultExOne<byte[]> resultsanqi = siemensS7Net.Read("DB101.120", (short) (staNoSize * 8)); |
| | |
| | | OperateResultExOne<byte[]> resultErrsanqi = siemensS7Net.Read("DB101.160", (short) 8); |
| | | if (resultErrsanqi.IsSuccess) { |
| | | boolean[] status = siemensS7Net.getByteTransform().TransBool(resultErrsanqi.Content, 0, 1); |
| | | StaProtocol staProtocol = station.get(304); |
| | | StaProtocol staProtocol = station.get(311); |
| | | staProtocol.setFrontErr(status[0]); |
| | | staProtocol.setBackErr(status[1]); |
| | | staProtocol.setHighErr(status[2]); |