Change variables in the FFT Plot the 2

Hi All,

i am trying to get the FFT Plot Sink under grc(gnuradio
companion) to work. But the x-min and the x-max can’t
be set up. As i read the x-Axis should be fitted by the
samp_rate variable, but it does not work.

Any Ideas ?

Regards Markus

feldmaus <feldmann_markus gmx.de> writes:

Hi All,

i am trying to get the FFT Plot Sink under grc(gnuradio
companion) to work. But the x-min and the x-max can’t
be set up. As i read the x-Axis should be fitted by the
samp_rate variable, but it does not work.

Any Ideas ?
I watched in the code and found an error.
There is something mising to set up the value
samp_rate of the graphical FFT Plot sink.

@Developer
please correct this.
WRONG:
def set_samp_rate(self, samp_rate):
self.samp_rate = samp_rate

Not really RIGHT:
def set_samp_rate(self, samp_rate):
self.samp_rate = samp_rate
self.wxgui_fftsink2.set_samp_rate(self.samp_rate)

How is the Name of the method to set up the samp_rate ?

Regards Markus

feldmaus <feldmann_markus gmx.de> writes:

Not really RIGHT:
def set_samp_rate(self, samp_rate):
self.samp_rate = samp_rate
self.wxgui_fftsink2.set_samp_rate(self.samp_rate)

How is the Name of the method to set up the samp_rate ?
self.wxgui_fftsink2.set_sample_rate(self.samp_rate)

Please follow the directions to enable the wxgui - open gl sinks:

http://gnuradio.org/trac/browser/gnuradio/trunk/gr-wxgui/README.gl

Let me know how it works for you!
-Josh

Josh B. <josh joshknows.com> writes:

Please follow the directions to enable the wxgui - open gl sinks:

http://gnuradio.org/trac/browser/gnuradio/trunk/gr-wxgui/README.gl

Let me know how it works for you!
Hi Josh,

my Suse PC has a,
ATI Radeon X300 (RV370) 5B60(PCIE)

and i think my 3d Acceleration driver is working:
$glxinfo
name of display: :0.0
display: :0 screen: 0
direct rendering: Yes
I followed the Instructions of your Link above,
and got a segmentation fault.

I installed the Package.
Any Packages i should also install ?

Is there a 3d Testing Tool under Lnux, not
the glxinfo command.

Regards markus

Josh B. <josh joshknows.com> writes:

feldmaus wrote:

feldmaus <feldmann_markus gmx.de> writes:

Not really RIGHT:
def set_samp_rate(self, samp_rate):
self.samp_rate = samp_rate
self.wxgui_fftsink2.set_samp_rate(self.samp_rate)

How is the Name of the method to set up the samp_rate ?
self.wxgui_fftsink2.set_sample_rate(self.samp_rate)

This works for me but sometimes it crashes so it should be a Problem
with
your min max of the Object <self.wxgui_fftsink2> ?

Maybe sometimes he try to set an not allowed Value.
Can you please check this ?

Regards Markus

feldmaus <feldmann_markus gmx.de> writes:

Is there a 3d Testing Tool under Lnux, not
the glxinfo command.
I tested my 3d with,
$glxgears

and works.
So i will disable the gl.
Or do you have any Hints ?
I think my Problem with the set_sample_rate
is not be coherent with the gl Problem?

Regards Markus

Josh B. <josh joshknows.com> writes:

Using GRC, I just tested changing the sample rate of the fftsink. I
tested this for the gl and non gl version. The x-axis markers move and
change correctly when I move the slider for sample rate. The
flowgraph.grc is attached.

I do not understand why you have the problem? Do you have the latest
gnuradio trunk installed? http://gnuradio.org/svn/gnuradio/trunk
I have the SVN Version 2009-Jan-28.
Further on everytimen i open my *.grc file, the deletes the
manually
inserted class-method,
<set_sample_rate>
so there must be a Problem.

Also, I am concerned that the gl fftsink aborted/segfaulted. Can you run
the flow graph in gdb and send the traceback?

Yes i will try this and post the message here.

Another important Point,
Is there a possibility to save my manually inserted python commands
in the <top_block.py> file without loosing this by the next
start of ?

Regards Markus

feldmaus wrote:

I have the SVN Version 2009-Jan-28.
Aha, I believe that I added the set_sample_rate callback recently
(possibly in February). svn up!

Further on everytimen i open my *.grc file, the deletes the manually
inserted class-method,
<set_sample_rate>
so there must be a Problem.

When you generate or run a flow graph in grc, the generated flow graph
is always overwritten.

Also, I am concerned that the gl fftsink aborted/segfaulted. Can you run
the flow graph in gdb and send the traceback?

Yes i will try this and post the message here.

Another important Point,
Is there a possibility to save my manually inserted python commands
in the <top_block.py> file without loosing this by the next
start of ?

Nope, too complicated!

If you want to change things: the best way is to manipulate the xml
block wrappers or make your own custom wrappers:

http://gnuradio.org/trac/wiki/GNURadioCompanion#AddingCustomBlocks

And here is fftsink:

http://gnuradio.org/trac/browser/gnuradio/trunk/grc/data/platforms/python/blocks/wxgui_fftsink2.xml

Using GRC, I just tested changing the sample rate of the fftsink. I
tested this for the gl and non gl version. The x-axis markers move and
change correctly when I move the slider for sample rate. The
flowgraph.grc is attached.

I do not understand why you have the problem? Do you have the latest
gnuradio trunk installed? http://gnuradio.org/svn/gnuradio/trunk


Also, I am concerned that the gl fftsink aborted/segfaulted. Can you run
the flow graph in gdb and send the traceback?

-Josh

I do not understand why you have the problem? Do you have the latest
gnuradio trunk installed? http://gnuradio.org/svn/gnuradio/trunk
I have the SVN Version 2009-Jan-28.

It was this changeset on jan 28th
http://gnuradio.org/trac/changeset/10327

Make sure the files are installed.

good luck
-josh

Josh B. <josh joshknows.com> writes:

Also, I am concerned that the gl fftsink aborted/segfaulted. Can you run
the flow graph in gdb and send the traceback?
I thought you were interested in some debugging of this Problem.
If not i will not go any further in this point.

So i used (Python Debugger) in Emacs and tried to find out
the Bug. I did some break Points and can execute my Python Code
until,
##################################################################
#!/usr/bin/env python

encoding: utf8

“”"
Title:Mehrfrequentes Impulsmessverfahren mit FPGA-
gestützten SDR-(Software definded radio)-Komponenten.
Beschreibung: Mit Hilfe dieses Programmes soll ein
mehrfrequentes Impulsmessverfahren entwickelt werden,
womit Teilentladungen an Hochspannungsisolationen
nachgewiesen werden können.

“”"

title=‘Mehrfrequentes Impulsmessverfahren’
author=‘Markus F.’
version=‘Diplom WS08/09 Ver.:2009-02-27-01’
license=‘GPL’

from gnuradio import gr
from gnuradio.wxgui import fftsink2
##################################################################

doesn’t know python code?

If i execute my Code line b line than i have to wait very long.
Any ideas ?

Regards markus