|  |  | 
 |  |  |             } | 
 |  |  |         } | 
 |  |  |         Thread.sleep(200); | 
 |  |  |         OperateResultExOne<byte[]> result0 = siemensS7Net.Read("DB101.0", (short) (staNoSize*2)); | 
 |  |  |         if (result0.IsSuccess) { | 
 |  |  |             for (int i = 0; i < staNoSize; i++) { | 
 |  |  |                 Integer siteId = staNos.get(i); // 站点编号 | 
 |  |  |                 StaProtocol staProtocol = station.get(siteId); | 
 |  |  |                 if (null == staProtocol) { | 
 |  |  |                     staProtocol = new StaProtocol(); | 
 |  |  |                     staProtocol.setSiteId(siteId); | 
 |  |  |                     station.put(siteId, staProtocol); | 
 |  |  |                 } | 
 |  |  |                 staProtocol.setStaNo(siemensS7Net.getByteTransform().TransInt16(result0.Content, i*2));   // 目标站 | 
 |  |  |             } | 
 |  |  |         } | 
 |  |  |         Thread.sleep(200); | 
 |  |  | //        OperateResultExOne<byte[]> result0 = siemensS7Net.Read("DB101.0", (short) (staNoSize*2)); | 
 |  |  | //        if (result0.IsSuccess) { | 
 |  |  | //            for (int i = 0; i < staNoSize; i++) { | 
 |  |  | //                Integer siteId = staNos.get(i); // 站点编号 | 
 |  |  | //                StaProtocol staProtocol = station.get(siteId); | 
 |  |  | //                if (null == staProtocol) { | 
 |  |  | //                    staProtocol = new StaProtocol(); | 
 |  |  | //                    staProtocol.setSiteId(siteId); | 
 |  |  | //                    station.put(siteId, staProtocol); | 
 |  |  | //                } | 
 |  |  | //                staProtocol.setStaNo(siemensS7Net.getByteTransform().TransInt16(result0.Content, i*2));   // 目标站 | 
 |  |  | //            } | 
 |  |  | //        } | 
 |  |  | //        Thread.sleep(200); | 
 |  |  |         OperateResultExOne<byte[]> result1 = null; | 
 |  |  |         result1 = siemensS7Net.Read("DB101.1", (short) (staNoSize * 2)); | 
 |  |  |         result1 = siemensS7Net.Read("DB100.100", (short) (staNoSize * 2)); | 
 |  |  |         if (result1.IsSuccess) { | 
 |  |  |             for (int i = 0; i < staNoSize; i++) { | 
 |  |  |                 Integer siteId = staNos.get(i); // 站点编号 | 
 |  |  | 
 |  |  |     // 更新入出库模式 | 
 |  |  |     private void updateIoMode() throws InterruptedException { | 
 |  |  |         if (slave.getId() == 1 && this.ioModeOf1F1 != IoModeType.NONE) { | 
 |  |  |             if (!siemensS7Net.Write("DB100.300", this.ioModeOf1F1.id).IsSuccess) { | 
 |  |  |             if (!siemensS7Net.Write("DB100.120", this.ioModeOf1F1.id).IsSuccess) { | 
 |  |  |                 OutputQueue.DEVP.offer(MessageFormat.format("【{0}】写入输送线1F1入出库模式失败。输送线plc编号={1}", slave.getId())); | 
 |  |  |                 log.error("写入输送线1F1入出库模式失败。输送线plc编号={}", slave.getId()); | 
 |  |  |             } | 
 |  |  |         } | 
 |  |  |         if (slave.getId() == 1 && this.ioModeOf1F2 != IoModeType.NONE) { | 
 |  |  |             if (!siemensS7Net.Write("DB100.302", this.ioModeOf1F2.id).IsSuccess) { | 
 |  |  |             if (!siemensS7Net.Write("DB100.122", this.ioModeOf1F2.id).IsSuccess) { | 
 |  |  |                 OutputQueue.DEVP.offer(MessageFormat.format("【{0}】写入输送线1F2入出库模式失败。输送线plc编号={1}", slave.getId())); | 
 |  |  |                 log.error("写入输送线1F2入出库模式失败。输送线plc编号={}", slave.getId()); | 
 |  |  |             } |