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