Tag: continuous COM port reading

1 articles found.

Get Continuous Data From COM Port in LabView

LabVIEW serial acquisition block diagram overview, LabVIEW serial reader, NI-VISA, COM port data

Hello friends! Today, we will receive continuous data from a COM port in LabVIEW and display both the incoming text and its individual values. This is a useful first step when connecting a microcontroller, measurement instrument or serial sensor to a computer. Our original example receives comma-separated values and places them in a one-dimensional array. We will keep that flow, but also explain how the program knows where one complete record ends. Without that step, a serial reader can appear to work during a short demonstration and then occasionally display incomplete or mixed measurements. We will start with the software and serial settings, build the front panel and block diagram, then discuss parsing, timeouts and stopping the reader cleanly. The original VI remains available near the end for reference. Its screenshots show an older LabVIEW interface, so menu locations may differ in your installed version. A serial port transports bytes in order. It does not inherently know that three numbers belong to one measurement or that a comma separates two channels. Those rules come from the sending device's protocol. Before placing a VISA Read block, write down the exact format your device sends. For this tutorial, assume the sender transmits three decimal numbers separated by commas, with a line-feed character after each record. A displayed example is 120,221,312. On the wire, the final byte is LF, hexadecimal 0A. Some senders use carriage return followed by line feed; our ...