| | |
| | | } |
| | | |
| | | Integer commandTaskNo = command.getTaskNo(); |
| | | Integer commandTaskMode = command.getTaskMode(); |
| | | if (commandTaskMode.equals(CrnTaskModeType.RESET.id)) { |
| | | if (command.getTaskMode().equals(CrnTaskModeType.RESET.id)) { |
| | | commandTaskNo = 0; |
| | | commandTaskMode = 0; |
| | | } |
| | | |
| | | short[] array = new short[9]; |
| | | array[0] = command.getAckFinish().shortValue(); |
| | | array[1] = commandTaskNo.shortValue(); |
| | | array[2] = commandTaskMode.shortValue(); |
| | | array[2] = command.getTaskMode().shortValue(); |
| | | array[3] = command.getSourcePosX().shortValue(); |
| | | array[4] = command.getSourcePosY().shortValue(); |
| | | array[5] = command.getSourcePosZ().shortValue(); |
| | |
| | | short destinationPosX = siemensNet.getByteTransform().TransInt16(resultRead.Content, 12); |
| | | short destinationPosY = siemensNet.getByteTransform().TransInt16(resultRead.Content, 14); |
| | | short destinationPosZ = siemensNet.getByteTransform().TransInt16(resultRead.Content, 16); |
| | | if (taskNo == 0 || taskMode == 0 || sourcePosX == 0 || sourcePosY == 0 || sourcePosZ == 0 || destinationPosX == 0 || destinationPosY == 0 || destinationPosZ == 0) { |
| | | if (taskNo != command.getTaskNo().shortValue() |
| | | || taskMode == command.getTaskMode().shortValue() |
| | | || sourcePosX == command.getSourcePosX().shortValue() |
| | | || sourcePosY == command.getSourcePosY().shortValue() |
| | | || sourcePosZ == command.getSourcePosZ().shortValue() |
| | | || destinationPosX == command.getDestinationPosX().shortValue() |
| | | || destinationPosY == command.getDestinationPosY().shortValue() |
| | | || destinationPosZ == command.getDestinationPosZ().shortValue()) { |
| | | result = siemensNet.Write("DB100.0", array); |
| | | } else { |
| | | commandDataResult = true; |