Serial VISA Read Only Reading One Line at a Time

Updated Apr 5, 2023

Reported In

Driver

  • NI-VISA

Issue Details

In my serial communication program, my VISA Read gives inconsistent behavior. It seems like it is only reading one line at a time. Sometimes it reads back the exact command from VISA Write, while other times it returns the expected information. I am expecting my read buffer to return several lines of output. I have the baud rate set correctly, and I am using the termination characters that the third-party device manufacturer tells me to use.

What is causing this, and how can it be fixed?

Solution

The VISA Configure Serial Port VI has a terminal for Enable Termination Char. Changing the default behavior from True to False will make the serial device not recognize the termination character. In doing so, VISA Read should return the complete output.