Re: Hierarchical blocks in a flowgraph

2021-01-19 Thread Jeff Long
... basic_block.__init__(name="freq', in_sig=[], out_sig=[]) ...

You will also need to remove the ports from the block xml file.

On Tue, Jan 19, 2021 at 5:50 PM Elmore Family  wrote:

> How do I do number (1)?
>
> Jim
>
> *From:* Jeff Long
> *Sent:* Tuesday, January 19, 2021 5:11 PM
> *To:* GNURadio Discussion List
> *Subject:* Re: Hierarchical blocks in a flowgraph
>
> [back on list]
>
> There's definitely no need to add a block just to get some Python
> functionality. If you were to do something like that, at least add a
> throttle at a very low rate. The stream processing will be useless, but it
> won't eat up the processor. On 3.8/3.9, this code could go in a Python
> Snippet block, though that's still not the right answer.
>
> A couple of other ways to do this:
> (1) make the in/out signatures empty so you don't need to hook up ports,
> probably the easiest thing to try
> (2) write a separate python program that imports the flowgraph generated
> by GRC
> (3) in 3.8/3.9 there is something called Python Snippets that might be
> able to do something like this
>
> Someone may have better ideas. I do not have 3.7 running so I can't try
> anything out for your. Good luck.
>
> On Tue, Jan 19, 2021 at 4:09 PM Elmore Family  wrote:
>
>> Jeff,
>>
>> I tried the block settings with no improvement. I also disabled the freq
>> block and I saw an improvement in the GUI response. So I assume that the
>> issue is with the freq block or its interaction with the rest of the
>> flowgraph.
>>
>> The freq block is a “general” OOT block which I use to hold a ptt
>> callback and a frequency adjust callback. I have attached the freq.py file.
>>
>> I don’t need the work and forecast functions so I removed all but what
>> would be required for the scheduler to execute. This is why I have a Null
>> Sink and Source – to satisfy the requirements for an input and an output. I
>> think this file shows the forecast code uncommented although I have
>> commented it out during testing with no change in the problem.
>>
>> Maybe there is a different way to accomplish the callbacks but I couldn’t
>> figure out anything else – I tried many things. This is my first GNU Radio
>> project (and my first exposure to Python) so I probably don’t know enough
>> not to be dangerous.
>>
>> Jim
>>
>> *From:* Jeff Long
>> *Sent:* Monday, January 18, 2021 9:52 PM
>> *To:* GNURadio Discussion List
>> *Subject:* Re: Hierarchical blocks in a flowgraph
>>
>> [replying back on the list]
>>
>> Make sure the audio sources have "allow blocking" set to "yes", and the
>> sinks to "no". Something in each flow has to control the sample rate.
>>
>> I can't tell what the null -> freq -> null part of your top level flow
>> does, but a stream with no throttle or hardware blocks can use up a lot of
>> processor and make the system unresponsive.
>>
>> My guess is that your processor is so busy doing nothing at a high rate
>> that it doesn't have time to respond to the UI.
>>
>> On Mon, Jan 18, 2021 at 7:54 PM Elmore Family  wrote:
>>
>>> Jeff,
>>>
>>> Thanks for getting back to me.
>>>
>>> Attached are the 3 flowgraphs.
>>>
>>> Jim
>>>
>>> *From:* Jeff Long
>>> *Sent:* Monday, January 18, 2021 5:42 PM
>>> *To:* GNURadio Discussion List
>>> *Subject:* Re: Hierarchical blocks in a flowgraph
>>>
>>> Hard to tell without seeing the flowgraph. Do you need a throttle?
>>>
>>> On Mon, Jan 18, 2021 at 4:31 PM Elmore's  wrote:
>>>
>>>> I have created a flowgraph which includes 2 hierarchical blocks which I
>>>> created myself.
>>>>
>>>> The entire flowgraph is a transceiver. The hierarchical blocks are a
>>>> receiver and transmitter.
>>>>
>>>> When I tested the hierarchical blocks separately, they function
>>>> correctly. However, when I enable both in the top flowgraph, the flowgraph
>>>> executes extremely slowly. It does not respond to clicks until perhaps as
>>>> much as 30 seconds later.
>>>>
>>>> I tried taking one of the hierarchical blocks to the most basic level
>>>> possible by simply using a Null Source and Sink. I still get the hang-up.
>>>>
>>>> Is there something I am not doing in the flowgraph to enable it to run
>>>> with 2 blocks? Is there some sort of configuration I need to perform to get
>>>> it to run?
>>>>
>>>> I have looked all over forums and in the docs but can’t find anything
>>>> to solve my problem.
>>>>
>>>> Thanks for any help.
>>>>
>>>> Jim
>>>>
>>>>
>>>> <http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient>
>>>>  Virus-free.
>>>> www.avg.com
>>>> <http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient>
>>>>
>>>


Re: Hierarchical blocks in a flowgraph

2021-01-19 Thread Jeff Long
[back on list]

There's definitely no need to add a block just to get some Python
functionality. If you were to do something like that, at least add a
throttle at a very low rate. The stream processing will be useless, but it
won't eat up the processor. On 3.8/3.9, this code could go in a Python
Snippet block, though that's still not the right answer.

A couple of other ways to do this:
(1) make the in/out signatures empty so you don't need to hook up ports,
probably the easiest thing to try
(2) write a separate python program that imports the flowgraph generated by
GRC
(3) in 3.8/3.9 there is something called Python Snippets that might be able
to do something like this

Someone may have better ideas. I do not have 3.7 running so I can't try
anything out for your. Good luck.

On Tue, Jan 19, 2021 at 4:09 PM Elmore Family  wrote:

> Jeff,
>
> I tried the block settings with no improvement. I also disabled the freq
> block and I saw an improvement in the GUI response. So I assume that the
> issue is with the freq block or its interaction with the rest of the
> flowgraph.
>
> The freq block is a “general” OOT block which I use to hold a ptt callback
> and a frequency adjust callback. I have attached the freq.py file.
>
> I don’t need the work and forecast functions so I removed all but what
> would be required for the scheduler to execute. This is why I have a Null
> Sink and Source – to satisfy the requirements for an input and an output. I
> think this file shows the forecast code uncommented although I have
> commented it out during testing with no change in the problem.
>
> Maybe there is a different way to accomplish the callbacks but I couldn’t
> figure out anything else – I tried many things. This is my first GNU Radio
> project (and my first exposure to Python) so I probably don’t know enough
> not to be dangerous.
>
> Jim
>
> *From:* Jeff Long
> *Sent:* Monday, January 18, 2021 9:52 PM
> *To:* GNURadio Discussion List
> *Subject:* Re: Hierarchical blocks in a flowgraph
>
> [replying back on the list]
>
> Make sure the audio sources have "allow blocking" set to "yes", and the
> sinks to "no". Something in each flow has to control the sample rate.
>
> I can't tell what the null -> freq -> null part of your top level flow
> does, but a stream with no throttle or hardware blocks can use up a lot of
> processor and make the system unresponsive.
>
> My guess is that your processor is so busy doing nothing at a high rate
> that it doesn't have time to respond to the UI.
>
> On Mon, Jan 18, 2021 at 7:54 PM Elmore Family  wrote:
>
>> Jeff,
>>
>> Thanks for getting back to me.
>>
>> Attached are the 3 flowgraphs.
>>
>> Jim
>>
>> *From:* Jeff Long
>> *Sent:* Monday, January 18, 2021 5:42 PM
>> *To:* GNURadio Discussion List
>> *Subject:* Re: Hierarchical blocks in a flowgraph
>>
>> Hard to tell without seeing the flowgraph. Do you need a throttle?
>>
>> On Mon, Jan 18, 2021 at 4:31 PM Elmore's  wrote:
>>
>>> I have created a flowgraph which includes 2 hierarchical blocks which I
>>> created myself.
>>>
>>> The entire flowgraph is a transceiver. The hierarchical blocks are a
>>> receiver and transmitter.
>>>
>>> When I tested the hierarchical blocks separately, they function
>>> correctly. However, when I enable both in the top flowgraph, the flowgraph
>>> executes extremely slowly. It does not respond to clicks until perhaps as
>>> much as 30 seconds later.
>>>
>>> I tried taking one of the hierarchical blocks to the most basic level
>>> possible by simply using a Null Source and Sink. I still get the hang-up.
>>>
>>> Is there something I am not doing in the flowgraph to enable it to run
>>> with 2 blocks? Is there some sort of configuration I need to perform to get
>>> it to run?
>>>
>>> I have looked all over forums and in the docs but can’t find anything to
>>> solve my problem.
>>>
>>> Thanks for any help.
>>>
>>> Jim
>>>
>>>
>>> <http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient>
>>>  Virus-free.
>>> www.avg.com
>>> <http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient>
>>>
>>


Re: Hierarchical blocks in a flowgraph

2021-01-18 Thread Jeff Long
[replying back on the list]

Make sure the audio sources have "allow blocking" set to "yes", and the
sinks to "no". Something in each flow has to control the sample rate.

I can't tell what the null -> freq -> null part of your top level flow
does, but a stream with no throttle or hardware blocks can use up a lot of
processor and make the system unresponsive.

My guess is that your processor is so busy doing nothing at a high rate
that it doesn't have time to respond to the UI.

On Mon, Jan 18, 2021 at 7:54 PM Elmore Family  wrote:

> Jeff,
>
> Thanks for getting back to me.
>
> Attached are the 3 flowgraphs.
>
> Jim
>
> *From:* Jeff Long
> *Sent:* Monday, January 18, 2021 5:42 PM
> *To:* GNURadio Discussion List
> *Subject:* Re: Hierarchical blocks in a flowgraph
>
> Hard to tell without seeing the flowgraph. Do you need a throttle?
>
> On Mon, Jan 18, 2021 at 4:31 PM Elmore's  wrote:
>
>> I have created a flowgraph which includes 2 hierarchical blocks which I
>> created myself.
>>
>> The entire flowgraph is a transceiver. The hierarchical blocks are a
>> receiver and transmitter.
>>
>> When I tested the hierarchical blocks separately, they function
>> correctly. However, when I enable both in the top flowgraph, the flowgraph
>> executes extremely slowly. It does not respond to clicks until perhaps as
>> much as 30 seconds later.
>>
>> I tried taking one of the hierarchical blocks to the most basic level
>> possible by simply using a Null Source and Sink. I still get the hang-up.
>>
>> Is there something I am not doing in the flowgraph to enable it to run
>> with 2 blocks? Is there some sort of configuration I need to perform to get
>> it to run?
>>
>> I have looked all over forums and in the docs but can’t find anything to
>> solve my problem.
>>
>> Thanks for any help.
>>
>> Jim
>>
>>
>> <http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient>
>>  Virus-free.
>> www.avg.com
>> <http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient>
>>
>


Re: Hierarchical blocks in a flowgraph

2021-01-18 Thread Jeff Long
Hard to tell without seeing the flowgraph. Do you need a throttle?

On Mon, Jan 18, 2021 at 4:31 PM Elmore's  wrote:

> I have created a flowgraph which includes 2 hierarchical blocks which I
> created myself.
>
> The entire flowgraph is a transceiver. The hierarchical blocks are a
> receiver and transmitter.
>
> When I tested the hierarchical blocks separately, they function correctly.
> However, when I enable both in the top flowgraph, the flowgraph executes
> extremely slowly. It does not respond to clicks until perhaps as much as 30
> seconds later.
>
> I tried taking one of the hierarchical blocks to the most basic level
> possible by simply using a Null Source and Sink. I still get the hang-up.
>
> Is there something I am not doing in the flowgraph to enable it to run
> with 2 blocks? Is there some sort of configuration I need to perform to get
> it to run?
>
> I have looked all over forums and in the docs but can’t find anything to
> solve my problem.
>
> Thanks for any help.
>
> Jim
>
>
> 
>  Virus-free.
> www.avg.com
> 
> <#m_-7191818500709340290_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
>


Hierarchical blocks in a flowgraph

2021-01-18 Thread Elmore's
I have created a flowgraph which includes 2 hierarchical blocks which I created 
myself.

The entire flowgraph is a transceiver. The hierarchical blocks are a receiver 
and transmitter.

When I tested the hierarchical blocks separately, they function correctly. 
However, when I enable both in the top flowgraph, the flowgraph executes 
extremely slowly. It does not respond to clicks until perhaps as much as 30 
seconds later.

I tried taking one of the hierarchical blocks to the most basic level possible 
by simply using a Null Source and Sink. I still get the hang-up.

Is there something I am not doing in the flowgraph to enable it to run with 2 
blocks? Is there some sort of configuration I need to perform to get it to run?

I have looked all over forums and in the docs but can’t find anything to solve 
my problem.

Thanks for any help.

Jim

--
This email has been checked for viruses by AVG.
https://www.avg.com