LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to obtain USB device manufacturer ID

Hello,

 

I am using a USB-to-Serial (RS-232) to locate my equipment. I followed the following example code (with a little change, as attached), but all I get is COM1, COM2 etc.

 http://decibel.ni.com/content/docs/DOC-3464

 

What I want is obtain the manufacter name of the device, just like the Measurement and Automation Explorer did. It read the manufactuer ID as 'Prolific USB-to-Serial Comm Port'. How should I do?

 

Thanks,

 

Ryan

Download All
0 Kudos
Message 1 of 11
(7,460 Views)

I think Shane covered that in one of his two USB Nugget found here and here.

 

Give him Kudos if those Nuggets helped you (please).

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 2 of 11
(7,456 Views)

Ryan,

 

Were you able to get it to work after looking at the nuggets? 

Misha
0 Kudos
Message 3 of 11
(7,405 Views)

Ryan,

 

when you install a USB to serial adapter, it shows up as a real COM port to the system.  MAX doesn't know it's a USB to Serial converter, it just sees a COM port.

 

You can go into the device manager in Windows and right-click the entry for your USB to serial device and choose Properties and then the right.most riser Details.  In the list you'll find VID and PID values in Hexfor the entry "Device Instance ID".  These are the Vendor ID and Product IDs for your product.

 

In the example below my USB device's VID is 0x0661 and the Product ID 0x2906.

 

 

 

Shane.

Message Edited by Intaris on 03-02-2009 10:31 AM
0 Kudos
Message 4 of 11
(7,398 Views)

Shane,

     I misphrased my question. I try to obtain the USB device ID using a VI. For example, if I don't know which COM port I plugged in my device, I want the program automatically find the device, how should I do?

 

Thanks,

 

Ryan

0 Kudos
Message 5 of 11
(7,391 Views)

That won't work unless you start doing some more advanced USB programming.

 

Like I said previously, as far as MAX or VISA is concerned, it's a COM port and COM ports don't have Vendor IDs or Product IDs.

 

Can't you simply poll the available COM ports untily ou find the one you're looking for?  Surely your device has a specific request you can use to identify it?

 

Shane.

Message Edited by Intaris on 03-02-2009 10:54 AM
0 Kudos
Message 6 of 11
(7,388 Views)

Misha,

     I got it to work, not the way as I asked. In stead of using the manufacter ID, I let the program send out a handshake signal. The one answered correctly is my device.

 

Ryan

0 Kudos
Message 7 of 11
(7,386 Views)

Ryan,

 

Looks like we posted at almost the same time.   :smileyvery-happy:

 

Shane

0 Kudos
Message 8 of 11
(7,379 Views)

Shane,

    Please see my previous reply of how I solved this problem.

    You mentioned that 'COM port and COM ports don't have Vendor IDs or Product IDs', but how come the 'Measurement and automation center' being able to find the device ID?

 

Thanks,

 

Ryan

0 Kudos
Message 9 of 11
(7,378 Views)

The text you mentioned earlier is simply a label, it's not a Device ID.

 

A Device ID is something else entirely in a USB context.  The text you're talking about whould be available via a VISA property node, I don't recall which one, I think something like "Manufacturer name" or something similar.

 

Now that I know what you're looking for, it's clear that you're not talking about USB, even though that wasn't really clear from the original post.  Glad you got it to work though.

 

Shane.

 

Edit: On a side note I think the text you're referring to is simply taken from an *.inf file when installing the device driver.  It's possible to change this without affecting the functioning of the port at all.

Message Edited by Intaris on 03-02-2009 11:03 AM
0 Kudos
Message 10 of 11
(7,374 Views)