Forum: GNU Radio GRC 3.7: QT GUI Sink: Frequency display: Center Frequency bug?

C4164bf481aa95c817f00345b58afb76?d=identicon&s=25 Tom M. (tom_m70)
on 2013-08-14 00:35
(Received via mailing list)
Hi,

Recently upgraded to GRC 3.7 (from 3.6.5). The QT GUI Sink Frequency
Display: Center
Frequency (Hz) control and the 'Display RF Frequencies' checkbox do not
seem to be
operating correctly in GRC 3.7.

In GRC 3.6, Center Frequency (on the block properties) had no effect on
the actual display.
If a value was entered in Center Frequency (Hz), there was no change to
the display at all.
If the 'Display RF Frequencies' checkbox was checked and a non-zero
value was in the
Center Frequency (Hz) block, then the display did not change, but the
X-Axis labels were
changed to the sum of (display + Center Frequency). I think this agrees
with the
documentation. This was very useful for example as the NCO frequency of
a down-converting
receiver could be entered in the Center Frequency box, and when 'Display
RF Frequencies'
box was checked, the frequency display would show the actual RF
frequency of the signal prior
to downconversion. Searching the discuss-gnuradio archives on the topic
revealed the last
post on this topic in 2011, and that this seemed to be the intended
operation of the controls.

In GRC 3.7 however it does not work this way. Placing a value in Center
Frequency (Hz) shifts
the graphical display. If Center Frequency has a value greater than the
display width, then
in fact nothing at all is displayed on the graph (it would all be
shifted past the right side). The X-Axis
labels are altered whether or not the Display RF Frequencies checkbox is
selected. For
example: a 10 KHz complex waveform shows a single peak at 10 KHz when
Center
Frequency = 0. But if Center Frequency = 10000 is selected (Display RF =
off), then the single
peak is shifted to the right on the display, and appears over the 20000
Hz indicator. The display
range is labeled -6 to +26 KHz. For the above, when Display RF
Frequencies is selected, the
X-Axis displays +5 to +15 KHz, and the single peak shows at a frequency
of 11.56 KHz.

I've tried to think of the ways that these controls might have been
repurposed, but can't come up
with a combination that would give this behavior, so assume that it may
be a bug. The way
it worked in GRC 3.6 would be desired behavior.

Below is the simple GRC 3.7 flowgraph to demonstrate:
 (Signal Source (complex) -> throttle (complex) -> QT GUI Sink
(complex)).


Thanks.

-- Tom, N5EG


<?xml version='1.0' encoding='ASCII'?>
<flow_graph>
 <timestamp>Tue Aug 13 05:53:25 2013</timestamp>
 <block>
 <key>options</key>

<param>
 <key>id</key>
 <value>top_block</value>
 </param>
 <param>
 <key>_enabled</key>
 <value>True</value>
 </param>
 <param>
 <key>title</key>
 <value></value>
 </param>
 <param>

<key>author</key>
 <value></value>
 </param>
 <param>
 <key>description</key>
 <value></value>
 </param>
 <param>
 <key>window_size</key>
 <value>1280, 1024</value>
 </param>
 <param>
 <key>generate_options</key>
 <value>qt_gui</value>
 </param>
 <param>
 <key>category</key>
 <value>Custom</value>

</param>
 <param>
 <key>run_options</key>
 <value>prompt</value>
 </param>
 <param>
 <key>run</key>
 <value>True</value>
 </param>
 <param>
 <key>max_nouts</key>
 <value>0</value>
 </param>
 <param>
 <key>realtime_scheduling</key>
 <value></value>
 </param>
 <param>

<key>_coordinate</key>
 <value>(10, 10)</value>
 </param>
 <param>
 <key>_rotation</key>
 <value>0</value>
 </param>
 </block>
 <block>
 <key>variable</key>
 <param>
 <key>id</key>
 <value>samp_rate</value>
 </param>
 <param>
 <key>_enabled</key>
 <value>True</value>
 </param>
 <param>

<key>value</key>
 <value>32000</value>
 </param>
 <param>
 <key>_coordinate</key>
 <value>(10, 170)</value>
 </param>
 <param>
 <key>_rotation</key>
 <value>0</value>
 </param>
 </block>
 <block>
 <key>blocks_throttle</key>
 <param>
 <key>id</key>
 <value>blocks_throttle_0</value>
 </param>
 <param>

<key>_enabled</key>
 <value>True</value>
 </param>
 <param>
 <key>type</key>
 <value>complex</value>
 </param>
 <param>
 <key>samples_per_second</key>
 <value>samp_rate</value>
 </param>
 <param>
 <key>vlen</key>
 <value>1</value>
 </param>
 <param>
 <key>_coordinate</key>
 <value>(481, 479)</value>

</param>
 <param>
 <key>_rotation</key>
 <value>0</value>
 </param>
 </block>
 <block>
 <key>analog_sig_source_x</key>
 <param>
 <key>id</key>
 <value>analog_sig_source_x_0</value>
 </param>
 <param>
 <key>_enabled</key>
 <value>True</value>
 </param>
 <param>
 <key>type</key>
 <value>complex</value>

</param>
 <param>
 <key>samp_rate</key>
 <value>samp_rate</value>
 </param>
 <param>
 <key>waveform</key>
 <value>analog.GR_COS_WAVE</value>
 </param>
 <param>
 <key>freq</key>
 <value>5000</value>
 </param>
 <param>
 <key>amp</key>
 <value>1</value>
 </param>
 <param>

<key>offset</key>
 <value>0</value>
 </param>
 <param>
 <key>_coordinate</key>
 <value>(247, 450)</value>
 </param>
 <param>
 <key>_rotation</key>
 <value>0</value>
 </param>
 </block>
 <block>
 <key>qtgui_sink_x</key>
 <param>
 <key>id</key>
 <value>qtgui_sink_x_0</value>
 </param>
 <param>

<key>_enabled</key>
 <value>True</value>
 </param>
 <param>
 <key>type</key>
 <value>complex</value>
 </param>
 <param>
 <key>name</key>
 <value>QT GUI Plot</value>
 </param>
 <param>
 <key>fftsize</key>
 <value>1024</value>
 </param>
 <param>
 <key>wintype</key>
 <value>firdes.WIN_BLACKMAN_hARRIS</value>

</param>
 <param>
 <key>fc</key>
 <value>10000</value>
 </param>
 <param>
 <key>bw</key>
 <value>samp_rate</value>
 </param>
 <param>
 <key>rate</key>
 <value>10</value>
 </param>
 <param>
 <key>plotfreq</key>
 <value>True</value>
 </param>
 <param>
 <key>plotwaterfall</key>

<value>True</value>
 </param>
 <param>
 <key>plottime</key>
 <value>True</value>
 </param>
 <param>
 <key>plotconst</key>
 <value>True</value>
 </param>
 <param>
 <key>gui_hint</key>
 <value></value>
 </param>
 <param>
 <key>freqchangevar</key>
 <value>None</value>
 </param>
 <param>

<key>_coordinate</key>
 <value>(757, 446)</value>
 </param>
 <param>
 <key>_rotation</key>
 <value>0</value>
 </param>
 </block>
 <connection>
 <source_block_id>analog_sig_source_x_0</source_block_id>
 <sink_block_id>blocks_throttle_0</sink_block_id>
 <source_key>0</source_key>
 <sink_key>0</sink_key>
 </connection>
 <connection>
 <source_block_id>blocks_throttle_0</source_block_id>
 <sink_block_id>qtgui_sink_x_0</sink_block_id>

<source_key>0</source_key>
 <sink_key>0</sink_key>
 </connection>
</flow_graph>
C539637020fd56193dd6daec746c4a84?d=identicon&s=25 Tom Rondeau (Guest)
on 2013-08-22 15:40
(Received via mailing list)
On Tue, Aug 13, 2013 at 6:34 PM, Tom McDermott
<tom.mcdermott4@yahoo.com> wrote:
> changed to the sum of (display + Center Frequency).  I think this agrees with
the
> example: a 10 KHz complex waveform shows a single peak at 10 KHz when Center
>     (Signal Source (complex) -> throttle (complex) -> QT GUI Sink (complex)).
>
>
> Thanks.
>
> -- Tom, N5EG


I just pushed a fix for this to our git repo yesterday. Silly bug
between Qwt 5.2 and 6 for handling the zoomer object.

--
Tom
Visit us at GRCon13 Oct. 1 - 4
http://www.trondeau.com/grcon13
Please log in before posting. Registration is free and takes only a minute.
Existing account

NEW: Do you have a Google/GoogleMail, Yahoo or Facebook account? No registration required!
Log in with Google account | Log in with Yahoo account | Log in with Facebook account
No account? Register here.