Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

Why am I having trouble reading linear encoder at higher rates of speed?

I am trying to read linear position using a rotary encoder rolling along a surface.  My setup seems to work just fine for linear speeds of up to about 385 mm/s, however speeds beyond that cause the position value to cease changing until the velocity is reduced again.

 

My setup currently involves using a cdaq-9185 expansion chassis and a NI 9421 module.  The quadrature encoder is 5000 pulses per revolution and connected to a wheel of 200 mm circumference.  This results in 0.00004 meters per pulse. 

 

I have attached an image of my code.

 

Given I can acquire good data at lower speeds I assume my issue is related to timing or the limits of the hardware and I am just not understanding something there.

 

I would like to measure substantially faster than I currently am able.  3 m/s would be great.

 

I would appreciate any explanation as to what I have overlooked.

0 Kudos
Message 1 of 3
(45 Views)

You might be up against a hardware limitation of the 9421.  The NI datasheet only specs a "delay time" of 100 usec without giving a sample rate spec.  Other searches on the site find less authoritative references to a 10 kHz sample rate limit, which is a 100 usec interval.

 

So I'm not sure, but that's the best guess I've got so far.  Your 385 mm/sec apparent failure point gives an encoder cycle rate of 9625 Hz, suspiciously close to the apparent 10 kHz spec limit.

 

 

-Kevin P 

 

ALERT! LabVIEW's subscription-only policy coming to an end (finally!). Permanent license pricing remains WIP. Tread carefully.
0 Kudos
Message 2 of 3
(22 Views)

With its maximum sampling rate of 102.4kHz, a NI-9361 would be able to interface your setup at speeds of up to 4m/s.

0 Kudos
Message 3 of 3
(6 Views)