USRP Software Radio

cancel
Showing results for 
Search instead for 
Did you mean: 

Change USRP Tx/Rx frequency while VI is running

Hi, 

 

I am working on a project where its required to change the Tx/Rx frequency (Carrier frequency) based on some event. Is it possible to change transmitter and receiver frequency while VI is running?

 

PS: I am using NI USRP 2940R which is connected through PXI cable with the chassis.

 

Best regards, 

 

M Mahboob Ur Rehman

0 Kudos
Message 1 of 8
(3,353 Views)

Can you explain more of your application and what you are trying to do? You can programmatically change the LO. Is this what you are wanting to do? What frequency range are you operating in?

0 Kudos
Message 2 of 8
(3,324 Views)

For example, I have 3 modes in my application. If user selects Mode 1, the receiver frequency should be 800 MHz and transmitter frequency 900 MHz. While application is running and user changes to mode 2, then automatically the receiver should be set to 900 MHz and transmitter to 1000 MHz and so on.

 

My operating range of frequencies are between 800 MHz to 1300 MHz.

 

Best Regards,

M Mahboob Ur Rehman

0 Kudos
Message 3 of 8
(3,318 Views)

If the user changes the frequency, are you okay with a little transition time? If so, you could always do something like an event based state machine that changes the USRP settings when a button is pressed, or switch is moved.

0 Kudos
Message 4 of 8
(3,313 Views)

Yes, a little transition time will not be a big problem for me. Thanks for the suggestion I'll try this method and will let you know about this.

 

Thanks again,

 

M Mahboob Ur Rehman

0 Kudos
Message 5 of 8
(3,308 Views)

Hi,

 

I am unable to change USRP settings for updating Tx/Rx frequency. Can you please provide any example how to change the USRP settings. 

 

I though it can be achieved using "niUSRP Property Node", but I am unable to do so.

 

PS: I am working on "NI-USRP Simple Streaming" Project

 

Regards,

M Mahboob Ur Rehman

0 Kudos
Message 6 of 8
(3,294 Views)

Since you are using the Simple Streaming project, this is actually a separate API than the niUsrp API (which includes that property node).  (I know, it's confusing that there are two APIs, but there are some historical reasons for this).

 

To change the carrier frequency using the API for that Simple Streaming project, you want to use the Configure Frequency VI.  This can be found at

 

<path to your project>\Host\SubVIs\<your project prefix> Configure Frequency.vi

 

That will allow you to change the frequency on-the-fly.

Message 7 of 8
(3,287 Views)

That's great! I'll try to do this using the VI you mentioned. And yes the two types of API's are little bit confusing for me as I am currently in learning stage. 

 

I also want to mention that somehow I managed resolve the issue but that may not be a good approach. I put whole code of Tx/Rx streaming VI inside a while loop. Whenever user changes the frequency the acquisition and transmission loops are stopped. As Tx/Rx Configuration VI is inside the outer while loop (Which I added), it again runs reconfigure the USRP at new frequency then start acquisition and transmission again. 

 

In other words, I just restarted the whole Tx/Rx streaming process without stopping the VI and hence user is unaware of whatshappeing in background, but it takes 5-10 sec to reinitialize.

 

Best regards,

M Mahboob ur Rehman

 

0 Kudos
Message 8 of 8
(3,275 Views)