04-05-2006 07:13 PM
04-05-2006 11:07 PM
Try and incorporate the logic shown in this VI for saving 20 seconds data
Regards
Dev
04-06-2006 07:36 PM
04-06-2006 10:46 PM
04-07-2006 01:21 AM
Dev
Your VI just save the first 20 seconds data once when the vi running , after the first 20 seconds, the vi save data per second just as you have 1000ms delay in loop.
For save data per 20 second continually, replaces the Greater or Equal function by Quotient&Remaider.
04-07-2006 07:21 AM
MilkyStone,
I do not quite understand what you are trying to say.
That 100millisec delay is just to avoid CPU overload since my demo VI does not have any process like acquisition running ( which definiely takes some time).You can give it as even 10 m Sec wait, it will not affect the 20 sec check logic in the least, but only changes the loop rate.
I repeat, this 1000millisec has got nothing to do with the 20 second check in the program and subsequently, the termination of data saving after 20 seconds.
regards
Dev
04-07-2006 08:00 AM
Is this what you are doing (could not run, subvi's missing) take a continious stream of analog data (I assume it is a 44K sound sampling), when save is pressed, sample to file a 20second interval of the sound. Is this sample for the next 20 seconds, or the previous 20? if it is tha last 20 seconds you should get a 20 second subset of the continouus buffering waveform. If it is the next 20 seconds, build a new 20 second buffer of data and send it to an asynchronous loop for writing to file. This asynchronous loop is nice because you will not be stuck with file io overhead messing up your daq loop timing.
Paul