Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Continuous DAQ with multiple Channels using 6023E

I am trying to countinuously aquire data from 8 channels using a 6023E (without loosing data). For some reason it allways gives me error -10092. Meaning the card requires a certain time between each scan.
If i set the scan rate to something that works, I loose
data. Does anyone know how to do this right without loosing data whilst using double buffering or is this
not possible?
Thanks
0 Kudos
Message 1 of 6
(3,009 Views)
Greetings,

If the combination of the number of channels you are sampling and your chosen sample interval does not allow for a "gap" of time at the end of your scan interval, you will receive this error. I am assuming that you are using NI-DAQ function calls. If you are, which functions are you using? Which scan interval/sample interval combinations work, and which ones fail? You need to be certain that (sample interval * number of channels) < (scan interval).

Spencer S.
0 Kudos
Message 2 of 6
(3,009 Views)
I have a sampling rate of 30000 with three channels
(divisors 1,2,1) that should mean 30k,15k,30k the card can do 200k total. I want a seamless aquisition,ie no pause between scans.So theoretically a scan interval of 0. I got a seamless aquisition at lower frequencies but i dont understand the influence of scanrate on the sampling rate. With the samplerate at 20 and scan rate of 10 i get an aquiation rate of 7 Hz on my fasters Channels and about 3 Hz on the slowest.

I am using a double buffered aquisition using scan_setup and scan_start
0 Kudos
Message 3 of 6
(3,009 Views)
Ok I got somehow further.
My problem was understanding the relationship between sampling rate and scanning rate.
with E series the sampling rate is not the max sampling rate for a given channel but the overall sampling rate for A/D conversion. Further more
in order to avoid error -10092 you have to set the
scan rate to be slower than the sample rate:
One way is scanrate=samplerate/(NumberofChannelsUsed+1)
why this is necessary, i dont know?
so if you get 2 channels rate divisor 1,2 yields
SampleRate Channel1= scanrate/1
SampleRate Channel1= scanrate/2

ie. samplerate=100000 (10kHz)
3 channelsUsed -> ScanRate=25000 (25kHz)
divisors for each channel 1,2,1
means
channel1 samplerate=25 kHz
channel2 samplerate=12,5 kHz
channel3 samplerate=25 kHz
w
ith this i get a what looks like a seamless aquisition from Halfbuffer to Halfbuffer.
But I am not sure if all i mentioned is correct?
0 Kudos
Message 4 of 6
(3,009 Views)
Yes, it does appear that you have the correct understanding. The ScanRate dictates how often a new scan occurs. The SampleRate dictates the rate at which the channels within each scan are sampled or acquired. One question I do have regards your channel divisors. How are these being used? In which function do you specify these?

Spencer S.
0 Kudos
Message 5 of 6
(3,009 Views)
That would mean since i take 5 samples per scan
i would get with my sample rate of 100000 (sorry up there it should have been 100kHz) the following times:
time 0 10ns 20ns 30ns 40ns
Channel 1 2 3 1 3

then the next scan would start since i have a scan rate of 25000 (25kHz) the delay is 40 ns
meaning the next aquisitions have the following times

time 80ns 90ns 100ns 110ns 120ns
Channel 1 2 3 1 3

that is not seamless i loose time between scans
does anyone know how to make it seamless?

setting the rate devisors is done by defining the rate
divisor vector in SCAN_Sequence_Setup

if you have a rate divisor of 1 all over then the scan rate = sample rate of all channels i think
0 Kudos
Message 6 of 6
(3,009 Views)