discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Discuss-gnuradio] GRC, Recording chunks of spectrum triggered on in


From: Marcus D. Leech
Subject: Re: [Discuss-gnuradio] GRC, Recording chunks of spectrum triggered on input signal level
Date: Wed, 19 Nov 2014 17:55:53 -0500
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.24) Gecko/20111108 Fedora/3.1.16-1.fc14 Thunderbird/3.1.16

On 11/18/2014 04:17 PM, Staffan Bruce wrote:
It works, many thanks!

It seems like the changing of a variable in itself does not trigger an update of other variables (that are depending on the first one), but using a button or probe will trigger an update of the variables that are depending on them. Could this be something to consider for GnuRadio/Companion, i.e., dependencies between variables and assuring that they are updated when a change is occurring in one of them?
The dependency tree in GRC *does* work, but not "backwards". If b depends on a, and a changes, b will be updated, but not the other way around.



Still, file sink notices the change of the variable it is depending on and that is enough. Now I have a good way of making separate recordings - great!

...and yes - time to start learning how to code.
I will point out, gently, that this is *software* defined radio, rather than, for example, interpretive-dance defined radio. So going into it expecting to never have to actually "code" anything is a rather naive. The GRC "Lego(tm)-like" model can, realistically, only take you so far. For one, it has a data-flow model, so doing "algorithmic" things requires that you escape from that model, which lands you smack in the middle of fairly-conventional
  software development...





Regards,
 Staffan

-----Original Message----- From: madengr
Sent: Monday, November 17, 2014 6:58 PM
To: address@hidden
Subject: Re: [Discuss-gnuradio] GRC, Recording chunks of spectrum triggered on input signal level

If you are using an "if" statement to switch between filename and /dev/null,
try putting the filename construction in the "if" statement, instead of a
separate variable. That may make it evaluate every time the "if" statement
is called.

My example used the LO frequency as part of the filename, and every time the
QT GUI slider changed the LO, it probably updated the filename.

If that does not work, maybe you can use a probe to examine a signal, say
10x a second. Then the probe level() function could be used as part of the
filename.  That would at least change it 10x a second.

For the counter, maybe you could also use a probes to look at a signal
before and after a N sample delay, where delay and sample rate is about the
same time as your probe rate; then this pseudocode:

if now.level() != delayed.level() then count = count +1

At this point though you ought to delve into the Python. As long as you are
not using the QT GUI, the code is pretty straight forward.  You can use
probes to pull values out of the flow and evaluate them in Python.

Thanks,
Lou
KD4HSO




Staffan wrote
Hello,

After some weekend experimenting I believe I have most (most...) of it
working. Sinking to a USB stick is not working so well by the way...
One thing that is still a challenge is how to set the filename. You
provided
a very good way of timestamping, but when I try this, it only evaluates
once - when I start the script. Is there any way to force re-evaluation of
a
variable?
In addition, it would be great to have some kind of a counter (variable, x
=
x + 1) that can be updated depending on a state change - for example when
a
trigger event occurrs. I tried some different versions, but mainly ended
up
in circular references...

Any suggestions would be highly appreciated!

Regards,
  Staffan





--
View this message in context: http://gnuradio.4.n7.nabble.com/GRC-Recording-chunks-of-spectrum-triggered-on-input-signal-level-tp51302p51339.html
Sent from the GnuRadio mailing list archive at Nabble.com.

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

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



--
Marcus Leech
Principal Investigator
Shirleys Bay Radio Astronomy Consortium
http://www.sbrac.org




reply via email to

[Prev in Thread] Current Thread [Next in Thread]