| | |
| | | return false; |
| | | } |
| | | command.setSteNo(slave.getId()); |
| | | short[] array = new short[10]; |
| | | // array[0] = command.getAckFinish(); |
| | | OperateResult result; |
| | | // 开始任务 |
| | | if (!command.getWaiting()) { |
| | | OperateResult result0 = siemensS7Net.Write("D0", command.getTaskNo()); |
| | | short[] array = new short[10]; |
| | | array[0] = command.getTaskMode(); |
| | | // array[1] = command.getTaskNo(); |
| | | // array[2] = command.getTaskMode(); |
| | | // array[3] = command.getSourcePosX(); |
| | |
| | | // array[7] = command.getDestinationPosY(); |
| | | // array[8] = command.getDestinationPosZ(); |
| | | // array[9] = command.getCommand(); |
| | | OperateResult result = siemensS7Net.Write("D0", array); |
| | | |
| | | // if (command.getAckFinish() == 0) { |
| | | // short commandFinish = 1; |
| | | // result = siemensS7Net.Write("D9", commandFinish); |
| | | // } |
| | | OperateResult result1 = siemensS7Net.Write("D0", array); |
| | | // 确认开始任务 |
| | | result = siemensS7Net.Write("D0", true); |
| | | // 任务完成 |
| | | } else { |
| | | result = siemensS7Net.Write("D0", true); |
| | | } |
| | | |
| | | try { |
| | | // 日志记录 |