Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

[Urgent!!] How to do quadrature decoding using DAQCard 6062E??

Hi,
 
I am Xiaofei, a beginner of LabVIEW. Now i am dealing with a project involving quadrature decoding by using DAQ Card 6062E and breakout board CB68LP. We need to use 2 optical encoders simutaneously, and for each encoder, we need to use 3 digital channels (A,B and Index), therefore there will be totally 6 digital channels in use.
 
We are planning to connect channel A to PFI3/8, and channel B to P0<6&7.. Is that correct? But now we have no idea how to connect our index channels. Is the gate channel on the card(PFI4/9) good for the index??
 
And I'm not sure if there is any existing VI that can help us with decoding, if there is,  could you please let me know how we can find it?
This is kinda urgent, i have to figure it out by tonight in order to keep my project rolling. So if you have any idea about it, pleeeeeeeeeease let me know!  Thanks a million!!!

Regards,
Xiaofei
0 Kudos
Message 1 of 4
(3,771 Views)

Your E-series board is NOT capable of true quadrature decoding internally, but there ARE ways to use it with a quadrature encoder.  There is a tutorial here giving you 2 possible methods.  The first method could be implemented today, but has some significant drawbacks as outlined in the tutorial.  The 2nd method is reliable but requires you to purchase or build some interface circuitry.

-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 2 of 4
(3,768 Views)
Hi Kevin, Thank you for your reply!!! It's helpful.
 
Now my question is: we want to use index channel of the encoder, but we don't know which channel on the board we should connect it to. Should we use the channel GATE(PFI4/9)?  And for the UP_AND_DOWN channel we connect our channel B to, do we need to mention anything about it in our code? or the direction can be taken into account automaticly??  Thanks a million!!!
 
Xiaofei

 
0 Kudos
Message 3 of 4
(3,765 Views)

To the best of my knowledge, there's NOT a way to use the index pulse to reset the count on your E-series board.  You'd need an M-series multifunction board or a 660x counter/timer board for that capability.  About all you can do is use one of the index pulses as an "arm start" trigger for the counters so they both start when 1 encoder is at a known rotational position.

As to the code, I haven't used any E-series boards under DAQmx so can't speak with authority.  I suspect you'd configure for an "edge counting" task and then set up a DAQmx Channel Property Node to specify that the "count direction" is "hardware controlled."  I did a quick search on the site and here a couple links -- hopefully these user-submitted examples will give you a good starting point.  Example AExample B.   Oh, and here's one straight from NI:  Example C.

-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 4 of 4
(3,760 Views)