From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Can't read encoder fast enough

Hello

 

I'm using the USB-6341 to read the pulses from a rotary encoder. I got this working. The datasheet
of the rotary encoder says that the the encoder can detect somewhere near 6000 rotations a minute. But when I increase the
encoder's rotation speed, to increase the round's per minute, my lab view program stops detecting the pulses.

It is possible to rotate the encoder faster, this is tested with another product.

I tried a few thing. I tried to change the acquisistion Mode to N Samples and change the Clock source to 20Mhz Timebase. When I did this
I got errors saying that the the USB-6341 does not have enough memory and that my program isn't reading the data fast enough.
So I tried to increase the samples my program reads per loop, but this only gives another error saying I don't have
enough memory on my computer. I also tried 10MhZRefClock with the same result.

Is wat I want nog possible with the USB-6341, or is it possible with changes to my block diagram.

 

I used the Counter - Read Encoder (continues clock) example VI to test the encoder.

 

Thank in advance for the help

Download All
0 Kudos
Message 1 of 2
(3,855 Views)

It sounds like you need to increase your sampling rate, 20MHz is likely a bit too much.  When it was working at slower speeds what was the sampling rate of the encoder?    I've seen other examples where the clock source would be something like an AI source reference, and then start an AI task at the specified clock rate you want.  I'd look at other examples online, and see if there is a different example in the example finder that shows what you are trying to do I remember there being several but mostly sharing the same technique.

0 Kudos
Message 2 of 2
(3,785 Views)