LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Encoder Speed and Direction Reading with NI 9411 and cRIO-9073

Hi, I have an application where I have to read an encoder data and determine speed, direction and amount of rotations in order to make some calculations. I am using a cRIO-9073 and an NI 9411 c series module to connect my encoder. THe encoder that I am using have CHA, CHB, CHI, VCC and GND. I connect CHA to pin 1 of NI 9411, CHB to pin 2, CHI to pin 3, VCC to pin 4 and GND to pin 12. The encoder is an optical encoder. I am able to see the pulse of the different channels (A, B and I) going on and off in distribute system manager.

 

The thing is that I am not familiar with encoder and motion systems and I don't know what kind of functions or logic to start working with in order to dtermine speed, direction and amount of rotations using this encoder. I noticed that the NI 9411 can be configure for counter, quadrature or none. I don't even know what should be the best configuration for what I am trying to do. If someone have some advice, example vi, reference tutorial or something that can help me to achieve my goal with this application, I will appreciate it. Thanks a lot for your always support guys!

Ferdinand Martinez
FMO Automation LLC
0 Kudos
Message 1 of 5
(8,206 Views)

I am not familiar with your system but usually there are 6 wires for encoders. Usually something like (A,A/), (B,B/), and (index, index/). Have you considered a dedicated motion board that reads the encoder for you? Something like a PCI-7344?

 

Here are some articles that might help with interpreting the encoder signals.

 

http://zone.ni.com/devzone/cda/tut/p/id/7109

 

http://quantumdevices.wordpress.com/2010/02/22/why-use-an-optical-quadrature-encoder-for-a-motor-enc...

 

Perry

0 Kudos
Message 2 of 5
(8,203 Views)

Have you run a search on this forum for "9411 encoder"?  You may turn up some useful documents such as these:

Quadrature Encoder Velocity and Acceleration Estimation with CompactRIO and LabVIEW FPGA

How Do I Use a Quadrature Encoder with My Data Acquisition Board?

You have a quadrature encoder (because it has both A and B lines) so that's probably the mode you want to use.  Sounds like you have the wiring working since you can see the pulses, so you just need some logic.  It's pretty straightforward (and easy to test in a non-FPGA VI, just put some buttons on a front panel representing the control lines), or you might find an example if you poke around enough here.

0 Kudos
Message 3 of 5
(8,199 Views)

Thanks alot for your support guys,

 

I do a search for NI 9411 in the forum but didn't get something that I could relate with what I need to do. I will start checking your reference articles to see what I can do.

 

nathand; a quick look at the article that you refer me about the quadrature encoders in FPGA look like the way to go. I haven't done anything in FPGA so I will have to make more wide and deep research but it give me some light.

 

Thank you guys!

Ferdinand Martinez
FMO Automation LLC
0 Kudos
Message 4 of 5
(8,187 Views)

Go into your project explorer, pick the 9411 module, click properties, Specialty Modes, and select quadrature from the combo box.

 

This will give you 4 "signals" from the 9411: position 0, speed 0 (for your encoder connected to 1,2,3,4, and 12), and position 1, speed 1 (for channels 3,4,and 5). For the positions, you can click properties to calibrate for example mm (instead of non-scaled tic counts). You need to know the encoder specs so you can define how many tic counts per mm of travel (or count per revolution, if angular encoder).

 

I am still trying to get my "speed channels" to work. NI is trying to tell me if the speed reported is tics/secong, or tics/timing period (which is selectable in the configuration).

 

Hope that helps.

 

Randy

0 Kudos
Message 5 of 5
(8,077 Views)