Monitor Connections to My Computer's USB Ports Using LabVIEW

Updated May 21, 2018

Reported In

Software

  • LabVIEW

Operating System

  • Windows

Issue Details

I want to develop an application that monitors the USB connections. This will help me filter the USB devices that are useful for it from the rest.

Is there a way to monitor the USB ports programmatically in LabVIEW.

Solution

It does not exist a LabVIEW's native function to accomplish this. Below, you will find some ideas:

  1. You can use the Call Library Function Node to call the kernell32.dll. This DLL contains a function called "GetLogicalDriveStringsA" that will return the different USB devices connected to the computer. Refer to the Related Links for more information.
  2. This example explores the way of using the Window's Registers to obtain the information about the USB devices connected.
  3. LabVIEW does have a native way to monitor joystick, keyboard or mouse. Check the Related Links sections for more information.
  4. If you know how to acquire this information from the command prompt, you could use the System Exec VI.

Additional Information

You can find the kernell32.dll at C:\Windows\System32\

WAS THIS ARTICLE HELPFUL?

Not Helpful