Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

Quadrature Encoders and NI-MAX

Solved!
Go to solution

I am using the NI 6259 DAQ to read a quadrature encoder.  The datasheet for the 6259 states that any PFI designated channel can be used as a counter/timer; however, there are only two channels that seem to work.  When I set up one of the other PFI channels, the encoder read out on NI MAX changes from 0 to 36m, but nothing in between.  It appears to be set up exactly the same as with the two channels that work.  Any suggestions on what I could be missing?  Are not all PFI channels created equal?

0 Kudos
Message 1 of 6
(3,298 Views)

Hello jsholl :

As fas as I understand your issue is related to the number of clocks on the NI-6259. See the page 13 from the attached link:

DEVICE SPECIFICATIONS NI 6259

http://www.ni.com/pdf/manuals/375216c.pdf

0 Kudos
Message 2 of 6
(3,268 Views)

I understand that the number of counters is limited to 2 on the 6259.  In the documentation, it states that any PFI channel can be used as input for the counter.  When I attempt to change which PFI channel is used for the encoder set-up, it still seems to act like a digital input instead of a counter.  Is there something special I have to do to designate the channel as a counter? 

0 Kudos
Message 3 of 6
(3,263 Views)

It appears I need to change the default NI-DAQmx counter terminals.  Right now CTR 0 A is set as PFI 8 (Pin 37) and CTR 0 B is PFI 10 (Pin 45).  I want CTR 0 A to be PFI 14 (Pin 1) and CTR 0 B to be PFI 12 (Pin 2).  How can I change the default set-up?

0 Kudos
Message 4 of 6
(3,257 Views)

This post shows how I did it in labview:

https://forums.ni.com/t5/Multifunction-DAQ/quadrature-encoder-based-triggering/m-p/3128787#M85838

 

I don't know if you can change the PFI terminals in MAX, at least for me they're hard coded to defaults.  It's easy to do in labview/c/.net though using the A/B/Z inputterm settings.  

0 Kudos
Message 5 of 6
(3,249 Views)
Solution
Accepted by topic author jsholl

We were able to fix the problem in our VI.  A staff member remembered it was referenced in the VI.  Once we changed the channel referenced to the desired one, we were able to read the encoder.

0 Kudos
Message 6 of 6
(3,222 Views)