# Spectral survey with USRP and GRC

**URL:** <https://www.ruby-forum.com/t/spectral-survey-with-usrp-and-grc/242123>\
**Category:** GNU Radio\
**Created:** [May 29, 2015, 2:23am UTC](https://www.ruby-forum.com/t/spectral-survey-with-usrp-and-grc/242123 "2015-05-29T02:23:42Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![musicdenotation](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/ea666f/32.png) [@musicdenotation](https://www.ruby-forum.com/u/musicdenotation)\
**Post date:** [May 29, 2015, 2:23am UTC](https://www.ruby-forum.com/t/spectral-survey-with-usrp-and-grc/242123/1 "2015-05-29T02:23:42Z")

</div>

Hello,

I am trying to make a simple spectral survey with a USRP and GRC. I want  
to create a flowgraph that runs for a fixed number of iterations. In  
each iteration, I need to set a new center frequency in the uhd source,  
read data from the uhd source, run fft on it, and write results to a  
file.

I have two problems I don’t know how to solve. The first one is how to  
run a grc flowgraph for a fixed number of iterations. The second one,  
which looks harder to me, is how to change the center frequency in the  
uhd source between iterations. This would be easy if the center  
frequency could be passed through an input port. I’ve done something  
like this many times in Labview. However, the center frequency can only  
be set as a variable in the uhd source.

Can this be done in grc or do I have to create the top level graph in  
Python or C++ to be able to reconfigure it after every iteration?  
Regards,Ivan
