| | |
| | | } |
| | | } |
| | | |
| | | //报警信息 |
| | | Thread.sleep(200); |
| | | OperateResultExOne<byte[]> result3 = null; |
| | | result3 = siemensS7Net.Read("DB101.0", (short) (getErrorStaNo().size() * 8)); |
| | | result3 = siemensS7Net.Read("DB101.800.0", (short) (getErrorStaNo().size() * 4)); |
| | | if (result3.IsSuccess) { |
| | | for (int i = 0; i < getErrorStaNo().size(); i++) { |
| | | Integer siteId = getErrorStaNo().get(i); // 站点编号 |
| | | StaProtocol staProtocol = station.get(siteId); |
| | | staProtocol.setLocType1(siemensS7Net.getByteTransform().TransInt16(result.Content, i*8 + 4 )); // 库位高度 |
| | | boolean[] status = siemensS7Net.getByteTransform().TransBool(result3.Content, i*4, 2); |
| | | staProtocol.setF(status[0]); // 自动 |
| | | staProtocol.setLoading(status[1]); // 有物 |
| | | staProtocol.setInEnable(status[2]); // 可入 |
| | | staProtocol.setOutEnable(status[3]);// 可出 |
| | | staProtocol.setEmptyMk(status[4]); // 空板信号 |
| | | staProtocol.setFullPlt(status[5]); // 满托盘 |
| | | staProtocol.setHigh(status[6]); // 高库位 |
| | | staProtocol.setLow(status[7]); // 低库位 |
| | | staProtocol.setEmptyOutPalletRequire(status[8]); // 空托盘可出需求信号 |
| | | staProtocol.setEmptyInPalletRequire(status[9]); // 空托盘可入需求信号 |
| | | |
| | | if (!staProtocol.isPakMk() && !staProtocol.isLoading()) { |
| | | staProtocol.setPakMk(true); |
| | | } |
| | | staProtocol.setLocType1(siemensS7Net.getByteTransform().TransInt16(result.Content, i*4)); // 库位高度 |
| | | boolean[] status = siemensS7Net.getByteTransform().TransBool(result3.Content, i*4+2, 2); |
| | | 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]); |
| | | } |
| | | } |
| | | |