LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to set a com port in Labview

I have an application that uses USB that is set up as a virtual com port in Windows XP.

 

How can I set up a com port in labview on my development PC and guarantee that when I install the compiled executable version of my vi on a target system that my device when plugged in will either always be set to a certain com port?

 

Or how can I set up my code to automatically select the com port where my USB device is connected?

 

What I currently have is an I/O device that I set up with Max but for some reason,  this does not configure itself with the same 

name on my target PC, so I am not sure if I need to change my code or set the installer up in a different way.

 

I am using LV v 8.2.1...

 

thanks

 

 

port setting.JPG

0 Kudos
Message 1 of 19
(11,072 Views)

You can use this VI to programatically change your com port.

-----------------------------------------------------------------------------------------
Reese, (former CLAD, future CLD)

Some people call me the Space Cowboy!
Some call me the gangster of love.
Some people call me MoReese!
...I'm right here baby, right here, right here, right here at home
0 Kudos
Message 2 of 19
(11,068 Views)

Thanks-

Please supply your example in version 8.2.1 or older

 

thanks again

0 Kudos
Message 3 of 19
(11,066 Views)

Here you go (v8.0)

-----------------------------------------------------------------------------------------
Reese, (former CLAD, future CLD)

Some people call me the Space Cowboy!
Some call me the gangster of love.
Some people call me MoReese!
...I'm right here baby, right here, right here, right here at home
Message 4 of 19
(11,060 Views)

ALSO- you can export your MAX configuration and import it to the new machine during instal.  At least with later LabVIEW versions I haven't played with 8.2 for a few years


"Should be" isn't "Is" -Jay
0 Kudos
Message 5 of 19
(11,055 Views)

I tried configuring it with MAX and it appears to load it but unfortunately this does not set thet com port to com 9

0 Kudos
Message 6 of 19
(11,043 Views)

two ways around that.

Rename the Alias in MAX

Use Windows hardware manager to re-assign the port number


"Should be" isn't "Is" -Jay
Message 7 of 19
(11,032 Views)

nd out later that Max did work and in the hardware device manager, when the device was plugged into the USB port and appeared in the device list that I had to select it and under the advanced tab, I had to scroll down and select com 9 and then the PC will map the device to com port every time it is plugged into the PC...

 

 

Thanks for your help

0 Kudos
Message 8 of 19
(11,009 Views)

Hello all,

                    Now i want to communicate through device using USB. I think i need to use virtual com port for commnication between PC & device. I am selecting this because i dont want to give feature for selecting the com port each time. so for this i want to use the feature of USB named HOT PLUGGABLE in my project i.e. without configuring the port user can communicatio from the device, Take a example of usb keyboard or mouse.

 

U seem to be have some experience in this usb field.

Please show me the direction.

 

Thanks- 

Ranjeet

--------------------------------------------------------------------------------------------------------
Kudos are always welcome if you got solution to some extent.

I need my difficulties because they are necessary to enjoy my success.
--Ranjeet
0 Kudos
Message 9 of 19
(10,945 Views)

Have you tried what's already been suggested in this thread?

-----------------------------------------------------------------------------------------
Reese, (former CLAD, future CLD)

Some people call me the Space Cowboy!
Some call me the gangster of love.
Some people call me MoReese!
...I'm right here baby, right here, right here, right here at home
0 Kudos
Message 10 of 19
(10,915 Views)