LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I access any USB device in LabVIEW?

Solved!
Go to solution

I have Labview 8.5.It has some blocks to directly control the serial port , but I see NOTHING to let me control devices connected to USB ports. While using VISA functions the USB port is not available in the list at VISA Resource Name Control. I have a device with USB port. I would like to transfer data to/from the device through USB port using LabVIEW.Does someone have some suggestions for how I can gain access to the USB port in a way that will allow LabVIEW to directly communicate with the device connected to the USB port?

Message 1 of 9
(22,366 Views)
Solution
Accepted by topic author kimhyun

Hi

 

Did you search about USB communication through labview?

You have to first configure your VISA to recognise the USB

 

http://zone.ni.com/devzone/cda/tut/p/id/4478

Here is a starting point..

0 Kudos
Message 2 of 9
(22,358 Views)

Also follow this thread and see the links given in the thread

 

http://forums.ni.com/t5/LabVIEW/USB-read-data/td-p/641344

0 Kudos
Message 3 of 9
(22,355 Views)

Many commercial test and measurement devices use an instrument driver. These are found at http://www.ni.com/downloads/idnet/. Search for your device to see if there is a download available.

 

Some devices that connect via USB are visable to the OS as virtual serial ports. In this case you would use VISA to open a serial session and communicate.

 

There are several threads on the forums dealing with performing RAW communications over USB. The series of 'nuggets' by Intaris are excellent, but be aware that you need some experience with LabVIEW in general before diving in.

 

http://forums.ni.com/t5/LabVIEW/Nugget-1-of-n-GEtting-started-with-USB-communication-via-VISA/td-p/7...

http://forums.ni.com/t5/LabVIEW/Nugget-2-of-n-USB-Control-transfers-using-VISA/td-p/757011

 

Without some basic information about the device (mfgr & model), it will be difficult to help.



0 Kudos
Message 4 of 9
(22,353 Views)

As per following the procedure mentioned in the tutorial, the device I connected through USB is not visible in the list of devices in MAX.

0 Kudos
Message 5 of 9
(22,292 Views)

Before you went and created the VISA driver, did you check in windows device manager to see if a driver wasa already installed?

Message 6 of 9
(22,279 Views)

Yes i have checked it. It shows the device in Human Interface Devices list. After installing the VISA driver by following steps as per tutorial, It is listed in Universal Serial Bus controllers list.

0 Kudos
Message 7 of 9
(22,259 Views)

Nothing like responding to a 7 year old post but just in case anyone runs across this with the same problem -- You need to set up a virtual com port for your USB device. Go to the device manager and locate your device under "universal serial bus controllers", then right click and select "properties", select the "advanced" tab, check the "load VCP" box (VCP stands for virtual com port). Then check "Ports (COM & LPT) under device manager. There should be a new (virtual) com port associated with your device. Communicate with it using normal VISA serial commands.

------------------------------
All statements are my opinion and worth every cent you paid for them.
Tom Whitaker, CLD
- - - - - - - - - - - - - - - - - - - -
"Give every man thy ear but few thy voice."
Polonius in Hamlet.
Message 8 of 9
(17,894 Views)

Except that the USB VCP (Virtual Com Port) is not an option for most devices that are recognized as USB HID (Human Inderface Device). USB is for the most part an electrical standard (with some basic communication infrastructure standardized too). But a USB Video Camera has VERY different requirements in data transfer than an USB Keyboard or Mouse and again different from a USB serial communication link.

 

That is why USB defines many different device profiles and each of them uses one or more endpoints (data ports) and for each endpoint one of the protocol methods (bulk, interrupt, and isochronous). A USB VCP driver will never attempt to connect to a USB HID device. Theoretically a device can support multiple USB device profiles in parallel as USB allows discovery of devices and their device profile but that is not done very often.

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 9 of 9
(17,873 Views)