From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how do i measure my each blocks running time

Solved!
Go to solution

Hi, guys


I am going to measure my each major blocks running time, the are totally five major blocks in my final VI, the last four of them were in a while loop

 

Thanks

0 Kudos
Message 1 of 3
(2,052 Views)
Solution
Accepted by topic author huskerli

What exactly do you mean by a "block"?  Is it a subVI, LabVIEW primitive, some chunk of LabVIEW code?

 

You can use multiple Tick Count functions.  If you place your code in a flat sequence structure with Tick counts in frames in between, you can subtract values from each other and get the relative time of each piece of code.

 

Why are you worried about the execution time?  Are you having particular timing problems?  Most LabVIEW primitives will run so fast, you'll probably see no or very little change in the tick count before and after them.

 

Here is an example to show how to measure the execution time for one section of code.

0 Kudos
Message 2 of 3
(2,045 Views)

Thank you for you response.

 

The block means some chunk of LabVIEW code.

 

The reason I am worry about the execution time it is because I am testing someting regard to lighting LED and Camera capture the image.

Before the LED lights up, the camera already captured the image, I want to know how long it take for my LED be ready, so I can tell which parts of

data are right.

 

Best

 

 

0 Kudos
Message 3 of 3
(2,033 Views)