Text Figure XY Figure navigation bar

Table of Contents

Time Figure

Plots a Y versus Time graph in a separate window or on axes within a Matlab GUI.

Library

QUARC Targets/Sinks/Figures

Description

Time Figure

The Time Figure block plots its input on a Y versus Time graph. The Figure mode parameter determines where the plot is rendered.

If the figure mode is "Use figure window" then the plot is rendered in a separate window. In this case, the plot is opened by double-clicking on the block, just like a regular Scope. The properties of the block are accessed by clicking on the Time Figure Properties button on the toolbar or by right-clicking on the plot axes and selecting Time Figure Properties from the context menu. The help for the block is also accessible from a toolbar button and the context menu.

If the figure mode is "Use axes in GUI" then the plot is rendered on the axes of a preexisting MATLAB GUI. The GUI and axes are identified by the tag name associated with the figure and the axes. For example, a GUI created with GUIDE will have a tag name of 'figure1' and the first axes control placed in the GUI will have a tag name of 'axes1'. In this mode, double-clicking on the block will bring the GUI window forward if it is open, and add a context menu to the plot axes in the GUI. Otherwise it opens the block properties dialog. To access the properties of the block from the axes on the MATLAB GUI, right-click on the plot axes and select Time Figure Properties from the context menu. The help for the block is also accessible from this context menu. Note that the context menu is not available until either starting the model or double-clicking on the Time Figure block.

For AppDesigner GUIs, set the Tag property of the figure and the axes under the Component Browser/IDENTIFIERS section of the figure and axes to the tags used in the Time Figure block.

The Time Figure is available in the Signal & Scope Manager and External Mode Control Panel just like a Scope. As such, it may be used as a Viewer and it responds to the same triggering options as Scopes.

The Time Figure block buffers its input data in a circular buffer, which are plotted at periodic intervals. The size of the circular buffer may be specified via the Buffer size parameter. Since all the data in the circular buffer are plotted, making the buffer too large will compromise the performance of the plot.

The plotting interval is determined by the Update rate parameter, which is the number of samples that will be buffered before the plot is redrawn. For example, if the inputs to the block are 1kHz signals and the buffer size is 1000, then the plot will buffer the most recent 1 second worth of data in its circular buffer. If the update rate is set to 100 samples then the plot will draw the latest 1 second worth of data every 1/10th of a second (0.001 seconds * 100 samples), resulting in a relatively smooth plot with good performance. Making the update rate too small results in more plotting than necessary and the plot may fail to keep up with the data arriving at its inputs. If a very large number of points need to be plotted consider changing to a slower sample time for the plot in order to decimate the input signals.

The Time Figure block also provides a toolbar button and context menu to autoscale the plot to the fit the current data. Simply click on the Autoscale button in the figure window or select the Autoscale menu item available in the context menu opened by right-clicking on the plot axes.

To access the help for the block, click on the Time Figure Help button in the figure window or select the Time Figure Help... menu item available in the context menu opened by right-clicking on the plot axes.

Input Ports

There is only one input - the data to be plotted. It may be a vector or scalar. If it is a vector then there is one line on the plot for each vector element.

Output Ports

This block has no output ports.

Data Type Support

The Time Figure block accepts signals of any of the built-in Simulink data types. Fixed point is not supported.

Parameters and Dialog Box

Time Figure

Figure mode

The figure mode determines whether the plot is rendered in a separate figure window or whether it is rendered on a set of axes contained within a MATLAB GUI. See the Description above for details.

Figure tag

This parameter is only visible when the figure mode is "Use axes in GUI". It identifies the MATLAB GUI in which the plot axes are contained by its tag name. The tag name may be changed in GUIDE by clicking on the background of the figure and then opening the Properties window. Scroll down to the "Tag" property in the Properties window. The default tag for figures is "figure1".

Axes tag

This parameter is only visible when the figure mode is "Use axes in GUI". It identifies the axes on which to plot by the tag name of the axes object. The tag name may be changed in GUIDE by clicking on the axes and then opening the Properties window. Scroll down to the "Tag" property in the Properties window. The default tag for the first axes control in the figure is "axes1".

Minimum Y

The minimum value of the Y-axis range for the plot. Plot axes are fixed rather than autoscaling.

Maximum Y

The maximum value of the Y-axis range for the plot. Plot axes are fixed rather than autoscaling.

Buffer size

This parameter determines the size of the circular buffer used by the plot, in samples. Making this parameter too large can compromise the performance of the plot. The default buffer size is 1000 samples.

Update rate (samples)

The update rate determines the frequency with which the plot is redrawn. Like the buffer size, it is specified in samples. The smaller this parameter the more frequently the plot is redrawn. The plot is redrawn every (update rate * sample time) seconds. Updating the plot faster than 1/10th of a second is generally unnecessary and is not recommended as it compromises the performance of the plot. However, note that all the samples collected in the circular buffer are still plotted. This parameter does not decimate the data - it only determines how often the plot is updated with the latest data.

Sample time

The sample time of the block. A sample time of 0 indicates that the block will be treated as a continuous time block. A positive sample time indicates that the block is a discrete time block with the given sample time.

A sample time of -1 indicates that the block inherits its sample time from the input. The block inherits the sample time by default.

To set the sample time to the fundamental sampling time of the model, use the qc_get_step_size function, which is a QUARC function that returns the fundamental sampling time of the model. The fundamental sampling time of the model is the sampling time entered in the Fixed step size field of the Solver pane of the Configuration parameters.

Targets

Target Name

Compatible*

Model Referencing

Comments

QUARC Win32 Target

Yes

Yes

QUARC Win64 Target

Yes

Yes

QUARC Linux Nvidia Target

Yes

Yes

QUARC Linux QBot Platform Target

Yes

Yes

QUARC Linux QCar 2 Target

Yes

Yes

QUARC Linux QDrone 2 Target

Yes

Yes

QUARC Linux Raspberry Pi 3 Target

Yes

Yes

QUARC Linux Raspberry Pi 4 Target

Yes

Yes

QUARC Linux RT ARMv7 Target

Yes

Yes

QUARC Linux x64 Target

Yes

Yes

QUARC Linux DuoVero Target

Yes

Yes

QUARC Linux DuoVero 2016 Target

Yes

Yes

QUARC Linux Verdex Target

Yes

Yes

QUARC QNX x86 Target

Yes

Yes

Last fully supported in QUARC 2018.

Rapid Simulation (RSIM) Target

Yes

Yes

S-Function Target

No

N/A

Old technology. Use model referencing instead.

Normal simulation

Yes

Yes

* Compatible means that the block can be compiled for the target.

See Also

 

navigation bar