| | |
| | | command.setCommand((short)0); |
| | | write(command); |
| | | break; |
| | | // 回原点 避让 |
| | | case 9: |
| | | RgvCommand commandAvoidanceXY = (RgvCommand) task.getData(); |
| | | if (null == commandAvoidanceXY) { |
| | | commandAvoidanceXY = new RgvCommand(); |
| | | } |
| | | commandAvoidanceXY.setRgvNo(slave.getId()); // RGV编号 |
| | | commandAvoidanceXY.setTaskNo1((short) 9999); // 工作号 |
| | | commandAvoidanceXY.setAckFinish1((short) 1); // 任务完成确认位 |
| | | commandAvoidanceXY.setTaskMode1(RgvTaskModeType.GO_ORIGIN); // 任务模式 |
| | | commandAvoidanceXY.setSourceStaNo1((short)0); // 源站 |
| | | commandAvoidanceXY.setDestinationStaNo1((short)0); // 目标站 |
| | | commandAvoidanceXY.setTaskNo2((short) 0); // 工作号 |
| | | commandAvoidanceXY.setAckFinish2((short) 1); // 任务完成确认位 |
| | | commandAvoidanceXY.setTaskMode2(RgvTaskModeType.GO_ORIGIN); // 任务模式 |
| | | commandAvoidanceXY.setSourceStaNo2((short)0); // 源站 |
| | | commandAvoidanceXY.setDestinationStaNo2((short)0); // 目标站 |
| | | commandAvoidanceXY.setCommand((short)0); |
| | | write(commandAvoidanceXY); |
| | | break; |
| | | default: |
| | | break; |
| | | } |
| | |
| | | */ |
| | | private void readStatus(){ |
| | | try { |
| | | OperateResultExOne<byte[]> result = siemensNet.Read("DB101.0", (short) 34); |
| | | OperateResultExOne<byte[]> result = siemensNet.Read("DB1.0", (short) 34); |
| | | if (result.IsSuccess) { |
| | | if (null == rgvProtocol) { |
| | | rgvProtocol = new RgvProtocol(); |