LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with my exe code

Hello,
 
I have a small problem regarding to my code. I have attached the source code. There isn't any problem with the vi code. But when I convert the vi to exe, and double click the exe file in order to open it , the program is trying to start, I mean it is acting like I clicked the run button. I said it is not a problem, because all the values (test duration, delay duration, high limit, low limit) are zero. Therefore it is attempting to run, but only very small portion of the pressure reading occurs. What do you think about the cause of this problem? Thanks for your help.
 
Ahmet
Download All
0 Kudos
Message 1 of 5
(2,313 Views)
Hi Ahmet,

when duration and delay are zero, the your DAQ loop will (probably) run only once, thus giving you only small amount of data...
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 5
(2,296 Views)
First a question.  Are you trying to run the executable on your development machine or a target machine.  If you are trying to run on a target machine you need to make sure all the supporting software has been loaded with the executable.  LV Runtime, DAQmx Runtime.
 
Wire up error cluster in your vi to the simple error handler.  That will allow an error generated by the exe to be displayed.  My guess is that the final solution will include adding a time delay in your while loop to control how often you read the pressure measurement. 
0 Kudos
Message 3 of 5
(2,294 Views)

Thanks GerdW and Centerbold for your concern.

I found the solution: Here it is: When I convert the vi file to an exe file I had to change a propery from its default value. As you can see in the attached file it is ''Run when opened''. It is clicked as default. So I removed the check, everything is perfect. For me, it is a little bit strange that why NI uses this ''Run when opened'' property default on. Anyway, it is an easy solution but unfortunately I couldnt see it up to now.

Regards,

Ahmet

0 Kudos
Message 4 of 5
(2,273 Views)
Hi Ahmet,

for us it's strange to create an executable that doesn't execute when calledSmiley Wink
It's the natural behaviour of an exe to 'run when opened' - or do you press a run button when you open Word/Excel/etc?

You should set some meaningful default values in your control: set value, right-click control, data operations->set default value!



Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 5 of 5
(2,270 Views)