Quantcast
Channel: Instrument Control (GPIB, Serial, VISA, IVI) topics
Viewing all articles
Browse latest Browse all 5565

LabVIEW autodetect correct Com Port or USB resource

$
0
0

I would like to program LabVIEW to automatically find the correct resource or com port when using 3 USB-to-serial adapters with FTDI chips. Does anyone have any ideas about how to accomplish this? I have tried 2 different approaches with no success:

 

1) Create a driver using the NI Driver Wizard, and run the adapters in RAW mode (I could not retrieve any hardware identification unless in this mode). This allowed me to get a serial off of each adapter in my VI and make a distinction but I do not know how to program communication well enough in RAW mode to be able to read and write with VISA Serial as I would normally.  I also could not find any examples or tutorials on setting up RAW USB to be run as if it was using VISA and a com port.

 

2) I attempted to have the VI access the registry values that Windows keeps the com port numbers in, these are assigned by the FTDI chip serial. This method failed when using the Read Registry Value Simple function with the error "-604" "remote access registry denied". I can fix this by manually changing the registry permissions but that is too complicated for the client users.

 

If anyone has any suggestions that would be very helpful. The ultimate goal is when a client plugs in all three serial adapters, the VI can find and distinguish them correctly (by previously knowing the adapter serial or other identifier) without having to manually decide which com port Windows decided on and entering them.  This is a problem I have faced many times in the past and still have never come up with a solution.

Thanks!

 


Viewing all articles
Browse latest Browse all 5565

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>