LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Making COM 2 Port default

Hello,

 

I need to make one of my COM port default value so as it doesn't asks me everytime which one to select and choose.

 

I have explained with the help of screen shots as what little help I need.

 

So, this is the main VI, the first picture you can see below and there is a box which says Connect instrument. If I go into it, I find another sub Vi which is in the next picture 2.

 

Untitled1.png

 

 

In this second picture you must be able to the box which says Select Device Ok. This is the pop up window which comes up asks the user to select a port for use. My concern is that this pop up window doesn't shows up and the COM port is automatically selected. Now, I was easily able to dissapear the pop-up window by disabling the select device ok box but how can I make sure that it also selects the COM 2 as a default port. In the next picture 3 I have shown the block diagram of this Select Device Box where I have put the COM 2 as a constant but I do not know where to join it so that COM 2 is default and selected automatically.

 

The pop up window comes up when I execute the program and the last picture is showing it how does it look like.

 

I hope I am clear.

 

 

2.jpg4.jpg5.jpg

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

It is extremely difficult to evaluate you VI from fragmented pictures of parts of that VI.  Attaching the VI would make this so much easier for us.

 

I take it that you have a Control somewhere that can take on the values of your COM ports, right?  If so, you should be able to set it on your Front Panel to COM2, then from the Edit Sub-Menu choose Make Selected Value Default.  Is this what you are trying to do?

 

Bob Schor

0 Kudos
Message 2 of 5
(3,196 Views)
Instead of selecting from a list, you should modify it so it automatically selects the port that is connected to the device. You already have most of the code, presumably created by someone else, but the modification is not that difficult. Hard coding a specific com port like you want is asking for trouble in the long term.
0 Kudos
Message 3 of 5
(3,172 Views)

Thanks Bob.

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

Yes I did by myself finally.... Dennis.

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