Quantcast

Documentation Center

  • Trial Software
  • Product Updates

Display

Show value of input

Library

Sinks

Description

Format Options

You control the display format using the Format parameter:

If you select...The block displays...
shortA 5-digit scaled value with fixed decimal point
longA 15-digit scaled value with fixed decimal point
short_eA 5-digit value with a floating decimal point
long_eA 16-digit value with a floating decimal point
bankA value in fixed dollars and cents format (but with no $ or commas)
hex (Stored Integer)The stored integer value of a fixed-point input in hexadecimal format
binary (Stored Integer)The stored integer value of a fixed-point input in binary format
decimal (Stored Integer)The stored integer value of a fixed-point input in decimal format
octal (Stored Integer)The stored integer value of a fixed-point input in octal format

If the input to a Display block has an enumerated data type (see About Simulink Enumerations and Define Simulink Enumerations):

  • The block displays enumerated values, not the values of underlying integers.

  • Setting Format to any of the Stored Integer settings causes an error.

Display Abbreviations

The following abbreviations appear on the Display block to help you identify the format of the value.

When you see...The value that appears is...

(SI)

The stored integer value

    Note:   (SI) does not appear when the signal is of an integer data type.

hex

In hexadecimal format

bin

In binary format

oct

In octal format

Frequency of Data Display

The amount of data that appears and the time steps at which the data appears depend on the Decimation block parameter and the SampleTime property:

  • The Decimation parameter enables you to display data at every nth sample, where n is the decimation factor. The default decimation, 1, displays data at every time step.

      Note:   The Display block updates its display at the initial time, even when the Decimation value is greater than one.

  • The SampleTime property, which you can set with set_param, enables you to specify a sampling interval at which to display points. This property is useful when you are using a variable-step solver where the interval between time steps is not the same. The default sample time, -1, causes the block to ignore the sampling interval when determining the points to display.

Resizing Options

If the block input is an array, you can resize the block to show more than just the first element. You can resize the block vertically or horizontally, and the block adds display fields in the appropriate direction. A black triangle indicates that the block is not displaying all input array elements.

The Display block shows the first 200 elements of a vector signal and the first 20 rows and 10 columns of a matrix signal.

Floating Display

To use the block as a floating display, select the Floating display check box. The block input port disappears and the block displays the value of the signal on a selected line.

If you select Floating display:

  • Turn off signal storage reuse for your model. See Signal storage reuse in the Simulink® documentation for more information.

  • Do not connect a multidimensional signal to a floating display. Otherwise, you get a simulation error because the block does not support multidimensional signals.

Data Type Support

The Display block accepts real or complex signals of the following data types:

  • Floating point

  • Built-in integer

  • Fixed point

  • Boolean

  • Enumerated

For more information, see Data Types Supported by Simulink in the Simulink documentation.

Parameters and Dialog Box

Format

Specify the format of the data that appears, as discussed in Format Options. The default is short.

Decimation

Specify how often to display data, as discussed in Frequency of Data Display. The default is 1.

Floating display

Select to use the block as a floating display, as discussed in Floating Display.

Examples

The sldemo_auto_climatecontrolsldemo_auto_climatecontrol model shows how you can use the Display block.

For more information, see the model descriptionmodel description.

Characteristics

Sample Time

Use set_param to specify the SampleTime property

Dimensionalized

Yes

Multidimensionalized

No

Zero-Crossing Detection

No

See Also

Scope

Was this topic helpful?