Simulink Reference    
Constant

Generate a constant value

Library

Simulink Sources and Fixed-Point Blockset Sources

Description

The Constant block generates a real or complex constant value. The block generates a scalar, vector, or matrix output, depending on the dimensionality of the Constant value parameter and the setting of the Interpret vector parameters as 1-D parameter.

The output of the block has the same dimensions and elements of the Constant value parameter. If you specify a vector for this parameter, and you want the block to interpret it as 1-D, select the Interpret vector parameters as 1-D parameter.

When the Show additional parameters check box is selected, some of the parameters that become visible are common to many blocks. For a detailed description of these parameters, refer to Block Parameters in the Fixed-Point Blockset documentation.

Data Type Support

By default, a Constant block outputs a signal whose data type and complexity is the same as that of the block's Constant value parameter. However, you can specify the output to be any supported data type except int64 and uint64.

Parameters and Dialog Box

Constant value
Constant value output by the block. It can be a scalar, vector, or matrix.
Interpret vector parameters as 1-D
If selected, a vector specified for the Constant value parameter results in a 1-D signal.
Show implementation details
If selected, additional parameters specific to implementation of the block become visible as shown.

Output data type mode
Specify how the data type of the output is designated. The data type can be inherited through backpropagation, or can be designated in the Constant value parameter; for example int8(29). You can also choose a built-in data type from the drop-down list. Lastly, if you choose Specify via dialog, the Output data type, Output Scaling Mode, and Output scaling value parameters become visible.
Output data type
Specify any data type, including fixed-point data types. This parameter is only visible if Specify via dialog is selected for the Output data type mode parameter.
Output Scaling Mode
Specify how the scaling of the output is designated. The output can be automatically scaled to maintain best vector-wise precision without overflow, or you can choose to specify the scaling in the dialog via the Output scaling value parameter. This parameter is only visible if Specify via dialog is selected for the Output data type mode parameter.
Output scaling value
Set the output scaling using radix point-only or [Slope Bias] scaling. This parameter is only visible if Specify via dialog is selected for the Output data type mode parameter, and if Use specified scaling is selected for the Output Scaling Mode parameter.

Conversions and Operations

The Constant value parameter is converted from its data type to the specified output data type offline using round-to-nearest and saturation. Refer to Parameter Conversions in the Fixed-Point Blockset documentation for more information about parameter conversions.

Characteristics

Dimensionalized
Yes
Direct Feedthrough
No
Sample Time
Constant
Scalar Expansion
No
Zero Crossing
No


  Configurable Subsystem Coulomb and Viscous Friction