Hello. How can i know when an instruction is finished. I need to read the serial port when my robot has finished to execute an instruction to see what is his answer, and i only can to read at the end of the instruction.
There is a property node for "Bytes at Port" on the Serial palette. Provided the robot's answer is always the same number of bytes, you can just keep checking till you have the number of bytes that you expect, then read the port.
Do you have a list of all possible responses? If the first character is unique for each possible response, you could read the first bit and then determine how many more bits you need to get the entire message.
If not the first character, the first two? Three? ect? Obviously, for a sufficiently large range of responses, this can become unmanageable. I am hoping your robot is dumb enough to only have a couple.