From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

USRP Software Radio

cancel
Showing results for 
Search instead for 
Did you mean: 

niUSRP Configure Signal.vi not allowed inside loops?

Solved!
Go to solution

It seems that niUSRP Configure Signal.vi is not allowed in loops. After stopping the VI I get this message:

 

niUSRP Configure Signal.vi<ERR>This attribute cannot be modified while the driver is in the Running state.

 

Is there a way to change the carrier frequency while the driver is running? Using the niUSRP Property Node.vi to set a new frequency within a loop is also not working. My goal is to create frequency hopping with the USRP.

 


0 Kudos
Message 1 of 7
(8,401 Views)

Hi YYY,

 

Unfortunately, there is not a way to change the frequency of the USRP without the Configure USRP inside of the loop.  Just using the property node will not change it.

 

There is one example that shows how to do this.  It is called niUSRP FSK Tx.vi and can be found in the USRP function palette under Examples » MT Examples.  Even if you do not have Modulation Toolkit (MT) it will show the block diagram flow for how this can be accomplished.

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

Hi Sarah,

 

thank you for the fast response. If I'm not wrong then the niUSRP FSK Tx.vi only changes between FSK M-ary frequencies. What I need is a way to change the carrier frequency as often as I want it.

 

There is a long frequency hopping sequence. The Tx and Rx know it. The transmission will be realized on different frequencies. I hope you know what I mean.

0 Kudos
Message 3 of 7
(8,392 Views)
Hello -

In order to change frequencies while running a single program the start (play triangle) and stop/pause (red square) VIs are required. Changing frequencies can occur only when the acquisition is in a paused/stopped state. Once started again the acquisition begins once the LO relocks. If I remember correctly there is a spectrum analyzer example in the examples folder that uses a state machine to manage this process.
0 Kudos
Message 4 of 7
(8,389 Views)

Good News:

 

Starting with NI-USRP 1.1 (available now), you can use Configure Signal in a loop (i.e. reconfigure properties without stopping and then re-starting).  You can use Configure Signal, but you must keep the IQ Rate constant while the device is acquiring or generating.

 

The properties that can be set while the device is running:

  - gain

  - carrier frequency

  - LO frequency

  - active antenna

 

NI-USRP 1.1 can be found here:

http://joule.ni.com/nidu/cds/view/p/id/2949/lang/en

 

0 Kudos
Message 5 of 7
(8,363 Views)

I've tested the new driver with the niUSRP Tx Continuous Lab.vi. I changed the vi, so that I can use the custom control to change the carrier frequency and it worked. But when I'm trying to get the carrier frequency from an array the following error message appears:

 

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.

 

You can use the diagram disable structure to see what I mean. For my understanding it should worked, because niUSRP Configure Signal.vi get the same type of value for the carrier frequency. 

0 Kudos
Message 6 of 7
(8,356 Views)
Solution
Accepted by topic author YYYs

Hi YYY,

 

Thanks for including your VI in the post.  I was able to download it and replicate what you are seeing.  There are a few things that need to be changed in order to get this working.

 

First, you do not need to have the niUSRP Configure Signal.vi function inside of your while loop.  You can put this outside the loop and use a property node to change the frequency with a property node.  You have the property node in your code already, you just need to change it to write instead of read.  There is an example that will do exactly this if you just want to use that instead of modifying your code too.  It is called niUSRP EX Tx Continuous Async Reconfig on the Fly.vi.

 

Next, the reason that you are not able to go at the 1MS/s IQ rate with the code you have is because you are trying to read and write the frequency during every loop iteration.  Due to the time to query the hardware, set the frequency, and read the frequency back, the max IQ rate I was able to get was around 500kS/s.  This is due to a combination of hardware and driver limitations.  Even with the example listed above that uses the property node instead of the configuration function, if I put in an indicator to look at the carrier frequency I cannot use a faster IQ rate.

 

Try changing to the property node and removing this indicator, you should have a lot more success.  Let me know if that doesn't work for you or if you have any other questions, I'd be happy to help.

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