How Can I Read Data from the COM Port Using LabVIEW

Updated Jan 25, 2019

Reported In

Hardware

  • Serial Interface Device

Software

  • LabVIEW

Driver

  • NI-VISA

Issue Details

I want to read data from my instrument through COM1. I tried to use the Read VI and the configure the I/O port to COM1, but it doesn't work. How can I read through COM1?

Solution

When reading from an instrument through a COM port, you are using serial communication which has a different protocol than NI DAQ devices. In order to communicate with LabVIEW, you need to download the NI-VISA driver.

Before programming communication with the instrument, you can make sure the instrument is communicating correctly with your computer by using NI Measurement and Automation Explorer.  

Once the communication has been confirmed, you can find example programs in LabVIEW for communicating with instruments using the VISA driver protocol. In LabVIEW, navigate to Help -> Find Examples. Search for "VISA" and you will find a few examples regarding serial communication. 

Additional Information

The instrument you are reading from may have an instrument driver that can be found on NI Instrument Driver Network . Instrument drivers are a set of software routines that simplify communication and control of instruments. 

WAS THIS ARTICLE HELPFUL?

Not Helpful