08-11-2011 11:53 AM
Do you have some real data for use to see what your data looks like? That would help tune the back end of the program.
08-11-2011 12:09 PM
How many RPS do you expect for this system?
08-11-2011 12:12 PM
Are you only getting one Pulse for an RPM? How are you generating pulses for the RPM measurement? Sounds like a quadrature input to a high speed counter would be better. It also seems to me that you are going to want this loop measuring constantly.
08-11-2011 12:29 PM
I think this should get you closer
08-11-2011 08:13 PM
I agree with Tim,
Some other sensor would be better.
08-14-2011 11:56 AM
Hi NI was down for me so i couldn't log in to see replies.
Thanks for the help first of all.
Here is my VI with a signal generation subsitute for my DAQ. i know this is not an optimum setup and that a digital counter would be much better - but an anlog tachometer is what i have right now.
Attached is my VI. In the bottom right of my VI there is a for loop which i started. I found the sample/sec rate...and what I wanted to do was multiply it by the number of samples to get the time....but its not workign because I think the for loop runs too fast for what i want to do.
Like i said, ultimately, I want to show that between two 5 volt peaks is one revolution, and i would like to see how that angle changes with time.
Attached is the VI.
08-14-2011 12:02 PM
The system is running at about 8.3 hz (500 RPM) but can run up to 1000 RPM or as low as 200 RPM
08-15-2011 09:19 AM
Did you look at my code? I added your simulated code and it seems to give the correct answer.
08-15-2011 09:27 AM
I would also suggest that you move to continuous data acquisition. This would remove the time part that you are missing. The way I did it using your original code will work but there will be timing errors. A high speed encoder to a high speed counter that has quadrature input would be the best way to measure this. Especially if you are looking to do some sort of angle measurement.
08-15-2011 10:04 AM
OK I looked at your example a little closer. I think it will be easier than what you are making it. If I understand what you are doing you will get one pule everytime the sensor make one revolution. If I am getting 500 pulses in one minute thqan we are getting 500 RPM.
This new code should do what you want to do if everything that I assume is correct.