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.

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 Discuss-gnuradio@gnu.org https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
No comments:
Post a Comment