Difference between revisions of "QT GUI Time Sink"

From GNU Radio
Jump to navigation Jump to search
(Added pictures of control panel/trigger)
 
(11 intermediate revisions by the same user not shown)
Line 2: Line 2:
A graphical sink to display multiple signals in time.
A graphical sink to display multiple signals in time.


This is a QT-based graphical sink the takes set of a float streams and plots them in the time domain. Each signal is plotted with a different color, and the  and  functions can be used to change the label and color for a given input number.
This block does not support C++ output, so it cannot be used when the output language of a flowgraph in GRC is C++.


The sink supports plotting streaming float data or messages. The message port is named "in". The two modes cannot be used simultaneously, and should be set to 0 when using the message mode. GRC handles this issue by providing the "Float Message" type that removes the streaming port(s).
This is a QT-based graphical sink that takes sets of float or complex streams and plots them in the time domain. Each signal is plotted with a different color, and options of the block can be used to change the label and color for a given input number.


There are many parameters, across three different tabs, most of which are self-explanatory.  
The sink supports plotting streaming float data, complex data or messages. The message port is named "in". The two modes cannot be used simultaneously, and should be set to 0 when using the message mode. GRC handles this issue by providing the "Float Message" type that removes the streaming port(s).


See [[GUI Hint]] for info about how to organize multiple QT GUIs  
There are many parameters, across three different tabs of General, Trigger and Config, most of which are self-explanatory.
 
== Parameters ==
<b>(''R''):</b> <span class="plainlinks">[https://wiki.gnuradio.org/index.php/GNURadioCompanion#Variable_Controls ''Run-time adjustable'']</span>
 
=== General ===
 
; Type
:* Complex
:* Float
:* Complex Message
:* Float Message
 
; Name
: The name of the plot. It is shown on the top of the plot in the output window.
 
; Y Axis Label
: The Y Axis Label to be added to the plot. The x-axis label is 'Time', which is added automatically to the plot.
 
; Y Axis Unit
: The unit of data to be shown infront of the Y Axis Label. It is shown in round brackets.
 
; Number of Points
: Sample Rate (''R'')
 
; Grid
:* Yes: Adds a grid to the plot
:* No: No grid added to the plot
 
; Autoscale
:* Yes: Automatically adjust the maximum and minimum y axis values of the plot to contain the entire plot along y axis. Choosing this option overrides the values specified in Y min and Y max input parameters.
:* No: Does not automatically adjust the plot. The values of Y min and Y max are used to create the plot.
 
; Y min (''R'')
: The minimum y axis value to be automatically shown in the plot
 
; Y max (''R'')
: The maximum y axis value to be automatically shown in the plot
 
; Number of Inputs
: Total number of input ports to be created on this block
 
; Update Period (''R'')
: The period after which the plot data will be updated
 
; Disp. Tags
:* Yes: Display the tags in the plot
:* No: Do not display the tags in the plot
 
; GUI Hint
: This parameter controls the placement of the plot in the output window. See [[GUI Hint]] for info about how to organize multiple QT GUIs.


== Example Flowgraph ==
== Example Flowgraph ==
Line 17: Line 67:


Qt GUI Time Sink showing its control panel, with trigger settings.
Qt GUI Time Sink showing its control panel, with trigger settings.
[[File:Timesink-ctrl-large.jpg]]


Qt GUI Time Sink showing its control panel, with trigger settings (smaller version).
[[File:Timesink-ctrl-large.jpg|600px]]
[[File:Timesink-ctrl-small.jpg]]
 
== Source Files ==
 
; C++ files
: [https://github.com/gnuradio/gnuradio/blob/main/gr-qtgui/lib/time_sink_c_impl.cc time_sink_complex_impl.cc]
: [https://github.com/gnuradio/gnuradio/blob/main/gr-qtgui/lib/time_sink_f_impl.cc time_sink_float_impl.cc]
 
; Header files
: [https://github.com/gnuradio/gnuradio/blob/main/gr-qtgui/lib/time_sink_c_impl.h time_sink_complex_impl.h]
: [https://github.com/gnuradio/gnuradio/blob/main/gr-qtgui/lib/time_sink_f_impl.h time_sink_float_impl.h]
 
; Public header files
: [https://github.com/gnuradio/gnuradio/blob/main/gr-qtgui/include/gnuradio/qtgui/time_sink_c.h time_sink_complex.h]
: [https://github.com/gnuradio/gnuradio/blob/main/gr-qtgui/include/gnuradio/qtgui/time_sink_f.h time_sink_float.h]
 
; Block definition
: [https://github.com/gnuradio/gnuradio/blob/main/gr-qtgui/grc/qtgui_time_sink_x.block.yml qtgui_time_sink_x.block.yml]

Latest revision as of 06:35, 27 January 2022

A graphical sink to display multiple signals in time.

This block does not support C++ output, so it cannot be used when the output language of a flowgraph in GRC is C++.

This is a QT-based graphical sink that takes sets of float or complex streams and plots them in the time domain. Each signal is plotted with a different color, and options of the block can be used to change the label and color for a given input number.

The sink supports plotting streaming float data, complex data or messages. The message port is named "in". The two modes cannot be used simultaneously, and should be set to 0 when using the message mode. GRC handles this issue by providing the "Float Message" type that removes the streaming port(s).

There are many parameters, across three different tabs of General, Trigger and Config, most of which are self-explanatory.

Parameters[edit]

(R): Run-time adjustable

General[edit]

Type
  • Complex
  • Float
  • Complex Message
  • Float Message
Name
The name of the plot. It is shown on the top of the plot in the output window.
Y Axis Label
The Y Axis Label to be added to the plot. The x-axis label is 'Time', which is added automatically to the plot.
Y Axis Unit
The unit of data to be shown infront of the Y Axis Label. It is shown in round brackets.
Number of Points
Sample Rate (R)
Grid
  • Yes: Adds a grid to the plot
  • No: No grid added to the plot
Autoscale
  • Yes: Automatically adjust the maximum and minimum y axis values of the plot to contain the entire plot along y axis. Choosing this option overrides the values specified in Y min and Y max input parameters.
  • No: Does not automatically adjust the plot. The values of Y min and Y max are used to create the plot.
Y min (R)
The minimum y axis value to be automatically shown in the plot
Y max (R)
The maximum y axis value to be automatically shown in the plot
Number of Inputs
Total number of input ports to be created on this block
Update Period (R)
The period after which the plot data will be updated
Disp. Tags
  • Yes: Display the tags in the plot
  • No: Do not display the tags in the plot
GUI Hint
This parameter controls the placement of the plot in the output window. See GUI Hint for info about how to organize multiple QT GUIs.

Example Flowgraph[edit]

Noise-source-ex.png

Control Panel & Triggering[edit]

Qt GUI Time Sink showing its control panel, with trigger settings.

Timesink-ctrl-large.jpg

Source Files[edit]

C++ files
time_sink_complex_impl.cc
time_sink_float_impl.cc
Header files
time_sink_complex_impl.h
time_sink_float_impl.h
Public header files
time_sink_complex.h
time_sink_float.h
Block definition
qtgui_time_sink_x.block.yml