05-17-2016 04:05 AM
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.
Solved! Go to Solution.
05-17-2016 04:31 AM
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…
05-17-2016 04:41 AM
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.
05-17-2016 05:00 AM
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?
05-17-2016 05:06 AM
I will be phoning them now, thanks for your help
05-17-2016 05:46 AM - edited 05-17-2016 05:46 AM
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.