LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to time a segment of code

Solved!
Go to solution

I've got a case statement inside a while loop, and I need to know how much time it takes to run (in ms)

 

I tried using :"Tick Count," but both the tick count before and after the case statement are giving the same time, even though the one after the case is in its own case statement box.

 

I'm sure there's an easy way to do this, and someone with infinite wisdom will disclose it to me 🙂

 

Thanks

0 Kudos
Message 1 of 7
(3,499 Views)
Solution
Accepted by topic author bobholmgren

Here are three ways mentioned.

I think this one is the coolest:

Timer2.png

One thing to notice is that 'Tick count' has a resolution of 16 ms on most OS's.

 

Ton

Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
Message 2 of 7
(3,485 Views)

I created a little function that starts a timer and reads the elapsed time. Start it before yout loop and put the read outside, with a line inside the loop so it will not start before the loop is finished. In LabVIEW 2009.

Message 3 of 7
(3,483 Views)

 


@TCPlomp wrote:

Here are three ways mentioned.

I think this one is the coolest:

Timer2.png

One thing to notice is that 'Tick count' has a resolution of 16 ms on most OS's.

 

Ton


 

How exactly do I go about doing this?

0 Kudos
Message 4 of 7
(3,479 Views)

I figured it out

0 Kudos
Message 5 of 7
(3,475 Views)

 


@bobholmgren wrote:

I figured it out


or maybe not, I don't see a pulldown menu on the right. I'm in Labview 7.1

 

0 Kudos
Message 6 of 7
(3,464 Views)
Message 7 of 7
(3,458 Views)