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: 

FPGA on cRIO

Hi

I have a NI cRIO 9066 with 9401 modules which I am using to try and control a Pololu 100:1 Metal Gearmotor 37Dx57L mm with 64 CPR Encoder. I am trying to use the encoder outputs to calculate the angle/position. I have seen examples of angular encoders on DAQ devices. I am trying to find one to use it on FPGA. Are there any such options? I have attached a picture of a DAQ example I looked at. I also looked at other forum posts on this topic but they were not very helpful or I couldn't use the advice.

 

Thanks

Sid

0 Kudos
Message 1 of 4
(2,312 Views)

Hi sidpen,

 

AFAIK there are example VIs showing how to create encoder counters using simple DI pins with an FPGA.

You just need to check for rising/falling edges on your DI signals and use them to count the encoder pulses!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 4
(2,307 Views)

Hi GerdW

 

I did try to do just that and I have attached an image of the VI I used but I am getting wrong results. The image shows my two encoder inputs (DIO1 and 2) that I am counting to get total encoder pulses per revolution. But I am getting far more than the 6400 pulses I should be getting per revolution.

0 Kudos
Message 3 of 4
(2,304 Views)

Hi sidpen,

 

Have you seen this document, specifically #3 where it mentions configuring your encoder application on a cRIO?

 

It also mentions using DAQmx tasks, but this will not be possible with your cRIO 9066. That is a new feature offered with our 904x chassis, such as the cRIO 9045.

 

Let me know how that works for you!

Timothy D.
Applications Engineering
National Instruments
0 Kudos
Message 4 of 4
(2,267 Views)