LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

record using timing of save button

Hi,
I am acquiring signal and saving it as .wav file. I am trying to configure the "SAVE" button on my front panel so when i press the "SAVE" button the data is saved for 20 seconds and than the program stops saving.  I have attached the program code i am using. Help with this will be greatly appreciated.

I want to be able to see the signal on the graph and if the signal is what i want than i want to press "SAVE" button so the data is stored only for 20seconds.
I am able to see the signal and save but i haven't been able to sort out the 20seconds problem.


0 Kudos
Message 1 of 7
(3,363 Views)

Try and incorporate the logic shown in this VI for saving 20 seconds data

Regards

Dev

 

0 Kudos
Message 2 of 7
(3,356 Views)
Hi dev

I am using labview 7.0. Could you please compile the example program you sent me in the last mail and reply back to me please.
0 Kudos
Message 3 of 7
(3,347 Views)
0 Kudos
Message 4 of 7
(3,342 Views)

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.

0 Kudos
Message 5 of 7
(3,338 Views)

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

0 Kudos
Message 6 of 7
(3,327 Views)

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

Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
0 Kudos
Message 7 of 7
(3,323 Views)