Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

Increase rate of frequency measurement

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.

Download All
0 Kudos
Message 1 of 9
(5,017 Views)

@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.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 2 of 9
(5,007 Views)

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.

0 Kudos
Message 3 of 9
(4,991 Views)

@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?


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 4 of 9
(4,986 Views)

@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?)

0 Kudos
Message 5 of 9
(4,984 Views)

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.

0 Kudos
Message 6 of 9
(4,959 Views)

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.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 7 of 9
(4,947 Views)

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.

0 Kudos
Message 8 of 9
(4,940 Views)

@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.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 9 of 9
(4,934 Views)