discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] sampling rate of a customized signal source


From: Activecat
Subject: Re: [Discuss-gnuradio] sampling rate of a customized signal source
Date: Sat, 31 May 2014 23:47:25 +0800


On Sat, May 31, 2014 at 11:03 PM, Pengyu Zhang <address@hidden> wrote:
Hi Activecat,

Thanks for your detailed examples. I will try set_output_multiple() and tell you my user experiences :)

I still have a question which was posted at the beginning of my previous email. How to configure the "Sample Rate" (which is samp_rate) as one of the variables of my custom block? For blocks provided by GRC, you can click the GUI block and see an option of setting the sample rate. For customized block, how to integrate this variable in the c++ code? Is there an example that I can follow? Thanks.

Pengyu


I've created a sample for you at https://github.com/activecat/gr-test1
You could run the flowgraph found in the "examples" directory.
Try to change the samp_rate of the flowgraph from 32kHz to different values (64kHz, 200kHrz etc).
You will observe via the GUI Scope Sink, that the block consistently produces two 1ms pulse for every 10ms.

reply via email to

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