02-24-2006 11:05 AM
02-27-2006 09:18 AM
Chris,
When you talk about using a DAQmx Timing vi, I assume that you are performing
buffered event counting or any other task that performs buffered acquistion.
You can see an example that performs buffered event counting in NI Example
Finder called Count Digital Events Buffered - Continuous. The DAQmx
Timing vi in this example is used to read the current state of the counter
into memory at a constant rate. The source input of the Timing vi in this
case means the source of the sample clock. This clock is what determines
when the counter state is read and stored into a buffer.
If you are performing event counting, and do not need buffered acquisition (no
sample clock), you can look at example Count Digital Events.vi in Example
Finder. In this example no DAQmx timing vi is used.
Regards,
Jesse O.
Application Engineering
National Instruments
02-27-2006 11:58 AM
Thanks Jesse.
I am attempting to synchronize a finite, buffered, event counting with an analog input task. I have looked at the examples in Labview and I think I have a solution, but I'm not sure. Is the following logic correct, please:
I have the output of an incremental encoder wired (hardware wired) to the counter source. In Labview, I have the "source" on the timing vi set to be the ai sample clock. My understanding is that the counter will be incremented each time an encoder pulse is present (on the counter's source input). Then each ai sample_clk pusle will capture the ai channel and also the counter's current current "count" value (i.e. the number of encoder pulses between ai_sample clocks).
Thanks for your assistance,
Chris
02-28-2006 08:55 AM
Chris,
You are correct if you have first configured and started an analog input
task. The sample clock from your AI read can be routed to a counter
(internally by selecting the source to the timing vi). On the edge of
your sample clock, both your counter and analog channel will be read and stored
in your buffer until you perform your DAQmx read for these two tasks.
Regards,
Jesse O.
Application Engineering
National Instruments