Gauge

Display input value on circular scale

  • Library:
  • Simulink / Dashboard

Description

The Gauge block displays the connected signal on a circular scale during simulation. You can use the Gauge block with other Dashboard blocks to build an interactive dashboard of controls and indicators for your model. The Gauge block provides an indication of the instantaneous value of the connected signal throughout simulation. You can modify the range of the Gauge block to fit your data. You can also change the appearance of the dial to provide more information about your signal. For example, you can color-code in-specification and out-of-specification ranges.

Connecting Dashboard Blocks

Dashboard blocks do not use ports to connect to signals. To connect Dashboard blocks to signals in your model, use connect mode. Connect mode facilitates the process of connecting Dashboard blocks in your model, especially when you want to connect multiple blocks at once. If you only want to connect a single Dashboard block, you can also use the Connection table in the block dialog box to make the connection.

To enter connect mode, click the Connect button that appears above your unconnected Dashboard block when you pause on it.

In connect mode, when you select one or more signals or blocks, a list of parameters and signals available for connection appears. Select a signal or parameter from the list to connect the selected Dashboard block. To connect another Dashboard block, pause on the block and click the Connect button above it. Then, make a selection of signals and blocks in your model, and choose a signal or parameter to connect.

When you finish connecting the Dashboard blocks in your model, click the Exit button in the upper-right of the canvas to exit connect mode.

Limitations

  • Dashboard blocks can only connect to real scalar signals.

  • You cannot use the Connection table to connect a Dashboard block to a block that is commented out. When you connect a Dashboard block to a commented block using connect mode, the Dashboard block does not display the connected value until the you uncomment the block.

  • Dashboard blocks cannot connect to signals inside referenced models.

  • If you turn off logging for a signal connected to a Dashboard block, the model stops sending data from that signal to the block. To view the signal again, reconnect the signal.

Parameters

expand all

Select the signal to connect using the Connection table. Populate the Connection table by selecting signals of interest in your model. Select the radio button next to the signal you want to display. Click Apply to connect the signal.

Programmatic Use

Block Parameter: Binding
Type: Simulink.HMI.SignalSpecification
Default: []

Finite, real, double, scalar value specifying the minimum tick mark value for the arc. The minimum must be less than the value entered for the maximum.

Programmatic Use

To programmatically set the Minimum parameter, use a 1-by-3 vector containing values for the Minimum, Tick Interval, and Maximum parameters, in that order. To use the auto value for the Tick Interval, leave the Tick Interval position in the vector empty or specify -1.

Block Parameter: Limits
Type: 1x3 vector
Default: [0 -1 100]

Finite, real, double, scalar value specifying the maximum tick mark value for the arc. The maximum must be greater than the value entered for the minimum.

Programmatic Use

To programmatically set the Maximum parameter, use a 1-by-3 vector containing values for the Minimum, Tick Interval, and Maximum parameters, in that order. To use the auto value for the Tick Interval, leave the Tick Interval position in the vector empty or specify -1.

Block Parameter: Limits
Type: 1x3 vector
Default: [0 -1 100]

Finite, real, positive, integer, scalar value specifying the interval of major tick marks on the arc. When set to auto, the block automatically adjusts the tick interval based on the minimum and maximum values.

Programmatic Use

To programmatically set the Tick Interval parameter, use a 1-by-3 vector containing values for the Minimum, Tick Interval, and Maximum parameters, in that order. To use the auto value for the Tick Interval, leave the Tick Interval position in the vector empty or specify -1.

Block Parameter: Limits
Type: 1x3 vector
Default: [0 -1 100]

Color specifications for ranges on the arc. Press the + button to add a color. For each color added, specify the minimum and maximum values of the range where you want to display that color.

Programmatic Use

To programmatically specify the Scale Colors parameter, use an array of structures with fields:

  • Min — Minimum value for the color range on the scale.

  • Max — Maximum value for the color range on the scale.

  • Color1-by-3 vector of double values between 0 and 1 to specify the color for the range of the scale in the form [r g b]

Include a structure in the array for each scale range for which you want to specify a color.

range1.Min = 0;
range1.Max = 10;
range1.Color = [0 0 1];
range2.Min = 10;
range2.Max = 15;
range2.Color = [0 1 0];
scaleRanges = [range1 range2];
Block Parameter: ScaleColors
Type: structure array
Default: 0x1 struct array

Position of the block label. When the block is connected to an element in the model, the label is the name of the connected element.

Programmatic Use

Block Parameter: LabelPosition
Type: character vector
Values: 'Top' | 'Bottom' | 'Hide'
Default: 'Top'

Block Characteristics

Data Types

Boolean | double | enumerated | fixed point | integer | single

Direct Feedthrough

no

Multidimensional Signals

no

Variable-Size Signals

no

Zero-Crossing Detection

no

Introduced in R2015a