| | |
| | | return; |
| | | } |
| | | ArrayList<Integer> staNos = getStaNo(); |
| | | int address = staNos.indexOf(staProtocol.getSiteId()) * 4; |
| | | int address = staNos.indexOf(staProtocol.getSiteId()) * 6; |
| | | |
| | | OperateResult write; |
| | | OperateResult write1; |
| | | //任务下发次数 |
| | | int writeCount = 0; |
| | | do { |
| | | write = siemensS7Net.Write("DB100." + address, staProtocol.getWorkNo().shortValue()); // 工作号 |
| | | write = siemensS7Net.Write("DB100." + address, staProtocol.getWorkNo()); // 工作号 |
| | | write1 = siemensS7Net.Write("DB100." + (address + 2), staProtocol.getStaNo()); // 目标站 |
| | | Thread.sleep(200); |
| | | if(write.IsSuccess && write1.IsSuccess){ |