USRP Software Radio

cancel
Showing results for 
Search instead for 
Did you mean: 

Underflow error in Playback FM.vi from broadcast_fm_tutorial_1

Hi,

 

I'm trying to send a FM signal with the Playback FM.vi from http://zone.ni.com/static/ftp/pub/devzone/tut/broadcast_fm_tutorial_1.zip (http://zone.ni.com/devzone/cda/tut/p/id/13193). The data I'm using to send was recorded with Record FM.vi. When I start the VI I get this message:

 

Error code -1074118645 niUSRP Write Tx Data (CDB).vi<ERR>Underflow: the Tx buffer was emptied before new data was provided.  Consider reducing the IQ rate, increasing the Write rate, or increasing the number of samples per Write.

 

I tried to change the IQ Rate and timeout value without success. I hope you can help me.

 

0 Kudos
Message 1 of 18
(8,178 Views)

Hi YYY,

 

What value did you try setting the IQ Rate too?  For FM radio, a low IQ rate of 200 kHz will be fast enough to acquire one radio station.

 

Can you provide information about the Ethernet card that you are using?  The performance of the USRP is greatly effected by the Ethernet card.  Some are able to stream much faster than others.  However, until I know the IQ rates that you are having issues with it will be hard to determine if this is the cause.

Sarah Yost
Senior Product Marketing Manager
0 Kudos
Message 2 of 18
(8,172 Views)

Hi Sarah,

 

I have tried a low IQ rate of 200 kHz, but without success. The same error message appears. There is a Intel® 82567 Gigabit Ethernet Controller inside my notebook. The cable I am using is cat5.e which comes with the USRPs.

 

Thank you for the fast response.

0 Kudos
Message 3 of 18
(8,169 Views)

Hi YYY,

 

I just wanted to give you a status update.  I downloaded those VIs and I am getting the same error.  After looking at them, I found some problems.  I am working to get them fixed and will also work to get the link you sent me updated with the fixed VIs.  Either way once it is fixed, I'll post the code here as well and let you know.  Thanks for bringing this to our attention so it can get fixed for you and all of our users.

Sarah Yost
Senior Product Marketing Manager
0 Kudos
Message 4 of 18
(8,162 Views)

Hi YYY,

 

Here are the fixed Record.vi and Playback.vi.  Make sure that you are using a .bin file type as the file that you are saving from.  Let me know if you have any issues with these VIs.  I am still working to get the files from the link you downloaded changed, but hopefully this will get you up and running.

Sarah Yost
Senior Product Marketing Manager
Download All
0 Kudos
Message 5 of 18
(8,160 Views)

Hi Sarah,

 

I can only hear noise when I playback the .bin file with the one USRP and listen to it with another USRP. Both USRPs have the right frequencies. I think there might be something wrong with the record fm.vi. Right now I'm looking for a wav/mp3 to binary converter to see if it works with another binary file. I have not found anything yet.

0 Kudos
Message 6 of 18
(8,155 Views)

Hi YYY,

 

The reason that you are hearing noise when you simply play back the file to another USRP is because you are not demodulating the FM signal.  If you have an FM radio (I have an app on my phone that I use when demoing these VIs), you can receive the signal and it will demodulate it and play it back correctly.  If you want to demodulate the signal using LabVIEW, FM radio is a simple modulation scheme and there are several ways to do this.  You can use the Demodulate FM VI from Modulation Toolkit, like is done in the FM Demod Sound Card.vi that is in the zip file of VIs you downloaded.  But for this you need a license for Modulation Toolkit and the data that we recorded has to be converted to a different data type.  I attached a modified version of the Playback FM.vi that uses what is called the Arch Tangent method to do the demodulation.  This method gathers phase information about the signal, unwraps the phase, and takes the derivative.  This should make it so when you play it back from your USRP it can be output to your sound card as more than just static.

Sarah Yost
Senior Product Marketing Manager
0 Kudos
Message 7 of 18
(8,151 Views)

if i want to record 8MHZ bandwidth signal ,how can I do ?I set IQ rate to 8MHZ ,but it run 1 sec ,the Internal buff is overflow 

0 Kudos
Message 8 of 18
(8,130 Views)

Hi xingbofeng,

 

The typical formula that is used to calculate bandwidth based on IQ rate is IQ rate = 1.25 * Bandwidth.  The IQ rate acts as a filter, and like any filter, the outer edges slop off, so by setting the IQ rate 1.25 times larger than your bandwidth, the signal you acquire is not effected by the filter roll off.

 

When using the USRP, in order to get higher speed IQ rates, there are some things that you need to consider.  First, what is the number of samples that you are acquiring per fetch?  This is set as a constant on the fetch function of the block diagram.  This number can be changed as the IQ rate is changed for optimal performance.  I would try setting it to around 250k, but you will have to try a few different settings to see what works.  

 

Another thing that slows down the speed that you can fetch data is the amount of processing done inside the loop.  First, try removing the waveform graph indicator.  Doing that may be enough depending on your system.  If you still have trouble, you will need to write the data to file in a separate loop. To do that, you will need to set up a queue and use a producer consumer architecture.

 

Finally, if you are using a low quality PCI Ethernet card, it is possible that you will not be able to get a high IQ rate.  Different Ethernet cards have different performance.  Getting a better PCI Ethernet card is not expensive and will improve the streaming performance.  They will cost between $15 and $30.  The one that I have that I am happy with is a Netgear GA311.  I have also tried using an ASUS NX1101 and was not happy with it at all.

 

You will most likely need to use a producer consumer architecture.  Let me know if you have issues with that, I'd be happy to help.

Sarah Yost
Senior Product Marketing Manager
0 Kudos
Message 9 of 18
(8,125 Views)

Hill

    Sarah Y  

     i set up a queue and use a producer consumer architecture. i can set IQ rate to 4M to record  the FM singal ,but can not palyback the FM singal

  i refer to the example  http://zone.ni.com/devzone/cda/tut/p/id/13567  FM record and playback . encounter the end file ,the next i will attach the example vi and the error code.Different Ethernet cards have different performance,i think this may be the problem. i will check it

0 Kudos
Message 10 of 18
(8,114 Views)