LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Sampling 0.1 sec ..

I have been trying to use my DAQPad 1200 to sample at 4000 S/s on 3 channels
for 0.1 seconds , do nothing for 0.4 seconds , then sample again, and repeat
this process continuously. I tried doing this by running a continuous AI -
here a set sample rate at 4000 but each time I read only 400 samples, and I
put thte read AI in a case loop so that it runs only every 5 interations.
The problem is that since I only read 1 tenth of the data in the buffer,
every time I leave over 90% and the backlog rises. I don't need all these
points only the 400, I would like to have the computer forget about it
altogether each time. I also tried using waveform AI and using a wait for
multiple ms , but here the problem was that the timming and performance of

the AI was dependant on system rescources. Aditionally when I tried running
the wait for multiple ms alone in a while loop and checked the interation ,
it failed to keep pace with my watch while another vi ran in the background.
I've thought that the best thing would be if there where a way to run a
while loop with only the read AI inside (continuous AI), but also if there
were some kind of vi that erases the backlog each time.
Lastly I've thought about using waveform AI triggered by hardware to avoid
system resources problems.
It seems to me that I am missing something simple - what?

Ari Kraut
Head Software Engineer
Vital Medical
0 Kudos
Message 1 of 3
(1,302 Views)
Try using external trigger at T=0.5s and only to aquire 800 Sa for every
trigger. That would probably be the most reliable way of doing it. Also
you could try using hardware counter and make your DAQ loop to wait for an
occurance set by that counter. I am not sure if that card has hardware
counter.
Good luck.

"Ari Kraut" wrote in message
news:38e35866@newsgroups.ni.com...
> I have been trying to use my DAQPad 1200 to sample at 4000 S/s on 3
channels
> for 0.1 seconds , do nothing for 0.4 seconds , then sample again, and
repeat
> this process continuously. I tried doing this by running a continuous AI -
> here a set sample rate at 4000 but each time I read only 400 samples, and
I
> put thte read AI in a case loop so that it runs only every 5 interations.
> The problem is that since I only read 1 tenth of the data in the buffer,
> every time I leave over 90% and the backlog rises. I don't need all these
> points only the 400, I would like to have the computer forget about it
> altogether each time. I also tried using waveform AI and using a wait for
> multiple ms , but here the problem was that the timming and performance of
> the AI was dependant on system rescources. Aditionally when I tried
running
> the wait for multiple ms alone in a while loop and checked the interation
,
> it failed to keep pace with my watch while another vi ran in the
background.
> I've thought that the best thing would be if there where a way to run a
> while loop with only the read AI inside (continuous AI), but also if there
> were some kind of vi that erases the backlog each time.
> Lastly I've thought about using waveform AI triggered by hardware to avoid
> system resources problems.
> It seems to me that I am missing something simple - what?
>
> Ari Kraut
> Head Software Engineer
> Vital Medical
>
>




-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 80,000 Newsgroups - 16 Different Servers! =-----
0 Kudos
Message 2 of 3
(1,302 Views)
Do you mean that the only way to sample at these rates is with a clock?

bubucis wrote in message
news:38e4229c_3@goliath.newsfeeds.com...
> Try using external trigger at T=0.5s and only to aquire 800 Sa for every
> trigger. That would probably be the most reliable way of doing it. Also
> you could try using hardware counter and make your DAQ loop to wait for an
> occurance set by that counter. I am not sure if that card has hardware
> counter.
> Good luck.
>
> "Ari Kraut" wrote in message
> news:38e35866@newsgroups.ni.com...
> > I have been trying to use my DAQPad 1200 to sample at 4000 S/s on 3
> channels
> > for 0.1 seconds , do nothing for 0.4 seconds , then sample again, and
> repeat
> > this process continuously. I tried doing this by running a continuous
AI -
> > here a set sample rate at 4000 but each time I read only 400 samples,
and
> I
> > put thte read AI in a case loop so that it runs only every 5
interations.
> > The problem is that since I only read 1 tenth of the data in the buffer,
> > every time I leave over 90% and the backlog rises. I don't need all
these
> > points only the 400, I would like to have the computer forget about it
> > altogether each time. I also tried using waveform AI and using a wait
for
> > multiple ms , but here the problem was that the timming and performance
of
> > the AI was dependant on system rescources. Aditionally when I tried
> running
> > the wait for multiple ms alone in a while loop and checked the
interation
> ,
> > it failed to keep pace with my watch while another vi ran in the
> background.
> > I've thought that the best thing would be if there where a way to run a
> > while loop with only the read AI inside (continuous AI), but also if
there
> > were some kind of vi that erases the backlog each time.
> > Lastly I've thought about using waveform AI triggered by hardware to
avoid
> > system resources problems.
> > It seems to me that I am missing something simple - what?
> >
> > Ari Kraut
> > Head Software Engineer
> > Vital Medical
> >
> >
>
>
>
>
> -----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
> http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
> -----== Over 80,000 Newsgroups - 16 Different Servers! =-----
0 Kudos
Message 3 of 3
(1,302 Views)