Hi Marcus,

Thank you very much for the detailed explanation.
Basically, in my case, the two repeat blocks will be connected to two USRPs
separately, and they are operated through two PCs. So sharing one repeat
block might not be very practical.
My thought was, when you first execute the transmission, the two channels
are synchronized until you change the repetition factor in the two repeat
blocks. Is it possible that each time the repetition factor changes, the
whole flowgraphs restart just like I click the execute button at the
beginning, then they are synchronized again? (it could be better still
keeping the USRPs synchronized, but could do it again after restart)
I tried stop(), wait(), start() and lock(), unlock() commands in the
top_block, but seems they are not for that purpose. If the flowgraphs is
not killed and execute again, the buffers are not flushed, so not exactly
as restart the whole flowgraph.
Could it be feasible in Gnuradio doing what I thought?
Thank you and best regards,
Wei



Marcus Müller <muel...@kit.edu> 于2021年9月29日周三 下午6:15写道:

> Hi Wei,
>
> it sounds to me like a bit of an "esoteric" use to adjust the number of
> repetitions at runtime for a transmission, but that should not stop you!
>
> Not all things can work, though:
>
>  >  For example, by asking the two repeat blocks always
>  > process the same amount of samples,
>
> No, that's not how GNU Radio works!
>
>  > or each time I change the
>  > parameters, the two file sources re-transmit the file from the beginning
>  > simultaneously?
>
> That wouldn't solve the fact that the repetition factor of your two
> "Repeat" blocks aren't set synchronously.
>
> Instead:
> If you want, you can:
>
> Stream A -->|Streams to|               |Vector to|--->
> Stream B -->|  Vector  |--->|repeat|-->| Streams |--->
>
> By far the most elegant way would be if you wrote your own C++ repeat
> block that has an arbitrary number (instead of just 1) input (and the
> same number of outputs). Then, you could avoid the "Streams to vector"
> and "vector to streams" trickery.
>
> Best regards,
> Marcus
>
> On 29/09/2021 18.10, Huang Wei wrote:
> > Hello everyone,
> >
> > I am testing the transmission of the same signal in parallel through two
> > repeat blocks (see attached flowgraph). The repeat times of both repeat
> > blocks are set by the same GUI range from 2 to 10.
> > When I start running the flowgraph, the two output signals are exactly
> > the same as expected. But when I change the repeat times from the GUI
> > range, the two signals are not synchronized anymore (see attached signal
> > plot).
> >
> > I am wondering, is there a way to keep the two signals always
> > synchronized? For example, by asking the two repeat blocks always
> > process the same amount of samples, or each time I change the
> > parameters, the two file sources re-transmit the file from the beginning
> > simultaneously?
> >
> > I am doing this because I want to transmit the signals simultaneously
> > through two synchronized USRPs, and I don't want the mis-match of the
> > signals due to changing the parameter in the repeat blocks every time.
> >
> > Appreciate if someone could help me!
> >
> > Regards,
> > Wei
> >
>
>

Reply via email to