08-24-2009 09:40 PM
Hi everybody,
I created a data logger for 8 channels at 500kS/s at 16bit with a PXI-6123-S DAQ card. Right now I'm saving the data of the 8 channels in a single TDMS file.
The goal is to log the 8 channels into a single wave file. I used the standard sound file open/write/close VIs and I realized it only works with 2 channels. Once I configure the wav file for more than 2 channels, I cannot open this wav file in MATLAB or in a wav player. However, if I look at the file size, I can see that all 8 channels are in that wav file.
I also got the Sound and Vibration Toolkit and tried the SVXMPL_WAV Recorder (DAQmx).vi, but it only accepts one channel.
I attached a shrinked version of my Data logger vi.
Thank you very much for your comments and suggestions,
Martin
08-25-2009 06:35 PM
Can you provide the wav file you created? When opening in a wav player are coming across any specific errors? Can you specify the overall application that prompts you to saving this to a wav file as suppose to a TDMS?
Regards,
Glenn
08-25-2009 08:07 PM
08-25-2009 08:18 PM
08-26-2009 05:43 PM
Hello Martin,
After glancing your vi, I was curious to understand the File I/O code that preceded the while loop. I was able to take one of our continuous read examples and add a Sound File Write Simple to create a multi channel sound file.
Regards,
Glenn
08-26-2009 07:15 PM
Hello Glenn,
sure will the Sound File Write (Simple) VI create a multi channel wav file as I mentioned in my first posting. But you cannot open this file in a multi channel sound program, i.e. Matlab wavread function, ISHMEAL, etc. Try to open the multi channel wav file in MATLAB and you will see the error message. You can play it in windows media player though. However, I need to see each channel seperately.
I also realized this wav file has a bigger header than the standard 36byte wav file header. MAybe there is something wrong in the header with LV multi channel wav files?
Thanks,
Martin
08-27-2009 04:55 PM
Hi Martin,
I'm not sure how MATLAB or ISHMEAL opens the files. I'm curious to understand the formatting for these multichannel .wav files. It sounds like you have single file that has each channel parsed. Can you explain how you are doing that in the initial code you attached?
Glenn
03-18-2010 08:39 PM
Martin,
Did you find the answer to this? A customer of mine has the same question and I'm not sure what is the difference between the WAV file that LabVIEW saves and the WAV file the ISHMAEL (or Raven in this case) uses...
Did you find more info on what ISHMAEL requires?
Thanks,
Vincent
03-19-2010 04:26 AM
Vincent Carpentier wrote:Martin,
Did you find the answer to this? A customer of mine has the same question and I'm not sure what is the difference between the WAV file that LabVIEW saves and the WAV file the ISHMAEL (or Raven in this case) uses...
Did you find more info on what ISHMAEL requires?
Thanks,
Vincent
A fix can be to check the two bytes at index 20 in the wav file. If this two bytes read 0xFEFF replace with 0x0100. Just write in the two bytes 0x0100 at index 20. You may use labview or a hex editor. I leave it to you to tell your customer the difference between ASCII and hexadecimal number format. For more info read this
http://forums.ni.com/ni/board/message?board.id=170&message.id=415946
03-23-2010 09:16 AM