LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Launch time of an exe

Solved!
Go to solution

Hi all,

I have created a LabVIEW executable and I would like to find how long the program takes to launch, meaning the time from double clicking the exe and the time when the program starts running. Is there any way to find it?

Thanks for the help in advance:)

0 Kudos
Message 1 of 4
(3,056 Views)

After launching only LabVIEW has the control to calculate timing, any specific reason to do so?

 

Onething you can try is, Try to Launch the exe using Another VI and Poll for the Front Panel State whether its standard, so the time betwen command for launching to Frontpanel of the VI to set Standard is the time taken.

 

I too wishing to hear from others, anything available to do the same in simple method.

 

----------------------------------------------------------------------------------------------------------------
Palanivel Thiruvenkadam | பழனிவேல் திருவெங்கடம்
LabVIEW™ Champion |Certified LabVIEW™ Architect |Certified TestStand Developer

Kidlin's Law -If you can write the problem down clearly then the matter is half solved.
-----------------------------------------------------------------------------------------------------------------
Message 2 of 4
(3,045 Views)
Solution
Accepted by topic author Ramya12

It starts running as soon as you click on the executable - so what do you mean? Do you want the time until the LabVIEW code starts running, the VI front panel appears or the program finishes initialisation?

 

LabVIEW can't know when you launched the executable - so your best bet would be to run the executable programmatically (e.g. from a batch file, or using system exec) and creating a timestamp. Your executable can then generate a timestamp at the point at which you want to define as 'running' and 'signal' it (e.g. writing the timestamp to a file, transmitting data such as TCP/IP/Shared variables etc.) and then subtract the two to get your launch time.


LabVIEW Champion, CLA, CLED, CTD
(blog)
Message 3 of 4
(3,028 Views)

Are you wanting to measure this because you are seeing a long time between double clicking the file, and seeing the UI?  This might be because as your application grows, more and more VIs need to be loaded into memory before the top level VI can start running.  Even in source it takes a while to double click the project, wait for it to load, double click the main VI, and wait for it to load.  It is the same with an EXE.

 

One thing you can do to try to make a better experience for the user, is make a splash screen, that gets ran immediatly, which loads other parts of the application dynamically, so the user at least has something to look at with maybe a progress bar and a cancel.  There's lots of example of how to do this but I use a modified version of stuff I mentioned in a LAVA post.  The basic idea is to break your application up into modules (or actors) then in the splash screen load each of them one at a time (updating a progress bar) and then load the main top level and run it.  I know AQ had an example on how to do this with the Actor Framework and showed an example of it, but not everyone uses that.

0 Kudos
Message 4 of 4
(3,002 Views)