| | |
| | | } |
| | | } |
| | | } |
| | | //外形检测 |
| | | // ArrayList<Integer> staNoErrs = staNosErrList; |
| | | // int staNoErrsSize = staNoErrs.size(); |
| | | // OperateResultExOne<byte[]> resultErr = siemensS7Net.Read("DB101.1608", (short) (staNoErrsSize * 8)); |
| | | // if (resultErr.IsSuccess) { |
| | | // for (int i = 0; i < 2; i++) { |
| | | // Integer siteId = staNoErrs.get(i); // 站点编号 |
| | | // boolean[] status = siemensS7Net.getByteTransform().TransBool(resultErr.Content, i * 4 + 2, 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]); |
| | | // } |
| | | // } |
| | | |
| | | //plc故障 |
| | | // OperateResultExOne<byte[]> resultErr2 = siemensS7Net.Read("DB101.1728", (short) (staNoSize * 4)); |
| | | // if (resultErr2.IsSuccess) { |
| | | // for (int i = 0; i < staNoSize; i++) { |
| | | // Integer siteId = staNos.get(i); // 站点编号 |
| | | // boolean[] status = siemensS7Net.getByteTransform().TransBool(resultErr2.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]); |
| | | // |
| | | // } |
| | | // } |
| | | // OperateResultExOne<byte[]> resultErr3 = siemensS7Net.Read("DB13.400", (short) 3); |
| | | // if (resultErr3.IsSuccess) { |
| | | // if (staError1 == null) { |
| | | // staError1 = new StaError1(); |
| | | // } |
| | | // boolean[] status = siemensS7Net.getByteTransform().TransBool(resultErr3.Content, 0, 3); |
| | | // staError1.setEMERGENCY_Stop_Core(status[0]); |
| | | // staError1.setEMERGENCY_STOP1(status[1]); |
| | | // staError1.setEMERGENCY_STOP2(status[2]); |
| | | // staError1.setEMERGENCY_STOP3(status[3]); |
| | | // staError1.setEMERGENCY_STOP4(status[4]); |
| | | // |
| | | // staError1.setDoor_EMERGENCY_STOP1(status[5]); |
| | | // staError1.setDoor_EMERGENCY_STOP2(status[6]); |
| | | // staError1.setDoor_EMERGENCY_STOP3(status[7]); |
| | | // staError1.setDoor_EMERGENCY_STOP4(status[8]); |
| | | // staError1.setDoor_EMERGENCY_STOP5(status[9]); |
| | | // staError1.setDoor_EMERGENCY_STOP6(status[10]); |
| | | // |
| | | // staError1.setDoor_Open_Err1(status[11]); |
| | | // staError1.setDoor_Open_Err1(status[12]); |
| | | // staError1.setDoor_Open_Err1(status[13]); |
| | | // staError1.setDoor_Open_Err1(status[14]); |
| | | // staError1.setDoor_Open_Err1(status[15]); |
| | | // staError1.setDoor_Open_Err1(status[16]); |
| | | // |
| | | // } |
| | | |
| | | |
| | | if (result.IsSuccess) { |
| | | |