Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

Is it possible to do buffered acquisition on external digital trigger with the NI PXI 6602 Board (with CPCI crate)?I need to perform this in quadrature encoder mode (with the internal timebase?).

I need to perform a position buffered acquisition at a determined motor position.For example 1000 samples at a motor position value of 5000 (in order to calculate the motor speed at these positions).
0 Kudos
Message 1 of 4
(3,636 Views)
I suspect there'll be a way to get a satisfactory measurement with the 6602, but I'm not sure I understand your question well enough. Let me restate my best understanding of what you'd like to do, and we can go from there.

A. When the motor reaches a position of 5000 counts, as measured with a quadrature encoder, you would like to trigger a data acquisition task to start.
B. The acquisition task will take 1000 samples of something (position? time interval?) in order to determine motor speed.

If your encoder supplies a Z (a.k.a. index) channel to provide you with a reference, you'll be able to generate the trigger described in part A above.
You would enable the 'Z-index reload' feature of position measurement, and set the 'reload value' to be offset by 5000 from terminal count. You'll need to configure that counter's output to 'pulse on terminal count'. (note: you'll also need to set the proper z-index phasing for the encoder you have.)
On each motor revolution, you'll produce a pulse exactly 5000 quadrature-decoded positions after the encoder's Z-index pulse. This pulse can be used to trigger an acquisition.

For the acquisition itself, you're probably either sampling quadrature position at a constant rate, or measuring time intervals between encoder edges. In most cases, I'd recommend the latter though not without a few more words.
First, realize that you won't easily be capturing intervals between every quadrature transition of the two encoder channels. More likely you'll be doing a buffered period measurement, i.e., time intervals between consecutive rising edges of one of the encoder channels. While in theory you could capture semiperiods of both, in reality most encoders have considerably more channel-to-channel and rising-to-falling-edge error than rising-to-rising (or falling-to-falling) -edge error.

Hope this helps some. Respond with further details or any questions.

-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,635 Views)
Thanks for your fast reply
You have understood my problem
There is no problem to configure A:
I can generate a digital trigger with the Z signal at an accurate motor position
I have a problem with B (few words about B: I want to acquire on ext. dig. trig. a buffer of period/semiperiod/position/edges values at a fixed sampling rate):
I'm affraid this fonctionnality (external dig. trigger) is not available in buffered acquisitions that's right?(I think ext. dig.trigger is used only for triggered pulse generation?)
Regards
Guillaume Renaud
0 Kudos
Message 3 of 4
(3,635 Views)
Yes, you can start buffered acquisitions simultaneously with a digital trigger. You can also have several different counter tasks start off the same trigger edge.

For the so-called "part B": you can acquire positions or edge counts at a fixed sampling rate, but not periods or semi-periods. When you acquire periods, your "sampling rate" varies according to the time interval between the edges you're timestamping. You'll need to figure out which method gives you the best overall measurement for your purposes.

For example, let's suppose that your encoder generates 80,000 counts/sec in x4 quadrature mode. This corresponds to 20,000 cycles/sec for channels A and B individually.
If you sample position at a f
ixed rate of 500 samples/sec, your quantization error for speed will be 1 part in 80,000/500 == 1 part in 160 or about 0.6%.
If you perform buffered period measurement, you'll capture 20,000 intervals/sec, and the quantization error can be 1 part in 80,000,000/20,000 == 1 part in 4000 or about 0.025%. (Note: value of 80,000,000 is the maximum internal timebase frequency for the PCI-6602.)

In this example, buffered period measurement had much lower quantization error, and gave you a much higher bandwidth speed measurement. However, it is more sensitive to encoder accuracy and produces a higher data rate to handle. These are the kinds of trade-offs to consider when measuring speed.

-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,635 Views)