The playback VIs on the link that you posted are not correct. Please see message 5 of this thread for corrected versions of the playback VIs.
Sarah Y ,
I use the exmaple and use a producer consumer architecture,but only can set the max IQ rate to 4M,if set higer ,error -1074118647 occunted
at niusrp fetch RX data.vi Overflow : an internal receive buffer has filled before the date could be returned consider reducing the IQ rate 、increseing
the fetch rate or increasing the number of samples per fetch.i try the number of samples from 20k to1000k,but it has not much better .the error will come a few seconds late.the error means get date has a faster rates . but if i only fetch date don't write the data to bin file ,it could run well at 10M IQ rate
when i use queue ,the queue buff will filled. the rate of writing date to bin file is slower than the niusrp fetch RX data,how could i do ?
i see the NI-USRP 1.1 Released, is it can solve my problem ? i see
I would highly recommend updating to the newest version of the driver, NI-USRP 1.1. There have been many improvements to the streaming performance in this driver in addition to new features. Once you download the new driver, see if you are able to get better performance with the code you have. There are also some other changes that can be made that will increase the rate that you can fetch while writing to a file.
With the new driver, you can change from using a complex double data type to I16. This will be a more efficient data type. When you change to the I16 data type, you will need to change it on the Fetch function and you will also need to use a property node. You can set this property by selecting Configuration » Advanced » Host Data Type after placing the property node on the block diagram. There is another property node that you can use to set the data width from 16 bits to 8 bits.
Finally, even if you optimize your code, the rates that you are able to fetch and write will vary greatly based on your Ethernet card and your host computer. With the new driver you should be able to get an IQ rate of 8MS/s much easier. Let me know if you are still seeing this error with the new driver.
thank you for the Playback FM with Demod.vi. I used the Record FM.vi and the Playback FM with Demod.vi to record a playback a local radio station. For listening I used the FM Demod Sound Card.vi from the broadcast_fm_tutorial_1.zip.
These are my problems:
1. I had to change the number of samples inside the Record FM.vi from 100000 to 200000. Otherwise when playing it back Playback FM with Demod.vi gave me an underflow error.
2. I am able to hear the playbacked radio station, but the music is very low and the background is very noisy.
3. I thought maybe there were some frequency inaccuracies when recording the radio station. So I've done some recordings with frequencies near to radio station. For example the radio station is on 90 MHz, I've recorded on 89,8 MHz, 89,9 MHz and so on. But the sound quality is still the same.
I hope you can give me some advice.
If you are getting something back, but it is really quite, you might be driving the USRP into saturation. You can adjust the gain to find the right level needed for you antenna and the building you are in to get a good signal back.
Also, here is another VI that does FM radio playback. It doesn't record, but it plays back the FM radio through your computer's sound card. It will give you an easy way to debug you system. It also has a graph showing the frequency domain signal that is being received instead of just the time domain signal. If you set the IQ rate to something larger like 16 MS/s and the center frequency to 100 MHz, you can see all of the different radio stations in your area show up as peaks in the spectrum. If you have the center frequency set on a station that you know exists and the IQ rate set to 200k, you should see a frequency domain that looks something like this. If you use this attached VI to find out the correct frequency and the right gain value for your set up, those same values should work for your record application. You can also try adjusting the gain in your playback VI to get the desired level.
Hi Sara, I've tried your advice, but with no success. I've tried the Rx Gain from 0 dB up to 31 dB. The recordings sounds all the same. I've attached two recordings, maybe you can check it. Can you send me one of your recordings?
Thank you in advance!
Each file is about 50 MB, unfortunately I was'nt able to upload it per thread editor.
I didn't get back any signal, just static when I played back your recordings. I have an FM receiver on my cell phone that I used to listen to the files instead of playing them back to the USRP and demodulating them on my computer just so you are aware of my setup.
I recorded this 5 second clip. So you know what you're listening for, it's Kelly Clarkson who happened to be on the strongest channel I get from my desk. Before recording it to the bit file, I rand the FM demo I attached in my last post to find a good gain setting. This is what the frequency spectrum looked liked with the RX gain set to 26, which is the gain I used for my recording:
You can see the spike at 20k, which is the stereo signal being broadcast for the station. Knowing that 26 gain gets me a good signal, I recorded the 5 second clip. Then, when I played it back to my cell phone radio, I set the TX gain to 10. I was able to hear the song just fine. One thing about the .bin file I attached--I had the byte order set to little- endian when I recorded it, which is not the default. You will need to change the byte order of the Read from Binary File to little-endian in order to play back the file correctly:
Hopefully you will be able to play back this file successfully. Let me know if you are still having issues. If you are, let me know what type of antenna you are using and if you are able to transimit or receive other signals correctly.
My attached file didn't post, I guess 15 MB is over the size limit. Here's a link to the file: