Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

PXI 6602 + Quadrature Encoder + Timing

Hello everyone,


I try to research everything as much as possible before posting, but I can't seem to find the information Im looking for in this instance. Maybe my lack of LabView experience is attributing to the fact that the information is there, i just can't recognize it.

As the subject suggests, I am reading data off a Quad Encoder and timing off the 6602. If Im reading the timing and the encoder signals at the same time. With what relative probability can I assume those two values are going to correspond exactly?  Is this determinate on the CPU speed?

I want to make sure there is next to zero delay between the timer value, and the encoder read... so that I know the information comming off the encoder is exactly matched to the timing value. This may be less of a labview question and more of a hardware question?

Also understand that I was just exposed to encoders and the 6022 for the first time yesterday. Maybe a link to a manual or a tutorial on encoders and timers? With that said, I don't want my question completely dismissed as just being attributed to lack of experience. I still believe this may be a valid question.

I have been using the Count Edges.vi from the NI example finder...  under Hardware I/O :: Traditional DAQ :: Counters :: NI-TIO
I will post the version Im using to get the info in a couple minutes.

Thanks for any help/ insight in advance.
0 Kudos
Message 1 of 5
(3,759 Views)
This is the vi I've been using to play with the encoder and 6022 board. Further info and questions are inside in the block diagram.
 
Thanks again for any help/info/insight.
 
 
0 Kudos
Message 2 of 5
(3,753 Views)

First I'd offer the general recommendation to interact with the 6602 through the newer DAQmx driver.  Traditional NI-DAQ can work and all, but it's kind of a dead end.

The key to your needs is to perform a hw-timed acquisition.  On a 6602, you'd need to use one of the counters to generate a hardware sampling clock signal.  In the examples, this would called a "continuous pulse train."

A different counter would be used to count the encoder signal, either by counting edges or preferably by configuring the counter for angular position measurement.  With DAQmx, part of the configuration would be a call to "DAQmx Timing.vi" where you would specify that the sampling clock comes from the output of the pulse train counter.  Now when you collect position data, all the samples will be precisely spaced based on the pulse train period.  Because the timing is handled by the hardware, it isn't demanding of your CPU.

A few terms you may want to use for searching are quadrature, encoder, buffered, sampling clock, 6602.

-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.
Message 3 of 5
(3,751 Views)
thanks for the reply...

Looking into the DAQmx VIs as we speak. Will update any meaningful results. Smiley Happy

So far I tried using the DAQ assistant with no real luck, hopefully I make progress before the end of the day.

Just to make sure I understand your suggestion. You said I should use a pulse train to determine the times in which I read the encoder position. Therefore linking a specific time between reads, and thus solidifying the encoder position to time. I am going to work under this assumption for now, to see what transpires.

Thanks again.


Matt
0 Kudos
Message 4 of 5
(3,738 Views)
Wound up figuring out the problem. Used an example in the NI example finder called. Syncronizing the start of timed loops.vi ...

It triggered three encoders to make sure all the encoders read at exactly the same time. So I just deleted two of the encoders from the vi, and used the DAQ assistant to setup a pulse generator to one of the channels. linked that channel to the timer source, and viola, my read function was reading on the rising edge of my pulse.  Smiley Very Happy
0 Kudos
Message 5 of 5
(3,708 Views)