RF Measurement Devices

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I read an audio file and brodcast it using NI RFSG?

Hi Jaime,
Thank God, I managed to detect a signal at the NI 5660. But, the signal I could get is a sinusoid. I still fail to detect the audio signal although I followed the same procedure.
 
I attached my design which basically adopts some other previous examples. I tried to fm-modulate the audio signal using a typical fm-modulation configuration.
Please have a look, and let me know if you manage to find out why it can't detect audio signals at the receiver?
 
Thanks
Download All
0 Kudos
Message 11 of 19
(6,581 Views)
One more thing, what function is LabVIEW can convert a DBL data type into a readable audio form. I want to listen to the file I received to check if it is the right one or not.
0 Kudos
Message 12 of 19
(6,560 Views)

Hi,

Luckily, I managed to hear my audio signal at the receiver today!. Most of my past questions were answered, indeed.

 I used the FM radio example I found in some thread. But, the problem now is that the files I could open and run where Windows small ( short) audio files. NI wav sound file did not open. the generator gave me an error at the Normalize function in my Generate FM signal from WAV file example.

Is it because the NI sound file is long (dozens of seconds) that it fails to be FM modulated and transmitted?

 

0 Kudos
Message 13 of 19
(6,556 Views)

Hi Muslim,

This are very good news, the reason I did not posted yesterday is that I was testing the same set up you have. I wanted to give you a more concise solution. Let me kind of step through what I did:

I found a new: “Generate FM Signal from WAV” that will repeat the file continuously. The reason to do this is that part of the caveats in this application is the re-sampling and under sampling of the WAV signal needs to be done correctly or if not you lose signal integrity. So instead of combining those to VI like you did (still an excellent approach) I found this example that already does it for you. Remember that this are only starting points and the best practice is to completely understand the code but not use them as a final solution, I addition to this your programming skills in LabVIEW are going to be the key point on how much time you will spend debugging and polishing your code. With all that said the example that I’m talking about is in the ZIP file called: “fm_sound_transmitter.vi”

After this step was up and running I opened the FM radio for the 5660 like you have already done. With a coaxial cable from RFSG to RFSA I can see only one peal in the power spectrum; obviously the carrier frequency where my WAV is mounted. “NI PXI-5660 Software FM Radio” I the library that has the necessary VIs.

Now instead of using those annoying sounds windows have, I found a WAV file that generates a 1 KHz tone specifically use for testing and analysis purposes.  “0_16.wav” is the name of the file.

The FM radio example converts that DBL array into a sound and sends it to your sound card, kind of neat, not?

Is the error message you where getting saying that the code is “out of memory”? In either case you are right first there is the limit of how much data you can store in the RFSG and second how many millions samples can LabVIEW handle to resample. Things you can do when playing around with these examples is to manipulate the rate of the wav file from 44100 to 22050, use smaller sound files and cut you file into smaller size and send a piece at a time.

I hope it helps

Jaime Hoffiz
National Instruments
Product Expert
0 Kudos
Message 14 of 19
(6,542 Views)

Hi Jaime,

Thanks a lot. The examples and support you offered me were so beneficial. I have one problem left. most sound files run, but, the NI sound file doesn't run on the fm radio example. I need this file to run or at least figure out why it could not be played or transmitted!

I thought it's about the file type, but, some other sound files of the same type do run and could be Tx. Any idea?

 

0 Kudos
Message 15 of 19
(6,513 Views)
Hi Muslim,

Jaime is out this week and I just got back so I will do my best to help you out again.  Which sound files were you having trouble with?  Could you post a sample and I'll see what I can figure out?

Regards,
Paul C.
0 Kudos
Message 16 of 19
(6,503 Views)

Hi Paul,

Sorry for bothering, but I'm having the same problem again. my RFSA seems ok, as I can run the radio software using an antenna.

Problem here is that I can't get the audio signals I transmit from the fm_sound_transmitter.

The program goes into an infinite loop at the rfsg_Resample and write.vi

What to do? please help a.s.a.p.

TQ

0 Kudos
Message 17 of 19
(6,494 Views)
Hi Muslim,

The intent of that vi is the continuously resample and output the file.  You will need to make modifications to the vi to remove that functionality.  These vi's were meant more as a getting started point and not a final solution.  I would recommend taking a look at removing the while loop and playing around with the functionality.  I believe the reason we suggested using the continuous version was to ensure that you received the signal on the RFSA side.  If you want to do a more precise send, you will need to make more modifications.  Could you explain a little more what you are intending on doing with the application?

Regards,
Paul C.
0 Kudos
Message 18 of 19
(6,474 Views)
Hi Muslim,

In regards to your questions about why some wav files work and another are having touble, it is important to understand that  there are various different types of .wav files.  These audio signals or .wav files can be sampled at different rates using different codecs.  Getting these wav files into the array format required by our RFSG devices can sometimes be difficult.  My questions would first be are you able to get the audio file loaded into labVIEW?  Have you examined the format the audio file is when inside LabVIEW.  Is that format acceptable for the RSFG card?  I'm under the impression that you are trying to load multiple different types of .wav files that may or may not work according to the examples that we gave you earlier in this thread.  Without more information from you regarding the type of file, an example of the file, and exactly how you are trying to load the file it would be very difficult for me to give you an answer.

Regards,
Paul C.
0 Kudos
Message 19 of 19
(6,470 Views)