In the attached flow graph, I've created a block, "gain setter" that takes
in a number of input items and after the input items reach a certain
amount, the block will issue a command to the ursp sink to change the gain
to a certain value. I basically did this using a loop. However, it doesn't
seem like the gain of the signal changes according to the freq sink plot of
the received signal. Any ideas??

On Thu, Jul 13, 2017 at 2:48 PM, Bakshi, Arjun <
bakshi...@buckeyemail.osu.edu> wrote:

> Couldn't figure out how to reply from the digest, so I'm making a new
> post. New to this.
>
>
> Original message/context:
>
> ==============================
>
> *From*: Tellrell White
>
> I'm currently in the process of creating a block in python that does two
> things; takes in? a certain number of input items, and once it reaches a
> certain number of input items 2) it sends a command to the UHD USRP sink
> block to adjust its gain by a certain amount.
>
> I have a few questions. 1) Is it even possible to create a single block
> that can accomplish both these tasks? 2) How exactly do I make this block
> issue the command to adjust the gain after it receives a certain number of
> values??Below is some code that I currently have constructed for this
> purpose. I'm pretty new to python so I'm sure this code is probably not the
> most efficient way but any suggestions are welcome.
>
>
> ===============================
>
>
> Hey Tellrell,
>
>
> 1) I think it can be achieved using 1 block. The block will need to output
> a * message* with "gain" and the gain value whenever the input matches
> your condition. Connect the output *message* port to the USRP sink's
> command port. Message should be a pmt that looks something like ("gain",
> value).
>
>
> More info on the command port: https://gnuradio.org/doc/
> doxygen/page_uhd.html#uhd_command_syntax
>
>
>
> 2) I went ahead and implemented something as an example. Increases gain
> upto a limit and then starts over again. See attached code, xml for block,
> rxed signal plot, and flowgraph pic.
>
> I'm new to this too, so hopefully other will correct my mistakes.
>
> Regards,
>
> AB
>
> _______________________________________________
> Discuss-gnuradio mailing list
> Discuss-gnuradio@gnu.org
> https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
>
>

Attachment: gain_test.grc
Description: application/gnuradio-grc

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

Reply via email to