02-27-2009 12:45 PM
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
02-27-2009 12:52 PM
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
03-02-2009 10:15 AM
Ryan,
Were you able to get it to work after looking at the nuggets?
03-02-2009 10:30 AM - edited 03-02-2009 10:31 AM
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.
03-02-2009 10:51 AM
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
03-02-2009 10:53 AM - edited 03-02-2009 10:54 AM
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.