LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

detect port serial automatically

Solved!
Go to solution

I can't make my VI detect the connection of a serial port automatically, I don't want the user selecting the port COM*?

0 Kudos
Message 1 of 7
(4,852 Views)
What have you tried? With either VISA Find Resources or the System tools you can get a list of all com ports. After that, you send a query to each one until the specific instrument is detected.
0 Kudos
Message 2 of 7
(4,836 Views)

Use the VISA Find Resource to find the resources and then use a FOR loop to filter just the ones you want (COM ports).  You can then use a FOR loop to check each serial port to see if it is the right one.  For connecting to a streaming instrument, just do a read and see if it matches the expected data format.  If it is a command-response instrument, you just send a command and check the response.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 3 of 7
(4,829 Views)
Solution
Accepted by Andrespp

If you're trying to find USB com ports, maby one of these will help.

"If you weren't supposed to push it, it wouldn't be a button."
Download All
Message 4 of 7
(4,661 Views)

Thnx! it works. It is what I was looking for.

0 Kudos
Message 5 of 7
(4,542 Views)

Hi paul 

could you pleas put these files with lower version .

Thanks

0 Kudos
Message 6 of 7
(4,495 Views)

Here's LV 13.

Also, this time I didn't forget to include the subVIs for 'Find Specific Com Port.vi'.

 

"If you weren't supposed to push it, it wouldn't be a button."
Download All
Message 7 of 7
(4,422 Views)