10-19-2011 08:15 AM
Hi,
I want to calculate the time my VI is running.
Suppose if my VI has run for about 10 min then I want to pop up some message.
But how do I get this time.
I have tried using the "Elapsed time VI" , but its not giving me the required output.
Any suggestions.
Regards,
Runjhun A.
Solved! Go to Solution.
10-19-2011 08:46 AM
There might be a better solution, but this is one way to do it
Paul
10-19-2011 08:51 AM
Oooops. The shift register is no necessary 🙂
10-19-2011 09:58 AM
Hello Runjhun,
I have modified the VI from above so that it functions as I believe you wish it to. I have only placed a simple dialogue box to alert you when 10 minutes is up but this could easily be edited to create a custom pop-up dialogue box.
I hope this helps and let me know if you need any more assistance.
Regards
10-19-2011 09:59 AM - edited 10-19-2011 10:06 AM
Thanks to both of you.
It may be quite niche as I have started learning LV few months ago.
I thought of building an application that will execute in background (or for the time being user will launch) and if some specified time is completed, lets say 1 hour then it should pop up some warning message that will temporarily disable all the programs running in the system.
Kinda Windows programming stuff.
Do you have any idea about it in LabVIEW 9.0 or later or may be you can suggest me something worth.
Regards,
Runjhun A.
10-19-2011 10:31 AM
Hi RJ,
To find out the execution time of your VI there is a nice built-in application in LabVIEW which can provide you with this information, this can be found at:
Tools >> Profile >> Performance and Memory...
If you want to hard code the execution time of your VI it is possible to do so using a sub-VI which is set to dialog mode in the main VI properties. I have quickly created a example version of this code and attached it to this post.
I hope this helps, if you have any more questions or need further insight please do not hesitate to post.
Regards,
02-15-2017 11:20 AM
Hi Laurence,
I have used the suggested methood and attached the results.
The application run continuously in loop for ~10sec for 5 loops. However, according to the profile high level VI ("Example_Apache") ran in total for 358msec.
Could you please explain the differences?
Thanks,
02-15-2017 11:38 AM
02-15-2017 12:32 PM
Hi GerdW,
Does it make sense that in the middle of VI execution there will be CPU "wait" states?
Is it proactively used inside invoked *.dll?
The issue is that relatively simple programs takes ~2sec for cycle, while real cpu processing 20 times shorter.
BR,
Igal
02-16-2017 01:24 AM - edited 02-16-2017 01:24 AM
Hi Buleon,
there is a simple rule: when you have problems with YOUR VI and you want us to provide solutions/suggestions you should attach YOUR VI here! (Attach VIs or snippets, but not pure images.)
Does it make sense that in the middle of VI execution there will be CPU "wait" states?
What is the "middle" of your VI?
Is it proactively used inside invoked *.dll?
Which DLL and which functions are you talking about?