09-02-2011 08:36 AM
Falcon9a,
Exactly what DAQ hardware are you using?
09-02-2011 09:06 AM
That would explain the missed voltages 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
09-02-2011 09:28 AM
Ok, I think I'm geting there! 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?
09-02-2011 11:21 AM
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.
09-02-2011 01:53 PM
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.
09-02-2011 09:00 PM
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.
09-02-2011 09:07 PM
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!
07-16-2012 10:40 AM
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.