| | |
| | | } |
| | | |
| | | // 读侧面故障反馈 |
| | | OperateResultExOne<byte[]> resultErrCM = siemensS7Net.Read("DB101.2540.0", (short) (12 * 4)); |
| | | OperateResultExOne<byte[]> resultErrCM = siemensS7Net.Read("DB101.2540.0", (short) (12 * 2)); |
| | | if (resultErrCM.IsSuccess) { |
| | | for (int i = 16; i < staNoSize; i++) { |
| | | Integer siteId = staNos.get(i); // 站点编号 |
| | | boolean[] status = siemensS7Net.getByteTransform().TransBool(resultErrCM.Content, (i - 16) * 4, 1); |
| | | boolean[] status = siemensS7Net.getByteTransform().TransBool(resultErrCM.Content, (i - 16) * 2, 1); |
| | | StaProtocol staProtocol = station.get(siteId); |
| | | staProtocol.setBreakerErr(status[0]); |
| | | staProtocol.setInfraredErr(status[1]); |
| | |
| | | |
| | | if (slave.getId() == 1 && this.ioModeOf2F1 != null) { |
| | | if (!siemensS7Net.Write("DB105.10", this.ioModeOf2F1.id).IsSuccess) { |
| | | OutputQueue.DEVP.offer(MessageFormat.format("【{0}】写入输送线2F2入出库模式失败。输送线plc编号={1}", slave.getId())); |
| | | OutputQueue.DEVP.offer(MessageFormat.format("【{0}】写入输送线2F1入出库模式失败。输送线plc编号={1}", slave.getId())); |
| | | log.error("写入输送线2F1入出库模式失败。输送线plc编号={}", slave.getId()); |
| | | } |
| | | } |
| | | if (slave.getId() == 1 && this.ioModeOf2F2 != null) { |
| | | if (!siemensS7Net.Write("DB105.12", this.ioModeOf2F2.id).IsSuccess) { |
| | | OutputQueue.DEVP.offer(MessageFormat.format("【{0}】写入输送线3F1入出库模式失败。输送线plc编号={1}", slave.getId())); |
| | | OutputQueue.DEVP.offer(MessageFormat.format("【{0}】写入输送线2F2入出库模式失败。输送线plc编号={1}", slave.getId())); |
| | | log.error("写入输送线2F2入出库模式失败。输送线plc编号={}", slave.getId()); |
| | | } |
| | | } |
| | | if (slave.getId() == 1 && this.ioModeOf2F3 != null) { |
| | | if (!siemensS7Net.Write("DB105.14", this.ioModeOf2F3.id).IsSuccess) { |
| | | OutputQueue.DEVP.offer(MessageFormat.format("【{0}】写入输送线3F2入出库模式失败。输送线plc编号={1}", slave.getId())); |
| | | OutputQueue.DEVP.offer(MessageFormat.format("【{0}】写入输送线2F3入出库模式失败。输送线plc编号={1}", slave.getId())); |
| | | log.error("写入输送线2F3入出库模式失败。输送线plc编号={}", slave.getId()); |
| | | } |
| | | } |