11-12-2024 12:33 AM
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.
11-12-2024 02:47 AM
Add everywhere error indicators to check whether any function fails, then get back here.
11-12-2024 07:15 AM - edited 11-12-2024 07:19 AM
@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.
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.
11-12-2024 07:34 AM
@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.
11-12-2024 09:19 AM
@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. 😊