LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

stopping lap time

Hi all

 

I've a problem in the posted program......

I need to stop the lap time when the lap progress is = to 0 ( when the indicator is on 10) only once time per lap !!!!

1 lap progress => 1 lap time

At the moment I feedback a lot of lap time because the VI's continue stop the time during all the duration of the transaction.... Please help me!!! 

 

0 Kudos
Message 1 of 4
(2,228 Views)

I don't understand what you are asking for, but here are a couple tips that would help you with your code.

 

1.  Initialize the shift registers.  If you don't, the value coming out of them on the first iteration of the while loop will be whatever was put into it the last time the code ran.  So in effect, you might get a different result depending on whether the VI has run before or not.

2.  Don't do a comparison of doubles with zero.  At least nothing where you expect it to be exactly equal to zero.  You have two time stamps, an initial time stamp plus some seconds, and the current time that you subtract from each other which you then compare to be less than zero.  Since it is unlikely the subtraction will ever be exactly zero, it could be slightly more or slightly less, you may wind up with one more iteration than you expected.

0 Kudos
Message 2 of 4
(2,221 Views)

I don't understand very well..... could you modify my VI?

 

Thanks

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

See if this explains somewhat.

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 4 of 4
(2,197 Views)