LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to understand VI Time?

Solved!
Go to solution

Hi,

 

I'm using LV 8.6, and I'm curious how to understand the "VI Time" statistic under the "Profile Performance and Memory Window".

I am letting one of my VIs "run continuously" for 5 about seconds, but in the profile window, the VI Time comes out to be 1.17 seconds, while the SubVIs Time is 0. As I understand from the Help window, "VI Time" represents the time spent running the code of the VI, so what happens during the other 4 seconds? This is confusing to me because I ran similar tests on other VIs (with no subVIs), and it seems the faster the VI, the smaller the VI Time is.

 

Thanks a lot.

0 Kudos
Message 1 of 4
(2,769 Views)
Solution
Accepted by topic author zsbeginner

The time you see reported is the grand total of all of the time slices of teh CPU used by the code.

 

If the VI took 1 msec to start up, then did a wait 1 second and then exits, you should expect the total time to be about 1-5 msec alothough the total run time was much more than that.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 2 of 4
(2,761 Views)

Hi Ben,

 

That makes sense now, thanks a lot. So because I'm using the "run continuously" button to run my VIs for 5 seconds, they have to start up and exit every time. So the slower functions would have less iterations and subsequently a larger VI Time.

 

Thanks again. 

0 Kudos
Message 3 of 4
(2,753 Views)

If you are using the 'run continuously' button for your VI, you coded incorrectly.

You could use timing functions to specify how long something should run, instead of pressing abort.

Cory K
0 Kudos
Message 4 of 4
(2,733 Views)