| | |
| | | crnCommand.setDestinationPosY((short) cal.get(Calendar.HOUR_OF_DAY)); // 时:0~23 |
| | | crnCommand.setDestinationPosZ((short) cal.get(Calendar.MINUTE)); // 分:0~59 |
| | | crnCommand.setDestinationPosX((short) cal.get(Calendar.SECOND)); // 秒:0~59 |
| | | crnCommand.setTaskNo((short) (cal.get(Calendar.DAY_OF_WEEK) - 1)); // 星期:0(日)~6(六) |
| | | // crnCommand.setTaskNo((short) (cal.get(Calendar.DAY_OF_WEEK) - 1)); // 星期:0(日)~6(六) |
| | | crnCommand.setTaskNo((short) 0); // 星期:0(日)~6(六) |
| | | crnCommand.setTaskSend((short) 1); |
| | | crnCommand.setAckFinish((short) 0); |
| | | if (write(crnCommand)) { |
| | |
| | | melsecMcNet.ConnectClose(); |
| | | try { |
| | | Thread.sleep(1000); |
| | | } catch (InterruptedException e) { |
| | | } |
| | | } catch (InterruptedException ignore) {} |
| | | return result; |
| | | } |
| | | |
| | |
| | | } |
| | | if (command.getAckFinish() == 1) { |
| | | command.setTaskSend((short) 0); |
| | | command.setTaskNo((short) 0); |
| | | } else if (command.getAckFinish() == 0) { |
| | | command.setTaskSend((short) 1); |
| | | } |