LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

some help with timing

Solved!
Go to solution

 

Hi,

 

I have a little timing issue in my VI.... I know there is a lot about timing in this forum but I couldn't find what I'm looking for.

This is what's going on, I want to know the time when the calculations done inside the for loop reaches 3,14322 volt. Now I have the problem that the timer starts when the value of the calculations is equal or higher then 3,14322 volt, but it does not stop immediately it stops when the for loop is ready with the numbers of iterations. I tryed the equal component but that does not work. Can someone help me??

Thanks in advance!!

 

Regards Matt

 

timing issue.jpg

 

 

 

0 Kudos
Message 1 of 3
(2,397 Views)
Solution
Accepted by topic author Matt V

 

I think the attached VI will give you the behavior you're looking for.  It will compute the elapsed time each iteration until a boolean is true.  If all you want is to display the value, this will work, if you need to pass it to something after the loop, then look at using a shift register.

 

A few comments:

 

This will give the time of the last false to true transition of the boolean before the loop ends.

 

Be careful using the Tick Count (ms) function for timing calculations.  This count will wrap from a very large number back to 0 about every 49 days (assuming the computer isn't restarted) so the possibility, although remote, exists that the subtract will return a large negative number.

 

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

Thanks a lot! I used it and it is working now! I only needed to solve the 'problem' with the case selector, but that is okay now.

Thanks!

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