10-26-2005 02:28 PM
10-27-2005 02:32 PM
Hello Wayne,
Take a look at the Count Digital Events.vi shipping example. You can find this in LabVIEW by selecting Help >> Find Examples... then browsing to Hardware Input and Output >> DAQmx >> Counter Measurements >> Count Digital Events.
If you set the "Count Direction" control to "Externally Controlled", you will be able to count up and down depending on which direction you rotate your encoder. Make sure you wire Phase A to Ctr0 Source and Phase B to P0.6. P0.6 is the up/down line for counter 0.
I hope this helps. Please let me know if you have any further questions.
Regards,
Sean C.
10-27-2005 03:58 PM
Thanks Sean,
I feel a little bit like an idiot, yes i can laugh at myself....
When I origionally tried the VI you suggested above, it didnt work properly. However, after reading your post, I realized I was hooked into the PFI6 and not the DIO6 or P0.6 as you suggest. It worked fine. I will play with it to get the proper value when the count goes neg, right now its a very large number.
do you have any suggestions toward the filtering question I originally posted?
Thanks,
Wayne
10-27-2005 04:07 PM
Hi Wayne,
I apologize... I forgot to respond to your filtering question.
All counting is done in hardware, so using a filtering VI in software would not help in this case. To stabilize your encoder signals, you will have to pass Phase A and Phase B through hardware low pass filters before connecting them to the counter source and P0.6. You will need to build your own external filters to clean up your encoder signals.
I hope this helps. Please let me know if you have any further questions.
Regards,
Sean C.
10-27-2005 04:49 PM