Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

How to connect a quadrature encoder to PCI-6221 DAQ (37 pin)

Hi all,
 
I want connect a quadrature encoder to my PCI-6221 (37 pin) M seriers DAQ. 
My encoder has 8 pins (+v, GND, -A, +A, -B, +B, -Z, +Z).  How should I connect these pins to the connection box of my DAQ? so that I can read the encoder through the couter channel.  
For some reason, I have to use MabLab Simulink as the interface.  Any easy way to do it?   Do I need extra circuit for this?
 
Thank you for any answers.
0 Kudos
Message 1 of 6
(6,496 Views)

You can see the wire diagrams on the product manual of the card : for example, for the counter0 :

pin +A on the pfi0 (pin 13 of the card)

pin +B on the pfi2 (pin 33 of the card)

pin +Z on the pfi1 (pin 32 of the card)

I don't know the link with matlab, but it's very easy to use a quad encoder with labview.

Regards

Wilfried.
0 Kudos
Message 2 of 6
(6,486 Views)
I forget : you must put a power supply voltage between +v and GND (see the product manual of the encoder, maybe the +5V available on the card)
Wilfried.
0 Kudos
Message 3 of 6
(6,484 Views)
Wilfried,
Thanks a lot for your reply.
So, I can just ignore the -A, -B, -Z ? (leave them open?) .  
 
For the signals obtained from pin 13, 32, 33, do I need some manipulation to convert them into the count signal?
 
Thanks again.
0 Kudos
Message 4 of 6
(6,478 Views)

If you are using the 6221 (37 pin) I do not see A-, B- and Z- in the pin out.  The 6221 pin-out shows that A (pin 13) is the counter source.  This is the what you connect the signal you are attempting to count.  Z (pin 32) is the counter gate.  When the gate signal is high, the signal connected to the source will be counted.  B (pin 33) is the Aux line.  This line determines whether the counter increments or decrements.  See the chapter 7 of User manual for this device to further understand what type of counter operations are possible.

I hope this helps.

Message Edited by Ima U on 11-01-2007 04:54 AM

Regards,

Ima
Applications Engineer
National Instruments
LabVIEW Introduction Course - Six Hours
Getting Started with NI-DAQmx
0 Kudos
Message 5 of 6
(6,450 Views)

Just adding a small correction: for the specific case of encoder position measurement, the Z signal connected to the counter gate doesn't work as described by Ima in the last post.  The Z signal of a rotating encoder will be a single narrow pulse that repeats at the same shaft angle each revolution.  The counter task may be programmed to force the angle measurement to reset to 0 on each of these pulses -- some apps prefer a relative angle rather than tracking continuous rotation.

So, in encoder position measurement, the A and B signal transitions determine whether the count increments or decrements.  The Z pulse may be ignored or it may be used to cause the count to reset to 0.   (Technically, you could reset to some other value if desired, but this is less common.)

-Kevin P.

ALERT! LabVIEW's subscription-only policy came to an end (finally!). Unfortunately, pricing favors the captured and committed over new adopters -- so tread carefully.
0 Kudos
Message 6 of 6
(6,437 Views)