Motion Control and Motor Drives

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I read DAQ at every state change on a quad encoder over RTSI

I have successfully routed either A or B encoder phase to the DAQ card over RTSI, but this gives you 1/4 of your encoder counts to the DAQ. Is there a way to trigger the DAQ clock with both the rising and falling edges, A and B signals so you get a DAQ reading with every encoder count?
0 Kudos
Message 1 of 2
(3,108 Views)
mikema111,

From your explanation I am assuming that you are using an X4 encoder. Unfortunately there isn't a way to combine both Phase A and Phase B (rising and falling edges) into a DAQ scan clock without external circuitry.

However, one possibility would be to use a sort of XOR circuit to merge the two phases into one signal and then pass that signal into one of your analog input channels. You could then setup that analog input channel for windowed analog input triggering. As the TTL pulse rises through the window an AI Start Trigger pulse is generated and then another pulse is generated as it passes back down through this window. Pass the AI Start Trigger pulse into a counter setup for retriggerable single pulse generation and you will have your DAQ scan cloc
k on the output pin of the counter.

If you are just interested in counting the pulses in both Phase A and Phase B you can configure one counter to count on the rising edge and the other on the falling edge as described in the following Knowledge Base:
http://digital.ni.com/public.nsf/websearch/15170E05F0F4B65C86256E2400812CD9?OpenDocument

I also recommend reading the following document that discusses several different options when using a quadrature encoder with an E Series board (DAQ-STC).

http://zone.ni.com/devzone/devzoneweb.nsf/Opendoc?openagent&36BD71244BB26FC886256869005E541B

Ames
Applications Engineering
National Instruments
0 Kudos
Message 2 of 2
(3,108 Views)