11-21-2024 09:06 AM
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.
11-21-2024 03:51 PM
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
11-22-2024 01:35 AM
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.
11-22-2024 08:33 AM
Do your really require a resolution of 40um? If not then perhaps select an encoder with fewer ppr as an alternative to upgrading your DAQ hardware.
-AK2DM