I have the PXI6602 running excellent on my system with linear encoder that output quadrature encoder signals. First, you must configure the vi to measure position not count. There is a sample vi called "Measure Angular Position" that gives you a basic understanding of the type of vi you may need. It is setup for angular position but it is easy to change it to linear position just by modifying the "DAQmx Create Virtual Channel" vi.
Connections on the Encoder
---------------------------
This gets a little tricky depending on what type of encoder output you have.
Type 1: Single Ended Connections
0V 0 Volts
5V 5 Volts (you may require more, this is totally encoder dependent)
A Phase A (ref to 0 Volts)
B Phase B (ref to 0 Volts)
Z Reference Mark (used to reset the counter IF you wish)
GND Shield for cable (may be required)
Type 2: Differential Output Connections
0V 0 Volts
5V 5 Volts
A Phase A
A(Not) Phase A Not (A and A Not are always 5V difference and represent Phase A Output)
B Phase B
B(Not) Phase B Not (B and B Not are always 5V difference and represent Phase B Output)
Z Reference Mark (used to reset the counter IF you wish)
Z(Not) Ref Mar Not (always 5V difference to Z)
GND Shield for cable (may be required)
The differential output encoders should be used in environments where voltages could be induced into the encoder cable cause erroneous counts. I recommend using this type of encoder output if you can. If you have single ended outputs and your system is counting without moving you may have an electrically noisy environment and you may need to switch to a differential output encoder.
Connecting A,B,Z From Encoder to Card
-------------------------------------
All of this information is on page 4-8 of the 6601/6602 User Manual
Single Ended: For Counter 0
A Pin 2
B Pin 40
Z Pin 3
Differential Output:
You can just connect A, B and Z like the single ended version but this won't help you in an electrically noisy environment. The idea behind using differential outputs is that any voltage induced into these wires are induced to all wires. So by measuring the difference in voltage one can determine if the transition in voltage has actually been made. So, how do you connect A and A(not) to Pin 2? Well, you must first build a little differential receiver circuit (it's not too hard just one IC). Use an AM26L32ACN or equivlaent. This chip has 4 differential to single ended receivers in it. You have one receiver for each output A, B and Z and one spare. If your interested in more info on this I will help out where I can. For industrial environments this type of connection is a must.