Continuously building an array filled up with data coming from a dbl line 
Author Message
 Continuously building an array filled up with data coming from a dbl line

Im trying to build an array filled up with the data coming from a dbl
line during certain time, around 200ms. I want to be able to actualize
this array each 200ms, and then pass it to a My physical
system wont answer faster than those 200ms, therefore i dont want to
try to drive it faster than it can answer. I get my datastream from an
analog input, with a sample rate of about 40khz (the input comes from
a mic). So i want to do the mean of the acquired signal durig those
200ms to get the condition for driving my outputs; wich are digital
lines that drive relays. Ive being trying to work it out with while
loops where a wait until next ms slows the execution of the loop, but
that doesn`t get what i need; and with other loops and
I would really apreciate any help on that.

Sat, 12 Nov 2005 18:22:57 GMT  
 Continuously building an array filled up with data coming from a dbl line
You'll want to do continuous buffered analog input.  You can do this
by doing an AI Config, set the buffer size to 16000 points and the
scans/sec to 40000.  Then wire a "0" to AI Start for continuous
acquisition (take a look at the cont acq & chart shipping example).

If you are sampling at 40khz, then all you need to do is read 8000
points at a time in the while loop (with AI Read), it will take 200 ms
to do so.  Index the waveform you are looking for and wire that to  While it is doing the mean, it will be buffering the next
8000 pts.  If your gets done within 200 ms, then the loop will
sit and wait at the next AI Read until the next 8000 pts are read.  If
your mean takes too long it is okay too, because it will actually
buffer up to 400ms worth of data.

Since the data is buffered and hardware timed you won't be losing any
data, and you will get a mean for exactly every 200ms worth of data.

Hope this helps.

Sun, 13 Nov 2005 22:59:45 GMT  
 [ 2 post ] 

 Relevant Pages 

1. I need to acquire data coming in at the line in port of the sound card

2. need ideas to build gui form for data filling

3. BLT: How to fill under a line or between two lines

4. Sorting multiple-line data to single line data

5. Ms SQL fileerror 22001=String data, right truncation when I fill data into file

6. Filling arrays with arrays using afill()

7. DBL to binary indicator/array?

8. string to array (DBL) help

9. representation(DBL) in waveform data type

10. convert 2d array to 1d array without using shift registers and build array

11. Arrays: Build array in multiple for loops or replace array elements

12. save data continuously in a certain format


Powered by phpBB® Forum Software