03-25-2016 04:42 AM
Hello,
I'm new to Labview. I'm trying to measure the speed of a motor using a rotary encoder coupled to the shaft.
There I use DAQ Assistant to acquire counter input which gives me the frequency of rotation. Then I just multiply 60 to get the speed. That's fine and works well.
But, when I save the data using write to measurement, I get only 4-5 samples per second. Whereas, I need at least 300-400 samples per second. Even if I run from the DAQ Assistant setup I can see that the update rate is very slow.
I'm using a 9401 in slot 5 on a cDAQ-9188 chassis. I have attached figures of my configuration.
My deadlines are closing in, any help is appreciated.
03-25-2016 06:44 AM
@priteem wrote:I get only 4-5 samples per second. Whereas, I need at least 300-400 samples per second.
You need to learn about reality here and the fact that it takes time to take a measurement. You have a range of 10mHz to 30Hz. This means that it should take between 33ms and 100s to get a pulse.
Assuming you are getting 4S/s, then each measurement is taking 250ms. So the counter just counts how many pulses it sees in that 250ms and gives you a frequency reading from that. That is just how the measurements work.
03-25-2016 11:43 AM
Well, thank you for your answer.
I'm using a rotary encoder which gives me 2500 pulses per revolution. Is there any way I can use Labview to get the average frequency every 100 pulses or so? I mean 100 pulses should be enough for measurement.
This would be a great help.
Thank You.
03-25-2016 01:00 PM
@priteem wrote:I'm using a rotary encoder which gives me 2500 pulses per revolution.
So with you measuring 30Hz, that is a rotation rate of .012 rotations/second (~83 seconds/rotation). That is one really slow motor.
Perhaps we should take a step back here. How fast should the motor be rotating?
03-25-2016 01:03 PM
@priteem wrote:I'm using a rotary encoder which gives me 2500 pulses per revolution. Is there any way I can use Labview to get the average frequency every 100 pulses or so? I mean 100 pulses should be enough for measurement.
Averaging over 100 pulses at 10mHz takes an awfully long time. Could it be you are talking about MHz (Mega, not milli?)
03-26-2016 12:53 AM
Actually, what I'm measuring is the speed from steady state (say, 1500 rpm) to rest (that's 0 rpm). Labview doesn't allow me for measuring 0 rpm so I thought keeping something between 1800 rpm (30 Hz) to 0.6 rpm (10m Hz or 0.01 Hz). And when going down I need the highest resolution possible so that I can do post analysis such as FFT.
Well, I don't know if it's the correct way. Your thoughts would be valuable.
03-26-2016 08:05 AM
So your motor is turning at 30 rev/s. If you are getting 2500 pulses in a rev, then you should be measuring a frequency of 75kHz. With that in mind, I would probably set your lower limit to be 1kHz.
03-26-2016 11:53 AM
When my motor is rotating at 1800 rev/min ( 30 rev/sec), the DAQ Assistant gives me 30 Hz. I don't know how Labview does it internally!
( while setting up DAQ Assistant I do this: Acquire signal>> counter input>> frequency>> select device)
I have nowhere specified that my encoder gives 2500 pulses/ rev. And I never bothered about that.
I'm not strict about my range of input values. I just tried them. If you could suggest me any range, I can happily try that.
But the problem is if Labview can show me the correct frequency then why not with a higher resolution.
03-26-2016 03:17 PM
@priteem wrote:When my motor is rotating at 1800 rev/min ( 30 rev/sec), the DAQ Assistant gives me 30 Hz. I don't know how Labview does it internally!
( while setting up DAQ Assistant I do this: Acquire signal>> counter input>> frequency>> select device).
Then you are NOT getting the 2500 pulses per revolution. You have a 1/rev. In that case, you are stuck with what you have. If you were really getting the 2500 pulses/revolution, then you could do some changes to speed things up.