# Change center freq of usrp\_source block automatically in incremental way

**URL:** <https://www.ruby-forum.com/t/change-center-freq-of-usrp-source-block-automatically-in-incremental-way/239740>\
**Category:** GNU Radio\
**Created:** [March 12, 2014, 7:27pm UTC](https://www.ruby-forum.com/t/change-center-freq-of-usrp-source-block-automatically-in-incremental-way/239740 "2014-03-12T19:27:42Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Detlef\_R](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/58f4c7/32.png) [@Detlef\_R](https://www.ruby-forum.com/u/Detlef_R)\
**Post date:** [March 12, 2014, 7:27pm UTC](https://www.ruby-forum.com/t/change-center-freq-of-usrp-source-block-automatically-in-incremental-way/239740/1 "2014-03-12T19:27:42Z")

</div>

Hi  
I want to make block diagram in grc such that the center freq of  
usrp\_source should be automatically changed in incremental way defined  
by  
min and max boundary. I don’t want to take input from qt-qui slider.  
Just like the example of usrp\_spectum\_sense.py but in grc.  
How can I do that?

Thanks  
Mitul Vekariya

---

<div class="post-metadata">

**Author:** ![MITUL\_VEKARIYA](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/57b2e6/32.png) [@MITUL\_VEKARIYA](https://www.ruby-forum.com/u/MITUL_VEKARIYA)\
**Post date:** [March 13, 2014, 9:24pm UTC](https://www.ruby-forum.com/t/change-center-freq-of-usrp-source-block-automatically-in-incremental-way/239740/2 "2014-03-13T21:24:58Z")

</div>

On Wed, Mar 12, 2014 at 7:26 PM, MITUL VEKARIYA  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Hi  
> I want to make block diagram in grc such that the center freq of usrp\_source  
> should be automatically changed in incremental way defined by min and max  
> boundary. I don’t want to take input from qt-qui slider.  
> Just like the example of usrp\_spectum\_sense.py but in grc.  
> How can I do that?
> 
> Thanks  
> Mitul Vekariya

That’s a good question. You can maybe create a variable that’s a  
simple Python function to update it’s value (the frequency) after a  
timeout.

That reminds me that I wanted to implement a GRC function block so we  
can define multi-line functions in a GRC graph, which would be much  
more useful for something like this. Never made it from my head to an  
implementation, though.

Tom
