08-01-2011 06:17 PM
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
08-02-2011 10:55 AM
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!
08-02-2011 10:59 AM
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