Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

Position measurement with 9401 and quadrature encoder

I am having trouble implementing a quadrature encoder for a linear position measurement using a NI 9401 module and a cRIO-9040 chassis.  

 

I currently have channel A wired to pin 14 and channel B wired to pin 17. My 5 VDC supply is from an external 5VDC power supply.  I have done the 'Specialty Digital Configuration' through my project > chassis > module > properties and selected 'Quadrature' as the specialty mode.  When I read the created Position 1 shared variable, the value is only ever 1 or 0.  The Position 2 shared variable seems to do nothing.

 

I have confirmed through a MAX test panel that PFI0 and PFI2 both register edge counts.

 

What am I doing incorrectly or have configured inadequately that I am getting a binary value for Position 1, or is this to be expected?  I was anticipating this would be some count value that would either increase if A led B, or decrease if B led A, and that I would only have to scale this value to a useable distance.

 

Thanks in advance. 

0 Kudos
Message 1 of 2
(877 Views)

Extremely sorry for bumping this 3 year old thread. I am facing a very similar issue when trying to use the NI 9401 module with my cRIO-9035 chassis for quadrature encoder measurements. I have the module setup the same way and my shared variable also behaves the same way.

 

Was a solution to this issue ever found? If so, can someone share it?

 

Thanks!

0 Kudos
Message 2 of 2
(93 Views)