| | |
| | | } |
| | | |
| | | command.setCrnNo(slave.getId()); |
| | | short[] array = new short[12]; |
| | | short[] array = new short[10]; |
| | | if (Cools.isEmpty(command.getAckFinish())) { |
| | | array[0] = 5; |
| | | } else { |
| | |
| | | // }else { |
| | | array[4] = command.getSourcePosX(); |
| | | // } |
| | | array[5] = command.getDestinationPosY(); |
| | | array[5] = command.getSourcePosY(); |
| | | |
| | | array[6] = command.getDestinationPosZ(); |
| | | // if (rowOne.contains(command.getDestinationPosX())){ |
| | |
| | | // } |
| | | array[8] = command.getDestinationPosY(); |
| | | array[9] = command.getCommand(); |
| | | if (!Cools.isEmpty(command.getAuto())){ |
| | | array[10] = command.getAuto(); |
| | | } |
| | | |
| | | |
| | | |
| | | // 作业信息 |
| | |
| | | log.error("堆垛机写入命令为空"); |
| | | return false; |
| | | } |
| | | OperateResult result = new OperateResult(); |
| | | short[] array = new short[1]; |
| | | array[0] = command.getAuto(); |
| | | OperateResult result = siemensNet.Write("DB100.20", array); |
| | | if(command.getAuto() !=0){ |
| | | array[0] = command.getAuto(); |
| | | result = siemensNet.Write("DB103.0", array); |
| | | }else if (command.getOnlineWrk1() != 0){ |
| | | array[0] = command.getOnlineWrk1(); |
| | | result = siemensNet.Write("DB103.2", array); |
| | | }else if (command.getOnlineWrk2() !=0){ |
| | | array[0] = command.getOnlineWrk2(); |
| | | result = siemensNet.Write("DB103.4", array); |
| | | }else if (command.getOnlineWrk3() != 0){ |
| | | array[0] = command.getOnlineWrk3(); |
| | | result = siemensNet.Write("DB103.6", array); |
| | | }else if (command.getOnlineWrk4() != 0){ |
| | | array[0] = command.getOnlineWrk4(); |
| | | result = siemensNet.Write("DB103.8", array); |
| | | } |
| | | |
| | | |
| | | |
| | | //更新命令日志 |
| | | CommandInfoLogService commandInfoLogService = SpringUtils.getBean(CommandInfoLogService.class); |