02-17-2014 05:19 AM
Hi,
I am using a USB6210.
I have a linear position encoder connected to ctr0.
I have four analogue input channels connected to ai0..3.
I would like to read these channels continuously at a rate of 750Hz, and tie these readings in with position measurements from the encoder.
I am using CVI 2013 and DAQmx Assistant.
I am unsure how to configure the tasks to tie the measurements together - I have little experience working with counters.
I have configured the AI task to use internal timing. I have a callback installed to read the AI samples every 30 samples per channel.
I tried using 'on demand' timing for the counter channel, but it is nowhere near accurate enough.
What timing should I specify for the encoder task?
If I state that I require continuous samples from the encoder task, I then have to specify a counter source. When I bought the encoder, I was asked about the clock frequency from the encoder supplier and told him that it would be 80MHz (believing this to be the case for a USB6210) - if this is dropped to the analogue input sample clock (which I don't actually think is an option) - would it be detrimental to the operation of the encoder?
Thanks in advance,
Chris
02-17-2014 05:46 AM
As is often the case, as I was typing the message, the solution presented itself!
It *is* possible to set the AI sample clock as the clock for the encoder task (as you would imagine) - so when I get my every N samples event, I read the N samples from AI task, and also the encoder task and all is well.
Chris