LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

wav-file size is only 1kb

hi,
 
i want to create a wav-file from a DAQ-interface. i convert the signal from dynamic data to DBL.
my DAQ is in continuous-mode with 22050 Samples per second, 1 channel and 8 bit per sample.
the vi works very well, but the wav-file has after saving only a size of 1kb and is empty!
but i see the properties in the file.
i have no idea what the problem is.
i´m using labview 8.20.
 
i attach my vi and it is saved for LV 8.0
 
martin
 
 
ps: sorry for the bad english, i´m a german 😉
0 Kudos
Message 1 of 8
(4,576 Views)
You're recreating the file each time through the while loop. The open and close wave file vi's need to be on the outside of the loop.



Message Edited by Matt W on 06-11-2007 07:39 PM

Message 2 of 8
(4,555 Views)
Hi Matt,
 
thank you for this advice.
But your solution was my first idea. i did it without any success!
Even if i construct your solution (with the wave-generator) the result is the same.
The vi create the test.wav but it is only 1kb and i can´t play it!
 
Is it really possible to write an signal from a DAQ-Interface into a wav-file??
If it possible, i belive that i have a bug in my LabView-Version... 😞
 
thanks for helping!!!
 
martin
 
PS: i attach the 2 vi´s didn´t work (with DAQ and your solution with the wave-generator)
       i saved it for LV8.0 please tell me if the vi´s run properly on your system
Download All
0 Kudos
Message 3 of 8
(4,541 Views)
Hello Kaloy.
Right clik on "sound file write.vi" and in select type, and selec the proper type. For some reason this vi fails in automatic for types other than i8 and i16, but runs fine if you select the mode. I tried the example using I16 and scaling the input and it runs fine. The type must be the same as selected in sound format.

I8 and I16 are standard in wav file formats. Should you record in other formats, you can run into  trouble to playback the file using other audio players/editors.


Cheers
Alipio


Mensaje editado por alipio

---------------------------------------------------------
"Qod natura non dat, Salmantica non praestat"
---------------------------------------------------------
0 Kudos
Message 4 of 8
(4,527 Views)

Hi Alipio,

the type was automatic.

Now, i installed a "transformerchain" (dynamic --> DBL --> I16).

But it dosn´t work either. 😞

 

martin

 

 

Message Edited by kaloy on 06-12-2007 06:27 AM

0 Kudos
Message 5 of 8
(4,520 Views)
sorry, it works particly.
the file recorde over the lengh, but the file is empty.
 
martin
 
0 Kudos
Message 6 of 8
(4,516 Views)
Hi kaloy.
The reason for that is you convert the data to I16. The data is 1/-1 so you get no signal.
Multiply the data by 25000 to use a more adecuate range for 116 before converting to integer and you will have sound.
Another choice is: configure de exprex vi to generate, say, 5000 in amplitud.

Cheers
alipio

Mensaje editado por alipio

---------------------------------------------------------
"Qod natura non dat, Salmantica non praestat"
---------------------------------------------------------
0 Kudos
Message 7 of 8
(4,507 Views)

hi alipio,

thanks a lot!! the vi works very well! without you I would have never created it !!!

🙂

thx!!

bye

martin

 

0 Kudos
Message 8 of 8
(4,486 Views)