USRP Software Radio

cancel
Showing results for 
Search instead for 
Did you mean: 

Transmitting and receiving simutaneously (USRP + WBX + LabVIEW)

I've recently started working with LabVIEW, and I'm only having some trouble when it comes to using it along with a USRP N210 with a WBX daughterboard, because the software itself is pretty intuitive and the interface is very user-friendly.

I've started with a simple sine generator project, but I can't make it work. I'm using the four "core" USRP Tx blocks (Open Tx Session, Configure Signal, Write Tx Data and Close Session), an Initialize Array block with 1 as a constant and a Spectrum Monitoring block. The Write Tx Data is on a while loop, and it only stops when I press the STOP button. Device Name is set as the IP address of the USRP (192.168.10.2), which is also set in the Spectral Monitoring IP field. I'm using an antenna on the RF1 port of the USRP, which I can't remember the specifications. Do I need to use Rx blocks? Isn't the Spectral Monitoring block enough for the receiving task?

Anyway, sorry for the lack of information, and I hope it's still understandable. I didn't upload the .vi file because I can't right now, but I'll try to upload it later.

I still don't have a solid base on communications theory, so I'd appreciate if you could be as non-technical as possible.

Thanks in advance!

0 Kudos
Message 1 of 13
(8,300 Views)

Hey alan_,

 

Is the spectral monitoring block you mentioned on of the example programs that is shipped with the driver?  There are 2 that you may be using, niUSRP EX Spectral Monitoring (History).vi or niUSRP EX Spectral Monitoring (Interactive).vi.  Both are set up to receive a signal, they just use different programming techniques.  If you have this example placed in your main program as a subVI, you do not need to set up the receive blocks.  I would recommend using niUSRP EX Rx Continuous Async.vi instead though.  This is the most basic example of how a continuous receive should be set up.  There is another example called niUSRP EX Tx Continuous Async.vi that is a great example to start with for transmit.  You can open both VIs and run them at the same time and watch your device transmitting and receiving simultaneously.   I'm not exactly sure what your software set up is like, and what you applications goals are, but this should help to get you started.  Feel free to post back about any errors you are getting and more information about what your application is and I'd be happy to try and help.

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

Hey Sarah_Y,

 

Thanks for you fast reply!

The Spectral Monitoring block I mentioned is the Interactive one. I'm using it because someone told me to, but I'm open to new suggestions, such as yours. Would you mind, if it's not too much to ask, uploading a simple .vi that transmits and receives a sinusoid through the same antenna on a USRP N210? I think most of my problems involve lack of material to observe and learn from, so it'd really help me. My final goal is to accomplish something close to a digital communications laboratory, using more than an instance of LabVIEW and more than one USRP. As you can see, I'm really far from that and I have a LOT of things to be learned and done, but I hope everything will flow way more easily after I solve these initial setup problems.

Thank you again for you support, I really appreciate it.

 

Alan

0 Kudos
Message 3 of 13
(8,287 Views)

Hey Alan,

 

The examples I mentioned above can be found by going to Start » All Programs » National Instruments » NI-USRP » Examples » LabVIEW 20xx (32 bit).  If you want a VI that does TX and RX at the same time on one antenna, you can simply copy and past from example into the other, it's that simple!

 

If you are trying to make a comms application, I'll point you to 2 things that should help.

 

First, this example on our community is great:  https://decibel.ni.com/content/docs/DOC-18801

You can do this with multiple USRPs, or you can do it with one.  It has a lot of good subVIs set up to do modulation as well as packet forming and packet decoding.

 

Second, once you get a bit more comfortable with your USRP and start doing more advanced things, you will probably want to send bursts of data instead of continuous data.  I came up with an unpolished example of how to do this and posted it on this thread: http://forums.ni.com/t5/USRP-Software-Radio/How-to-transmit-and-receive-using-a-single-attena-with-U...

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

Hey Sarah,

 

Nice material! Thanks!

So, concerning the Tx and Rx VIs, can I just copy those as subVIs to my VI? I mean, I know I can, but what else do I need to establish the connection? Do I still need those four blocks I called "the core"?

I suppose I can drop off the Spectrum one.

Thanks,

 

Alan

0 Kudos
Message 5 of 13
(8,273 Views)

Sarah,

 

I've tried implementing a .vi based on what you suggested me, but I'm still having some issues. I'm getting an error -1074118645 on the Tx loop, which makes it stop very soon. The Rx loop keeps running, but all I can see in the graph is probably just noise. I'm using one USRP N210 with a WBX daughterboard, as I've told you before, and a single antenna attatched to it's RF1 port. Anyway, I've uploaded the .vi, so I'd really appreciate if you could help me out.

 

Thanks in advance,

 

Alan

0 Kudos
Message 6 of 13
(8,227 Views)

Hey Alan,

 

The error that you are getting is a buffer underflow.  It means that your USRP is transmitting samples faster then you are sending them to the device.  You will need to adjust your IQ rate and the size of the waveform you are transmitting to get this error to go away.  Try something like an IQ rate of 1 MS/s, 100k for the waveform size, and 100k number of samples.  Also, since you are transmitting and receiving on the same device, make sure that you are using the frequency for TX and RX.

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

Hey Sarah,

 

Ok, got it. I'm trying some values right now and hoping it goes away. About the TX and RX frequency, isn't it 2.4G?

Thanks again,

 

Alan

0 Kudos
Message 8 of 13
(8,206 Views)

Alan,

 

I think one frequency was set to 2.4 GHz and the other 2 GHz.  Those are just the defaults, so if you changed them before running it shouldn't cause a problem.

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

Hey Sarah,

 

Sorry for the late reply. I've been really busy lately, so I had to pause the project for a while. I've resumed my experiments last friday, but I'm still getting a buffer underflow. I've tried a lot of values for my I/Q rate and the other parameters. I think everything else is working just fine, but this error is really holding me back.

 

Thanks in advance,

 

Alan

0 Kudos
Message 10 of 13
(7,995 Views)