05-08-2025 10:01 AM - edited 05-08-2025 10:14 AM
Hello,
I keep getting the error below from my serial read VI. I would like to use serial read to read data from a serial connection. I believe I am getting the error because the serial device does not send data in regular periods but based on user input from the serial device. Serial data comes to Labview at random intervals. How do I keep the serial port open so that I can read the data from the serial device and not get this error? The termination for the serial data is <ETX>. I don't believe I can use that as a termination character. I am thinking to just use the error clear VI but I was wondering if there was a better route.
Thank you!
VISA: (Hex 0xBFFF0015) Timeout expired before operation completed.
05-08-2025 10:32 AM - edited 05-08-2025 10:34 AM
I suggest you watch this video: VIWeek 2020/Proper way to communicate over serial
BTW: ETX is 0x03
05-08-2025 02:22 PM - edited 05-08-2025 02:23 PM
You can specify the termination character with the VISA Configure Serial Port VI (in your case, <ETX> is simply 0x03).
But that aside, you may want to consider this example to read serial data instead.
https://forums.ni.com/t5/LabVIEW/Communication-with-serial-device/m-p/3791957#M1069773
05-09-2025 08:05 AM
I updated your VI to show how I handle intermittent communication. I use the Bytes At Port to see if a message has started to come in. I do not use it to determine how many bytes to read, just to see if there is data to read. If there is data, read it. If no data, use a wait. I tend to used a 50ms wait for these situations.
05-09-2025 02:10 PM
Thank you! I actually watched the video and created this exact VI. You have all been very helpful