Hi,
We are using our own serial device through a usb-Rs485 (2-wire bidirectional) converter using N-VISA serial communications vi's. Since we have commands that may return data from the device with varying lengths of data (10 bytes to 3000 bytes) we would like to know when the first characer of the reply comes in. This will tell us the reply is coming and to wait for the rest of it. If the reply does not come in, we can then issue a retry immediately. All replies start within 100 ms of the command, for example. If we can't detect the first character we have to wait a time greater then the longest anticipated reply to attempt the retry or else a collision may occur if the reply is acutally coming in.
The problem is that the serial port tends to buffer up a number of bytes coming back before they are indicated by the "# bytes on serial port" vi. There may be 14 characters, for example, in the buffer before it detects that there are any bytes available at all, even though we are only looking for one byte.
Is there a way to know the first byte has returned by some other means, dll or api or detection of rx line change or control line change? Is there another way around this issue.
Thanks for your help.
Ron Larson