Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

How to used USB-6211, two quadrature encoders, and a Z-index?

I am attempting to use a USB-6211 with two quadrature encoders (one rotary and one linear). The rotary encoder has a Z-index that I would like to use.

 

When I look at the 6211 connector pinout, I only find 4 counter inputs but I need five counter inputs (Rotary A, B, and Z; Linear A and B).

 

Is there some way that I can use the Z-index in this application?

0 Kudos
Message 1 of 8
(8,365 Views)

I attached the USB 621x User Manual that shows the counter pinouts on the device.  Review the section on Default Counter/Timer Pinouts (pg. 8-30) to find how to connect the Z-index.  The manual shows that it is pin 3/PFI2 for counter 0 and pin 2/PFI1 for counter 1.  If you are unsure how to set everything up, the two manuals linked below discuss counters in more detail.

 

NI USB-621x User Manual

https://www.ni.com/docs/en-US/bundle/usb-621x-manual/resource/usb-621x-manual.pdf 

 

DAQ M Series User Manual

https://www.ni.com/docs/en-US/bundle/pci-pcie-pxi-pxie-usb-62xx-features/resource/m-series-user-manu...

Regards,
Jordan F
National Instruments
0 Kudos
Message 2 of 8
(8,350 Views)

With 5 signals and only 4 inputs, there is not way to read all those signals for counter tasks. The closest with just using a 6211 would be to use an analog input an monitor the Z index, but you may not catch the pulse and would would have to use SW to correlate the data and set the Z index. I suppose if your angular encoder was only going in one direction you could do a count edges on A or B and use the Z index as a start trigger.  A better bet would be to move to a card with more input lines, either a 6212, 6216 or 6218 if you're looking for a bus powered solution.

 

Hope this helps, 

Andrew S

 

 

Message Edited by stilly32 on 02-02-2009 01:11 PM
0 Kudos
Message 3 of 8
(8,348 Views)

Jordan,

 

Thank you for your help.

 

I read through those documents a few days ago and I was not sure if I could use the Z-indez in my application above. Do you know something that Stilly32 and I are missing?

0 Kudos
Message 4 of 8
(8,335 Views)

stilly32 wrote:

would have to use SW to correlate the data and set the Z index.


Stilly32,

 

Thank you for your help.

 

What is SW?

0 Kudos
Message 5 of 8
(8,333 Views)
0 Kudos
Message 6 of 8
(8,331 Views)

I called tech support for help with this problem. To help the knowledge base on this forum, I have added tech support's response below.

 

This is Hunter from National Instruments and I wanted to get back to

on your issue with two encoders and the 6211. The device pinouts from

MAX show that the Counter 0 &1 A,B&Z inputs on the same PFI lines. The

lines listed in the table are only the default values, you can route the

inputs to any of the PFI lines.In order to set your own custom mapping use

a DAQmx Channel property node and select Counter Input»Position»A

Input»Terminal. I have attached a picture of how to create and configure

two counters, you will need 2 DAQmx tasks. Let me know if you have any

questions about this, I will be available tomorrow morning if you need to

call in or reply to this email anytime.

0 Kudos
Message 7 of 8
(8,284 Views)

After reviewing the USB-621x user manual I want to reiterate what Stilly posted on this forum.  He was correct in saying that the USB-621x has only four PFI Lines (PFI0-3) that are for inputs and four PFI Lines (PFI4-7) that are used for outputs.  These lines are unidirectional so you can not change this functionality.  This is stated in the USB-621x User Manual on Page 3-2.  So you will not be able to directly connect these two encoders with 5 inputs.  As was recommended above, the 6212, 6216, or 6218 would be good options to connect and use both counter tasks simultaneously.

 

USB-621x User Manual(refer to page 3-2)

https://www.ni.com/docs/en-US/bundle/usb-621x-manual/resource/usb-621x-manual.pdf

 

 

 

Message Edited by Jordan F on 02-06-2009 06:18 PM
Regards,
Jordan F
National Instruments
0 Kudos
Message 8 of 8
(8,270 Views)