This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

Display

Show value of input

  • Library:
  • Simulink / Sinks

Description

The Display block shows the value of the input data. You can specify the format and the frequency of display.

If the block input is an array, you can resize the block vertically or horizontally to show more than just the first element. If the block input is a vector, the block sequentially adds display fields from left to right and top to bottom. The block displays as many values as possible. 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.

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

Displaying Strings

When working with strings, the Display block displays:

  • Strings with double quotes.

  • Special characters such as newline are shown as escaped sequences, for example '\n'.

  • Non-displayable characters as escaped octal number, for example '\201'.

If the incoming signal is of type string, the Format parameter selection does not affect the display of the string.

Ports

Input

expand all

Input data to display.

Data Types: single | double | int8 | int16 | int32 | uint8 | uint16 | uint32 | Boolean | fixed point | enumerated

Parameters

expand all

Specify the format of the data that appears.

If You Select...The Block Displays...
short A 5-digit scaled value with fixed decimal point
long A 15-digit scaled value with fixed decimal point
short_e A 5-digit value with a floating decimal point
long_e A 16-digit value with a floating decimal point
bank A 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 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.

If the incoming signal is of type string, the selection of the Format parameter does not affect the display of the string.

Programmatic Use

Block Parameter: Format
Type: character vector
Values: 'short' | 'long' | 'short_e' | 'long_e' | 'bank' | 'hex (Stored Integer)' | 'binary (Stored Integer)' | 'decimal (Stored Integer)' | 'octal (Stored Integer)'
Default: 'short'

Specify how often to display data.

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.

    Note

    If the block inherits a sample time of Inf, the Decimation parameter is ignored.

Programmatic Use

Block Parameter: Decimation
Type: character vector
Values: '1' | integer
Default: '1'

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.

Programmatic Use

Block Parameter: Floating
Type: character vector
Values: 'on' | 'off'
Default: 'on'

Block Characteristics

Data Types

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

Direct Feedthrough

No

Multidimensional Signals

No

Variable-Size Signals

Yes

Zero-Crossing Detection

No

Extended Capabilities

PLC Code Generation
Generate Structured Text code using Simulink® PLC Coder™.

Fixed-Point Conversion
Convert floating-point algorithms to fixed point using Fixed-Point Designer™.

Introduced before R2006a