| | |
| | | News.error("堆垛机写入命令为空"); |
| | | return false; |
| | | } |
| | | // siemensNet.Write("DB100.18", (short) 0); |
| | | // convertRow(command); |
| | | command.setCrnNo(slave.getId()); |
| | | short[] array = new short[10]; |
| | |
| | | array[2] = command.getTaskMode(); |
| | | if (command.getSourcePosX()==4){ |
| | | array[3] = 1; |
| | | }else { |
| | | }else if (command.getSourcePosX()==5){ |
| | | array[3] = 2; |
| | | }else { |
| | | array[3] = command.getSourcePosX(); |
| | | } |
| | | |
| | | |
| | |
| | | array[5] = command.getSourcePosZ(); |
| | | if (command.getDestinationPosX()==4){ |
| | | array[6] = 1; |
| | | }else { |
| | | }else if (command.getDestinationPosX()==5){ |
| | | array[6] = 2; |
| | | }else { |
| | | array[6] = command.getDestinationPosX(); |
| | | } |
| | | |
| | | array[7] = command.getDestinationPosY(); |
| | |
| | | OperateResult result = siemensNet.Write("DB100.0", array); |
| | | |
| | | if (command.getAckFinish() == 0) { |
| | | if (result.IsSuccess) { |
| | | short commandFinish = 1; |
| | | Thread.sleep(300); |
| | | result = siemensNet.Write("DB100.18", commandFinish); |
| | | } |
| | | } |
| | | |
| | | try { |