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.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Speeding up Quadrature Encoder Implementation in cRIO FPGA

Hi All,

 

I've got a bit of FPGA code here that I've been running on the cRIO 9073. We've been using 250/500 count quadrature encoders just fine with it, but have recently moved up to a 2000 count encoder and it seems to be missing counts. I'm not using a machine to rotate the encoder, just my hands. Is there anything I can do to speed up the operation of this loop in the FPGA?

 

Regards,

Ken

0 Kudos
Message 1 of 3
(2,366 Views)

Ken,

 

What if you tried using a single-cycle timed loop instead of a while loop and set the speed of the loop with an FPGA derived clock? Also, have you tried using the FPGA wizard to generate Quad Encoder code? To do this, right-click on the FPGA target in your project and select "Start FPGA Wizard". You can select a timing engine for Single Point Continuous and then a functions for Quadrature Counter. 

 

Hope that helps!

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

Rory,

 

I wrote this code about a year ago and the FPGA wizard wasn't available (to my knowledge!) I'll definately give this a try.

 

Regards,

Kenneth Miller

Erdos Miller

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