discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Discuss-gnuradio] Timer-Chronometer


From: Marcus Müller
Subject: Re: [Discuss-gnuradio] Timer-Chronometer
Date: Thu, 28 Sep 2017 07:13:54 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0

Hi Ali,

You're getting into hand-waving territory there – I'd recommend you'd not use your PC time as an indicator of when flow graph operation started.
Instead, you should count how many items your source has already produced, and divide that number by the sampling rate.

This is one of the very rare cases where the "function probe" has a sensible use: asynchronous update of a GUI with non-sample data.

Function Probe Magic


What I did here is used "Null Source" instead of your USRP source, and gave it the id "source_block_id". I used that ID in the "function probe"'s "Block ID" field. I'm calling the block's "nitems_written" method (argument 0 means "first output stream") which gives the number of items produced by the block.
In the QT GUI Label, I'm using the ID of the Function Probe (here: "fprobe_val"), and divide that by the sampling rate. Done!

Best regards,
Marcus


On 09/27/2017 11:52 PM, Ali wrote:
Hi to all,

I have a USRP and I am writing the outputs via file sink. I want to see how much time has passed since the begining so that I can stop recording at any time I want. In other words, I want a chronometer in my GRC. It doesn't have to show miliseconds, it is enough to see seconds. What is the easiest way? Is there any ready tool?

Best regards,
Ali




_______________________________________________
Discuss-gnuradio mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


reply via email to

[Prev in Thread] Current Thread [Next in Thread]