LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

programmatically assign com port

Hi

 

I have an applicaton that uses USB-Serial adapters (Keyspan).  This system is in an open lab situation with multiple users and multiple laptops runing the LabVIEW program.  Each computer's registry assigns different comports to the Keysapn USB-Serial converter.  I've been able to query the registry and determine what com port Windows has assigned to Keyspan.

 

How do I take this info and programmatically assign a com port or Visa resource name that LabVIEW is to open?  Is there some simple Visa property node for "Resource Name" that I am not finding or is this more difficult than my awareness?

 

All of the laptop computers will be using Windows XP and LabVIEW 8.6 runtime engine.

 

Thanks

 

Glen

0 Kudos
Message 1 of 5
(4,600 Views)

You can take the com port name as a string and wire it into the VISA functions.  It will generate a coercion dot, but it will work.

Message Edited by Ravens Fan on 03-16-2009 10:30 AM
Message 2 of 5
(4,597 Views)

I'm not at a mchanie where I can check but I believe VISA aliases where stored in a file "VISAConf.ini" ( Not sure if correct spelling).

 

Adding a line to assoociate the right port with a resreved name like "Glenns_Port1" and using that name in your app may help.

 

Ben

 

 

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 3 of 5
(4,593 Views)
You can also just use the VISA Find Resources function to list the com ports. No real need to muck around in the registry.
Message 4 of 5
(4,586 Views)

Guys

 

Thanks for all the help!  You guys are great!

 

Glen

0 Kudos
Message 5 of 5
(4,565 Views)