LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

EXE file running but not giving output

i have created a vi file to read data from stm32 via uart using visa functions and i have config blocks to read COM_PORT=COM7 as input to visa open , so i dont need to give connect manually , it runs but when i converted it into exe file and try to run, it runs but output is not showing.Screenshot (10).png

0 Kudos
Message 1 of 5
(141 Views)

Add everywhere error indicators to check whether any function fails, then get back here.

Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021
Message 2 of 5
(103 Views)

@AnupSW13 wrote:

i have created a vi file to read data from stm32 via uart using visa functions and i have config blocks to read COM_PORT=COM7 as input to visa open , so i dont need to give connect manually , it runs but when i converted it into exe file and try to run, it runs but output is not showing.Screenshot (10).png


Why are you trying to get the COM port from Windows Registry?  There are easier ways that do not require Administrative Privileges!  And yes, you would need to Run as Administrator for the Registry read.  Windows locks the Hive.

 

As mentioned above,  your error handling is not right. Replace the error tunnel with a Shift Register, exit the loop on Error OR Stop and add a Simple Error Handler.vi to show that error you are getting from the Registry Read.


"Should be" isn't "Is" -Jay
Message 3 of 5
(83 Views)

@JÞB wrote:
Why are you trying to get the COM port from Windows Registry?  There are easier ways that do not require Administrative Privileges!  And yes, you would need to Run as Administrator for the Registry read.  Windows locks the Hive.

Where do you see Windows Registry being used? The OP is using the Configuration File (ini).

 

Now to the OP...

My guess is that you are trying to read a configuration file that does not exist. I highly recommend not using an absolute path for the configuration file. Instead, use the Application Directory constant along with Build Path to create the path to the configuration file. The Application Directory will give a path to the folder of the project (in the IDE) or the executable.

 

My other random note is that the VISA Open is not required. Wire the COM port string straight to the VISA Configure Serial Port.


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 4 of 5
(78 Views)

@crossrulz wrote:

@JÞB wrote:
Why are you trying to get the COM port from Windows Registry?  There are easier ways that do not require Administrative Privileges!  And yes, you would need to Run as Administrator for the Registry read.  Windows locks the Hive.

Where do you see Windows Registry being used? The OP is using the Configuration File (ini).


Fancy, when I watched that post on my mobile I first thought he was using the registry too and was really wondering about that. 😁

But didn't really have a clear guess what might be the problem and my interest to test and debug pictures is pretty much non existent. 😊

Rolf Kalbermatter
My Blog
Message 5 of 5
(61 Views)