[Top][All Lists]

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

Re: [Discuss-gnuradio] Changing the USRP transmitter gain after a timeou

From: Qurat-Ul-Ann Akbar
Subject: Re: [Discuss-gnuradio] Changing the USRP transmitter gain after a timeout
Date: Fri, 24 Feb 2017 11:29:52 -0600

I have looked at that file and you have made gain, frequency, and LO offset variables and then you send messages every 2 secs. When I run the file, I try to change the frequency from 2.4 to 2.5 G using the glider in the GUI. It should change the value of the variable which should be reflected in the actual center frequency. However, I do not see the frequency changing after 2 secs in the Frequency Sink Plot. Is that the right way to change the value of the variable ?

On Fri, Feb 24, 2017 at 11:06 AM, Derek Kozel <address@hidden> wrote:

For every message which you send UHD would change the gain once. So in order to alternate every 100ms you would send 10 messages a second, advancing the timestamp value by 100ms each time. The example I linked to shows the frequency and gain being changed every two seconds. You'll just need to alter the arguments to have it alternate the gain.


On Fri, Feb 24, 2017 at 8:52 AM, Qurat-Ul-Ann Akbar <address@hiddennorthwestern.edu> wrote:
Also I want to keep doing this in a loop (the values keep alternating after an interval). Will it be possible through the command port interface ?

On Fri, Feb 24, 2017 at 9:17 AM, Qurat-Ul-Ann Akbar <address@hiddenstern.edu> wrote:
Hi Derek,

Thank you for your email. If you could find that file it would be really helpful. What I want to do is to alternate between two or more values of gain after specific intervals. Can I alternate like this using the command port interface? How will the block USRP sink block know which value to use ? Can you kindly explain that a bit.

On Thu, Feb 23, 2017 at 4:23 PM, Derek Kozel <address@hidden> wrote:

The command port interface can be used to change the gain value. There is an example of creating messages for tuning included in gr-uhd.

I've used a function probe to generate coarsely timed "tick" messages to a custom python block which is correctly formatting the messages before. Unfortunately I cannot find that GRC file at the moment. The function probe will run at an approximate interval dependent on your system and GNU Radio's scheduler. If you don't need exact timing then just use the gain message and function probe, if you do need exact timing include both time and gain values in the pmt command message then the gain will be applied at the specific time based on the radio timestamp. Set the Sync setting to unknown_pps, which will set the radio timestamp to 0 when the flowgraph starts, and set the initial timestamp for the command port message to a second or two in the future to account for the startup time of the flowgraph.


On Thu, Feb 23, 2017 at 1:36 PM, Qurat-Ul-Ann Akbar <address@hiddenstern.edu> wrote:

I want to alternate the gain of the USRP between two values after a certain period of time. For example after 100 ms it should go from A to B and after another 100 ms the value should go from B to A and so on. 

Is there an easy way of doing this in the GNU Radio companion or would I need to start a timer in python and put an IF condition to keep changing the value? Can I do this somehow using the probe block?

Discuss-gnuradio mailing list

reply via email to

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