LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

COM port not detected in exe

Solved!
Go to solution

In my development vi COM port are visible in the drop down, whereas when exe is created, COM ports are not visible. I have labview 2019 and installed NI VISA 19.5, NI Serial 2019 and NI VISA run time 2019. I have attached the sample project for your reference.

sabah_TASL_0-1681359621830.png 

Fig1. Labview Vi where com port are detected.

sabah_TASL_1-1681359702059.png

Fig 2. EXE where com port is not detected.

sabah_TASL_2-1681359806589.png

Fig 3. NI MAX software list

0 Kudos
Message 1 of 20
(1,516 Views)

Can anyone help regarding this issue.

0 Kudos
Message 2 of 20
(1,469 Views)

Try something like this:

 

SelectComPort.png

========================
=== Engineer Ambiguously ===
========================
Message 3 of 20
(1,447 Views)

Hi RTSLVU,

 

Your snippet is LV2023, while I am using LV2019. I have tried to replicate your VI and here are the results.

 

I tried your VI, in development mode COM ports are detected in array.

sabah_TASL_0-1681444181409.png

Fig1. LabVIEW VI

 

Whereas, when exe is created and executed the array of string is empty.

sabah_TASL_1-1681444400151.png

Fig 2. In exe mode the array is empty.

 

0 Kudos
Message 4 of 20
(1,406 Views)

The problem is in first block itself, In VI I get the list of resources.

sabah_TASL_0-1681444911730.png

Fig 1. VI mode.

 

Whereas in exe mode the find instrument is empty.

sabah_TASL_1-1681445019422.png

Fig 2. Exe

 

0 Kudos
Message 5 of 20
(1,402 Views)

Hi,

I tried with the following expression which was mentioned in the help, and it is working in exe as well, I'm using 2021 64 bit.
"ASRL[0-9]*::?*INSTR'

bharathp10_0-1681451387712.png

 

bp
Message 6 of 20
(1,392 Views)

Silly question,

Is the Exe used on the same computer as the development VI?

0 Kudos
Message 7 of 20
(1,386 Views)

Yes, exe and development vi is in same pc.

0 Kudos
Message 8 of 20
(1,379 Views)

This is nearly unexplainable. What if you uncheck "Allow future versions of the LabVIEW Runtime etc..." in the program build specifications? (Just a shot in the dark).

Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021
0 Kudos
Message 9 of 20
(1,374 Views)

I have unchecked " Allow future version..." but still facing same issue in exe.

sabah_TASL_1-1681457383634.png

sabah_TASL_2-1681457538709.png

 

 

 

0 Kudos
Message 10 of 20
(1,366 Views)