LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to measure time to zero speed

I am trying to measure the time it takes for a shaft to stop spinning from a certain RPM to zero RPM. My plan was to use a 1024 PPR encoder and feed the pulses into a counter/timer board. I was thinking of counting pulses in a while loop, sending the pulse count to a shift register, and then comparing the shift register value with the current pulse count. If the two values are the same I would get the value of a timer set up in the loop to calculate time to zero speed. I am looking for some assistance, if anyone has done this before or knows of a better way, please let me know.
0 Kudos
Message 1 of 2
(2,727 Views)
You must decide upon a timeout condition. This is the only way to determine if the shaft has stopped. Your plan is fine, just remember that loop time is never a definite thing. What I mean is that when calculating the time from one read of the counter to the next, Do NOT Assume that each loop time will be whatever your delay is, use a function like Get date time in seconds or for higher accuracy use Tick Count but beware of the timer looping back to zero after it reaches it's highest value (2^32)-1
0 Kudos
Message 2 of 2
(2,727 Views)