LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Hardware for reading an incremental encoder

Solved!
Go to solution

I have been investigating wether I could use the NI USB 6002 to read an incremental encoder.

 

I have an encoder  that has 1000 pulse per revolution and will be using this to measure crank angle position on an engine. 

 

The engine will be turned over by hand so rotation will be approximately 1 revolution per second. 

 

X1 encoding is OK for the resolution of measurement I require, however I think I need to be sampling the DIO at 2000Hz. Am I missing something or should I bin the USB6002 and go for some real time hardware? 

 

The blocker for me at the moment is that I cannot sample more than one value per loop iteration according to MAX and the maximum loop frequency in a desktop application is 1kHz.

 

I have been looking here for advice : http://www.ni.com/tutorial/7109/en/ and can see that the cDAQ may be able to do what I want.

0 Kudos
Message 1 of 6
(4,155 Views)

Hi Lego,

 

you should define your (measurement) requirements with more details!

How fast/accurate you need to know the crank angle? With 1rev/s and 1000 ppr you would need to read the USB6002 atleast with 1kHz to get every pulse count: this is very hard to reach with this cheap USB hardware with its basic "one sample on request" read mode - and also hard to reach due to Windows jitter…

 

Anyway: instead of "standard" DIO you should use the counter of your USB6002 (aka PFI0)! It will count the pulses independently from your VI and all you need to do is read the current count value…

Best regards,
GerdW


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

Hi GerdW,

 

Thanks for the advice regarding the Counter, I just wired this up and had a play. However this counts rising edge in the forward and reverse direction. During engine build we will need to find TDC of a piston and wiggle the crank shaft CW and CCW to check the timing so I will definitely need more than one counter for this tasks

 

In our cRIO system with FPGA we are achieving the encoder measurement using a 100kHz loop that calculates the encoder position. Then the encoder position is sample at 1kHz in Realtime.

 

I was hoping that I could use something a little cheaper to achieve this measurement. 

 

 

0 Kudos
Message 3 of 6
(4,140 Views)

Hi Lego,

 

your USB6002 is apparently too cheap for this task!

It has a simple up-counter, slow DIO channels, rather slow AI channels, no external triggering for AI channels (apart from start trigger) - compare again with your requirements…

 

Did you call your local NI sales guy to have them suggest some suitable hardware?

Best regards,
GerdW


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

I will be phoning them now, thanks for your help Smiley Very Happy

0 Kudos
Message 5 of 6
(4,124 Views)
Solution
Accepted by david.ball

As far as USB devices are concerned I think one of the cheapest which contains counter/timers that support quadrature encoders would be the USB-6211. As plugin card the counter/timer digital IO card PCI-6601 would work too.

Rolf Kalbermatter
My Blog
0 Kudos
Message 6 of 6
(4,114 Views)