# Re: Scheduling a block even with no input items RE: Flow graph blocking when doing 2x1 transmission

**URL:** <https://www.ruby-forum.com/t/re-scheduling-a-block-even-with-no-input-items-re-flow-graph-blocking-when-doing-2x1-transmission/230223>\
**Category:** GNU Radio\
**Created:** [June 5, 2014, 10:20am UTC](https://www.ruby-forum.com/t/re-scheduling-a-block-even-with-no-input-items-re-flow-graph-blocking-when-doing-2x1-transmission/230223 "2014-06-05T10:20:42Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jason\_sam](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/7993a0/32.png) [@jason\_sam](https://www.ruby-forum.com/u/jason_sam)\
**Post date:** [June 5, 2014, 10:20am UTC](https://www.ruby-forum.com/t/re-scheduling-a-block-even-with-no-input-items-re-flow-graph-blocking-when-doing-2x1-transmission/230223/1 "2014-06-05T10:20:42Z")

</div>

-------- Original message --------  
From: Activecat  
Date:2014/06/05 7:57 AM (GMT+00:00)  
To: David Halls ,removed\_email\_address@domain.invalid  
Subject: Re: [Discuss-gnuradio] Scheduling a block even with no input  
items RE: Flow graph blocking when doing 2x1 transmission

On Wed, Jun 4, 2014 at 7:10 PM, David Halls  
\<removed\_email\_address@domain.invalid[mailto:removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)\>  
wrote:  
Activecat,  
In fact my horrible hack doesn’t work properly. Once items start  
arriving at Payload TD Tx 2, they still don’t arrive as ‘consistently’  
(for want of a better word), as those from the Noise Source block, and  
thus zeros are inserted when they are not required!

David

David,

Basically my idea to solve the problem may involve an overhaul of your  
existing flowgraph, as below:

1). You must understand that the output of UHD source is at constant  
rate. In particular I am referring to the “Relay Rx” USRP.  
Even when the USRP does not receive any RF signal, it keeps  
sending out zeros (plus noise) as its output, at constant rate.

```
  Try to make all your blocks behave in this way. I am referring to 

```

the blocks between the “Relay Rx” and “Relay Tx”.  
The idea is: keep transmitting, don’t produce no output at any  
time. If nothing need to be produced, then output zeros at constant  
rate.  
In this case all your custom blocks are either sync block,  
decimation or interpolation blocks. You don’t need any general block.

2). With above condition fulfilled, we could ensure that the data fed  
into the “Relay Tx” USRP is at constant rate, and we could then  
determine this rate by simple calculations.  
The data stream into the “Relay Tx” USRP will not stop at any  
instance. It is ‘consistent’.

3). You want the “Relay Rx” USRP ignores the received signal during the  
time that the “Relay Tx” USRP is transmitting, that is fine.  
But just try to make the downstream block of “Relay Rx” USRP keep  
transmitting zeros rather than stop transmitting during this period.

4). With these, you will have both “Relay Tx” USRP and “Source” USRP  
transmitting at constant data rate and nonstop.  
They could be transmitting at different rates, that is ok, and  
this is not difficult to handle.

With this, you avoid the initial problem (problem of occasionally there  
is no items at one of the inputs) mentioned in this thread, which is the  
root cause of your problem.  
Then your problem is solved !

Great! Thanks active cat. This will take some time, I’ll will report  
back once I have it working!! 🙂

* * *

NOTE: The information in this email and any attachments may be  
confidential and/or legally privileged. This message may be read, copied  
and used only by the intended recipient. If you are not the intended  
recipient, please destroy this message, delete any copies held on your  
system and notify the sender immediately.

Toshiba Research Europe Limited, registered in England and Wales  
(2519556). Registered Office 208 Cambridge Science Park, Milton Road,  
Cambridge CB4 0GZ, England. Web: www.toshiba.eu/research/trl

---

<div class="post-metadata">

**Author:** ![divotdave](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/bbe5ce/32.png) [@divotdave](https://www.ruby-forum.com/u/divotdave)\
**Post date:** [June 8, 2014, 7:26am UTC](https://www.ruby-forum.com/t/re-scheduling-a-block-even-with-no-input-items-re-flow-graph-blocking-when-doing-2x1-transmission/230223/2 "2014-06-08T07:26:07Z")

</div>

On Thu, Jun 5, 2014 at 4:19 PM, David Halls  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> decimation or interpolation blocks. You don’t need any general block.  
> transmitting zeros rather than stop transmitting during this period.
> 
> Great! Thanks active cat. This will take some time, I’ll will report  
> back once I have it working!! 🙂

Hi David,

I have a “frequency counter” block [1], could be used as an example.  
The “freq\_counter1” is a general block, it was implemented as a sync  
block  
in “freq\_counter2”.  
You may run examples/flowgraph\_07.grc and flowgraph\_08.grc to see their  
outputs.

1. [GitHub - activecat/gr-test2: GNU Radio: more examples · GitHub](https://github.com/activecat/gr-test2)
