Hello,Johnathan Did I have some misunderstanding about it? I still think the problem is from USRP2 rather than flow graph. For example, I made some tests to change the while loop such as:
def main(): t = my_top_block() t.run() print t.c2mag.unmuted(): #show exceed threshold or not time.sleep(3) m = my_top_block() m.run() print m.c2mag.unmuted(): #show exceed threshold or not time.sleep(3) n = my_top_block() n.run() print n.c2mag.unmuted(): #show exceed threshold or not time.sleep(3) As same condition as before, after two correct outputs, the third one start to show the error. Thank you. regards, Andy Johnathan Corgan-2 wrote: > > On Wed, Apr 14, 2010 at 12:27, Andy_Long <luckshiw...@yahoo.com.cn> wrote: > >> I have faced the same problem. I try to received the limited samples from >> USRP2 by using "head"block. It should return a -1 and the flow graph will >> stop, am I right? > > The flowgraph will not only stop, but will end its lifetime. Once > run() has returned, the flowgraph is no longer usable, or as we like > to say, further operations on it are "undefined." > > In general, starting and stopping an individual flowgraph should occur > at the same level of processing as application startup and shutdown. > Anything else is usually a sign of incorrect design (though not > always.) The run() method on a top block is really just a convenient > way of telling GNU Radio your application has nothing else to do until > the flowgraph exits. > > Can you describe what you are trying to do? > > Johnathan > > > _______________________________________________ > Discuss-gnuradio mailing list > Discuss-gnuradio@gnu.org > http://lists.gnu.org/mailman/listinfo/discuss-gnuradio > > -- View this message in context: http://old.nabble.com/reconfiguring-with-usrp2-src-present-tp27615622p28252256.html Sent from the GnuRadio mailing list archive at Nabble.com. _______________________________________________ Discuss-gnuradio mailing list Discuss-gnuradio@gnu.org http://lists.gnu.org/mailman/listinfo/discuss-gnuradio