LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Measuring time between pulses to find velocity

Falcon9a,

 

Exactly what DAQ hardware are you using? 

0 Kudos
Message 11 of 18
(1,624 Views)

That would explain the missed voltages Robot Happy how do make the DAQ assistant output an array instead of a scalor quontity?  Seconds is fine, if I can get ft/sec then I can get mi/h.  I am passing the accumulated time straight through the false statement.

 

I'm using a NI 9229.

 

Thank you for your help

0 Kudos
Message 12 of 18
(1,620 Views)

Ok, I think I'm geting there! Robot Very Happy  I used a 1 D array of scalars entered into the min/Max and now I'm getting multiples for solid time in seconds!  I assume I can increase the accuracy (turn it into ms measurements) by increasing the rate and then changing my "1" into 1000?

0 Kudos
Message 13 of 18
(1,614 Views)

Congrats. You're rate @ 25kHz is pretty darn high. What you want to do is decrease your Number of Sample to say 1000 then divide 25k by 1k. Your sample time is now 1/25 sec. Replace your "1" sec. with "1/25" sec. Convert into ms if you wish.

0 Kudos
Message 14 of 18
(1,608 Views)

Ok, now that I changed the counting time all I seem to get is time = 0 and velocity = 314.59 wich seems like it's only counting the time once.  I tried switching to ms but the same thing happended, it would change for a flash to another number when the voltage spiked but then go back to equaling 100  (wich was the number on the left at the time.9-2 1.png

0 Kudos
Message 15 of 18
(1,597 Views)

Your time indicator needs to be a Double, not an integer. That likely explains the 0 velocity. Your velocity indicator needs to be in the True statement, like where Velocity (ms) is. Velocity 3 makes no sense. Let's see your false statement. Maybe that will help us.

 

0 Kudos
Message 16 of 18
(1,589 Views)

Wait, I know... You need to condition that True statement so that it only measures a rise from 0 - 10V. Right now it's recalculating whenever the signal is high. Find a way to recognize when the signal goes from Lo to Hi and make that the True condition. Hint: use the Min part of that Min/Max call and their indexes. Good luck! 

 

0 Kudos
Message 17 of 18
(1,586 Views)

Does anyone know how to do the same but without an NI DAQ? (without DAQ Assistant)

 

Personally I'm using Arduino, and I would like to measure how fast I am pressing a button (or a light sensor is being interrupted). I already could see a square wave, and I could count the edges, but I can not figure it out how to make an average of the edges to have a speed measurement.

 

Assuming that I am perfectly able to count the edges, does anybody have an idea to do this?

I think it can be counting the numbers of rising edges that occurs in 1 second and hold that value until I have the number of edges in the next second and so on.

Another way would be measuring the time (and holding it until next value) between two consecutive rising edges.

 

For anyone that can give a hand on this, suppose that I already have the counter or the edge detector working. I need the solution from there.

 

I really and sincerely appreciate any help any of you can provide.

DMDsync
0 Kudos
Message 18 of 18
(1,521 Views)