Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

Is the PCI-6251 card capable of reading two encoders at the same time?

Are you equating "quadrature" with "has a z-index signal?"  They aren't the same thing.

Quadrature would mean that the encoder puts out 2 channels of square waves that have a phase shift of 90 degrees (1/4 of a single square wave period).  The phase shift is what allows the counter hardware to correctly interpret the direction of rotation.

In an earlier post you expressed concern that your encoder tasks weren't properly detecting direction.  This generally implies the use of a quadrature encoder.  If your encoders don't put out quadrature, then by what means were you hoping/expecting direction to be determined?

Further note: the z-connection isn't required in order to use the "position" modes.  One of the configuration inputs designates whether or not to enable z-indexing and I *think* that the default unwired setting is NOT to use it. 

Hoping to help,

-Kevin P.

 

ALERT! LabVIEW's subscription-only policy came to an end (finally!). Unfortunately, pricing favors the captured and committed over new adopters -- so tread carefully.
0 Kudos
Message 11 of 13
(1,593 Views)

Kevin P,

Thanks for the response.  Yes, my encoders are quadratures.  I have a channel A and channel B that put out square waves that are 90 degrees apart.  And yes, I agree that the z-index signal is not needed to sense position.  We were able to have the program sense direction before when we were reading just one encoder.  However, when we are reading two encoders, such as the program in a couple responses back titled "Count Digital Events 2", we are unable to figure out how to modify it to also sense direction.

I changed the mode on the DAQmx Create Channel from CI Count Edges to CI Angular Encoder and the program still couldn't sense direction. 

Have any more suggestions?  I was thinking of taking some pictures of my set up and posting them up so people can see what I'm doing. 

Makotoz

0 Kudos
Message 12 of 13
(1,530 Views)
HI Makotoz,
 
First in hardware, you will need to connect the A&B phases of your two encoders to your two counters.  In general phase A connects to your SOURCE and phase B connects to AUX. 
 
After you have your hardware connected, try measuring one at a time to confirm your hardware setup.  You should be able to use "Measure Angular Position.vi".  Select one counter, and the appropriate type of decoding (I am using Two Pulse Counting).  Test both counters individually.  Once you have this working you should be able to save a copy of the example and duplicate the code to read both counters at the same time.  By duplicate I mean create and start both tasks, read both counters in the same loop and then clear both tasks.
 
Test this out, and if you are still having problems you could post a screenshot of the block diagram.
 
Regards,
Jennifer O.
0 Kudos
Message 13 of 13
(1,511 Views)