|Subject:||Re: [Discuss-gnuradio] Changing the USRP transmitter gain after a timeout|
|Date:||Fri, 24 Feb 2017 11:29:52 -0600|
DerekRegards,Hello,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@hidden
northwestern.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@hidden stern.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:Hello,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.Regards,DerekOn Thu, Feb 23, 2017 at 1:36 PM, Qurat-Ul-Ann Akbar <address@hidden
stern.edu> wrote:______________________________Hi,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
|[Prev in Thread]||Current Thread||[Next in Thread]|