Getting Started with Instrument Control

Updated Nov 21, 2019

Reported In


  • USB Cable


  • Measurement & Automation Explorer (MAX)


  • NI-Serial
  • NI-488.2

Operating System

  • Windows

Issue Details

  • I've just started using a third-party instrument. How do I connect to it and begin coding in LabVIEW?
  • My instrument is not responding when I attempt to communicate with it via micro-USB to USB cabling.
  • Why am I only receiving zeros back from my instrument?


The following steps are the recommended initial troubleshooting steps when beginning with Instrument Control.

Ensure the computer has identified the third-party instrument.

  1. Open NI MAX,
    1. Select View»Refresh or press F5 to refresh the view.
    2. Expand Devices and Interfaces in the system tree on the left-most window.
    3. Your USB instrument device should be listed here.
  2. If not identified in NI MAX, troubleshoot your instrument in Windows Device Manager.
    • If not identified in NI MAX nor Windows Device Manager, 
      1. Check the instrument's manual to determine which driver is required for Windows to communicate to the device
      2. Make sure the specified driver is installed on the computer.
      3. Troubleshoot the physical cable to determine it is not the issue
        • Ensure both ends are properly plugged-in to the device and your computer
        • Try another cable that you've successfully used in communicating with other instruments
        • Unplug and re-plug the cable back into the device and your computer

    Successfully communicate with the third-party instrument.

    • Open NI MAX,
      1. Right click on the instrument under Devices and Interfaces
      2. Open a VISA Test Panel
      3. Under the Input/Output tab, perform a simple SCPI command.
        • i.e. Query the *IDN?\n command to identify the name of your instrument
    • Open LabVIEW,
      1. Open NI Example Finder and open the following example: Hardware Input and Output >> Serial >> Simple Serial. Note that the NI-Serial driver must be installed to find this example.
      2. Create code from scratch, based on an online example with only VISA functions. Note that the NI-VISA driver must be installed to access these functions in LabVIEW.

    Begin programming with your third-party instrument

    1. Check if the instrument has any available Instrument Drivers.
    2. If no instrument drivers are already available, build off of an existing example from NI Example Finder. Remember to save the adjusted example file in a different location so that you do not alter the file saved in the NI Example File.
      • Some great places to start are Simple and Continuous Serial Write and Note that the NI-Serial driver and NI-488.2 driver must be installed to find these examples.

    Getting Started Video Instructions

    The Getting Started with Instrument Control video series will walk you through similar steps as above. Note, the NI software is dated, but the principles still apply.


    Not Helpful