LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

USB to 232 how to get device instance id with labview

I'm using chip CP2102(UART to USB) to communicate my board with PC.

On PC, i installed the USB to UART Bridge Virtual COM Port driver so it shows a virtual COM Port on the PC.

In the device manager of the PC, it can read the Device Instance ID(USB\VID_10C4&PIC_EA60\0001) of the usb port as well as the virtual COM port number(COM11).

But in labview, i can only get the COM port number when i try to find the resource. Even if in MAX, i can only get the COM port number.

I need to use one PC to control several boards, so i need to recongnize the boards with the Device Instance ID.

Is there some way to get the Device Instance ID of the virtual COM port in my labview program?

 

Thanks a lot.

 

Jason

 

 

0 Kudos
Message 1 of 5
(3,500 Views)

We did similar sort of thing with FT232 chip based devices.

But we used our PC Port as the basis of detecting the devices rather than the device itself.

FTDI has drivers to address devices based on PC USB port number.

This could be of bit help as well.

http://www.ftdichip.com/Support/Documents/ProgramGuides/D2XX_Programmer's_Guide(FT_000071).pdf

The LabVIEW Drivers are available on their website.

 

You might want to do something similar if you don't want to go ahead with FTDI chip.

 

0 Kudos
Message 2 of 5
(3,494 Views)

Thank you for your reply.

You said you used the PC Port as the basis of detecting the devices.

But each time connect the board to PC, the virtual PC Port is random, isn't it?

It seems it can't recongnize the board just by the PC Port without handshake protocol. 

Now i'm trying to avoid the handshake protocol and recognize the boards by something pernament.

 

Thank you again.

 

Jason 

0 Kudos
Message 3 of 5
(3,469 Views)

Hi Jason,

 

What you are saying is true. But the D2XX drivers provided by FTDI can talk to devices based on PC Port. The way we have implemented it is as follow:

Scan the specific USB Port for a device detection.

If Device is detected. Send commands to configure the Baud Rate between FTDI chip and Micro controller on the device.

Send the communication commands to the FTDI, which will be sent to the micro controller.

We don't install Virtual Com Port Drivers for our devices. We only install D2XX drivers, so we don't see the enumration of COM Ports on PC. 

 

Kind Regards

0 Kudos
Message 4 of 5
(3,455 Views)

It seems like you install the USB driver for your chip so it can read as a usb port.

CP2102 has the similiar driver too. But in that case, i have to change my GUI for my board on PC.

Anyway, thanks a lot.

 

Jason.

0 Kudos
Message 5 of 5
(3,443 Views)