05-31-2012 02:49 AM
05-31-2012 02:59 AM
Hello,
What hardware do you have? If you have something that has counter inputs maybe it will be easier to get the periods.
Otherwise we'll do with the analog signal.
Trying to help
We have two ears and one mouth so that we can listen twice as much as we speak.
Epictetus
05-31-2012 03:09 AM - edited 05-31-2012 03:15 AM
Hi,
If you can measure the pulses and get it into LabVIEW, there are no problem counting the RPM.
This example needs tweeking to work correct. If your array starts in the middle of a positive period it will fail. The example was just ment as a quick way to get you started.
05-31-2012 03:28 AM
Hi Even Deejay,
Could you please attach the files in labview 2010 version? Because there are still some components that new for me.
I dont´t really get the logic of your calculation, why u got the samples lower than -5 and bigger than 5 and then subtract it?
And one more question is Can we do this in continuous data acquisition ? Because my task is to record the RPM of a motor that can slower or faster at any time.
Best regards,
Citras
05-31-2012 03:31 AM
Hi TiTou,
I am using dt9804 and it not support counter frequency / period inputs.
And we need to find a way to measure it with analog signal.
Best regards,
Citra
05-31-2012 03:48 AM - edited 05-31-2012 03:49 AM
The logic behind the calculation:
Find the first sample that is higher than 5 in amplitude (signal is high). Then find the first next sample that goes below -5 (signal is low). If I substract the two values I get the number of samples bewteen when the signal went high and when it went low, in other words; the number of samples where the signal was positive. Since it's a square signal, I simply multiply it by two to get the full period (signal is high and low). By knowing my sample rate and total number of samples I can easily calculate the time.
You can do this in continuous mode, but you would have to change the code a bit. Maybe looking at 500 ms of samples at a time and then calculate it. I would suggest the Producer/Consumer architecture. You will then have one while loop that get the measured data and one while loop that does the calculation.
05-31-2012 08:01 AM
Use Pulse Measurements.vi. It is in the waveform measurements palette.