Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

6602 for newbie

I'm trying to get quadrature encoded signal from 10 signals using 2 6602 counter cards to measure linear position . Is 6602 able to store the total count number until I give a command to retrieve the total number of pulses or do I need to constantly send a command to tell it to keep reading the pulses?

Any help in technical know-how of this card or any programming language would be good. Thanks in advance
0 Kudos
Message 1 of 7
(5,785 Views)
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.
Message 2 of 7
(5,782 Views)
Thank You , its a lot of good information. Currently I have connect as single ended connection but as you said , seems to enconuter some noise. But the lost of pulse is about 2 pulses in reading error. In the software, there is this filter that can set for 100kHz, 500kHz, 1MHz and 5 MHz . From your experience, does this help?
0 Kudos
Message 3 of 7
(5,767 Views)
All my encoders are used in industrial environments therefore they where all purchased with differential outputs. I have never had to use the 6602 filters with these encoders because the differential communication technique is very good. Filters generally reduce signals but in your case you say you are missing counts. If you decrease the filter cut-off frequency you will only loose more counts and I don't believe this is the answer. If you remove the filters will you gain counts. That is, when your encoder is stationary are your seeing position changes?
0 Kudos
Message 4 of 7
(5,756 Views)
Thought of something else you could try.

Compare the count of a known distance at different speeds. Measure the distance at high speed and then measure it again at low traverse speed. The counts should be the same. If they are the same and your still missing counts then I believe your encoder is in error. If they are different then you have at least 2 possibile problems. 1) If the count is less at high speed then you may have exceeded the maximum encoder speed. 2) You may have a communication error.
Message 5 of 7
(5,745 Views)
hello,
 
thus any one have an VI to read from the PCI 6602 an encoder signal?
 
regards
0 Kudos
Message 6 of 7
(5,335 Views)
You probably already have one. Under Help/Find Examples/Search type in encoder and see what comes up
~~~~~~~~~~~~~~~~~~~~~~~~~~
"It’s the questions that drive us.”
~~~~~~~~~~~~~~~~~~~~~~~~~~
0 Kudos
Message 7 of 7
(5,331 Views)