| | |
| | | OperateResult result = null; |
| | | int idx = 0; |
| | | do { |
| | | OperateResultExOne<byte[]> resultRead = siemensNet.Read("DB100.0", (short) 4); |
| | | OperateResultExOne<byte[]> resultRead = siemensNet.Read("DB100.0", (short) 20); |
| | | if (resultRead.IsSuccess) { |
| | | if (command.getAckFinish() == 0) { |
| | | short taskNo = siemensNet.getByteTransform().TransInt16(resultRead.Content, 2); |
| | | if(taskNo == 0) { |
| | | short taskMode = siemensNet.getByteTransform().TransInt16(resultRead.Content, 4); |
| | | short sourcePosX = siemensNet.getByteTransform().TransInt16(resultRead.Content, 6); |
| | | short sourcePosY = siemensNet.getByteTransform().TransInt16(resultRead.Content, 8); |
| | | short sourcePosZ = siemensNet.getByteTransform().TransInt16(resultRead.Content, 10); |
| | | 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) { |
| | | result = siemensNet.Write("DB100.0", array); |
| | | }else { |
| | | break; |