Documentation Center

  • Trial Software
  • Product Updates

Enable

Add enabling port to system

Library

Ports & Subsystems

Description

Adding an Enable block to a subsystem or at the root level of a model makes it an enabled system. A subsystem can contain no more than one Enable block. An enabled system executes while the input received at the Enable port is greater than zero.

At the start of a simulation, Simulink® software initializes the states of blocks inside an enabled system to their initial conditions.

If you use an enable port for a root-level model:

  • For multi-rate enabled models, set the solver to single-tasking.

  • If the enabled model has a fixed-step size, at least one block in that model must run at that fixed-step size rate.

The Enable block supports signal label propagation.

Data Type Support

The Enable block accepts signals of supported Simulink numeric data types, including fixed-point data types. For more information, see Data Types Supported by Simulink.

Parameters and Dialog Box

The Main pane of the Enable block dialog box appears as follows:

Placing the Enable block at the root of a model enables the Signal Attributes pane:

States when enabling

At the instant when an enabled system is being disabled, specify what happens to the states of blocks in the enabled system.

Settings

Default: held

held

Holds the states at their previous values.

reset

Resets the states to their initial conditions (zero if not defined).

Command-Line Information

Parameter: StatesWhenEnabling
Type: string
Value: 'held' | 'reset'
Default: 'held'

Propagate sizes of variable-size signals

Specify when to propagate a variable-size signal.

Settings

Default: Only when enabling

Only when enabling

Propagates variable-size signals only when reenabling the system containing the Enable Port block. When you select this option, sample time must be periodic.

During execution

Propagates variable-size signals at each time step.

Command-Line Information

Parameter: PropagateVarSize
Type: string
Value: 'Only when enabling' | 'During execution'
Default: 'Only when enabling'

Show output port

Select this check box to output the enabling signal.

Settings

Default: On

On

Shows the Enable block output port and outputs the enabling signal. Selecting this option allows the system to process the enabling signal.

Off

Removes the output port from the Enable block.

Command-Line Information

Parameter: ShowOutputPort
Type: string
Value: 'on' | 'off'
Default: 'on'

Enable zero-crossing detection

Select this check box to enable zero-crossing detection.

Settings

Default: On

On

Detect zero crossings.

Off

Do not detect zero crossings.

Command-Line Information

Parameter: ZeroCross
Type: string
Value: 'on' | 'off'
Default: 'on'

Port dimensions

Specify the dimensions of the input signal to the block.

Settings

Default: 1

Valid values are:

n

Vector signal of width n accepted

[m n]

Matrix signal having m rows and n columns accepted

Command-Line Information

See Block-Specific Parameters for the command-line information.

Sample time

Specify the time interval between samples.

Settings

Default: -1

See Specify Sample Time in the online documentation for more information.

Command-Line Information

See Block-Specific Parameters for the command-line information.

Minimum

Specify the minimum value that the block should output.

Settings

Default: [] (unspecified)

This number must be a finite real double scalar value.

    Note:   If you specify a bus object as the data type for this block, do not set the minimum value for bus data on the block. Simulink ignores this setting. Instead, set the minimum values for bus elements of the bus object specified as the data type. For information on the Minimum property of a bus element, see Simulink.BusElement.

Simulink software uses this value to perform:

  • Simulation range checking (see Signal Ranges)

  • Automatic scaling of fixed-point data types

Command-Line Information

See Block-Specific Parameters for the command-line information.

Maximum

Specify the maximum value that the block should output.

Settings

Default: [] (unspecified)

This number must be a finite real double scalar value.

    Note:   If you specify a bus object as the data type for this block, do not set the maximum value for bus data on the block. Simulink ignores this setting. Instead, set the maximum values for bus elements of the bus object specified as the data type. For information on the Maximum property of a bus element, see Simulink.BusElement.

Simulink software uses this value to perform:

  • Simulation range checking (see Signal Ranges)

  • Automatic scaling of fixed-point data types

Command-Line Information

See Block-Specific Parameters for the command-line information.

Data type

Specify the output data type of the external input.

Settings

Default: double

double

Data type is double.

single

Data type is single.

int8

Data type is int8.

uint8

Data type is uint8.

int16

Data type is int16.

uint16

Data type is uint16.

int32

Data type is int32.

uint32

Data type is uint32.

boolean

Data type is boolean.

fixdt(1,16,0)

Data type is fixed point fixdt(1,16,0).

fixdt(1,16,2^0,0)

Data type is fixed point fixdt(1,16,2^0,0).

<data type expression>

The name of a data type object, for example Simulink.NumericType

Do not specify a bus object as the expression.

Command-Line Information

See Block-Specific Parameters for the command-line information.

Show data type assistant

Display the Data Type Assistant.

Settings

The Data Type Assistant helps you set the Output data type parameter.

For more information, see Specify Block Output Data Types.

Mode

Select the category of data to specify.

Settings

Default: double

Built in

Built-in data types. Selecting Built in enables a second menu/text box to the right. Select one of the following choices:

  • double (default)

  • single

  • int8

  • uint8

  • int16

  • uint16

  • int32

  • uint32

  • boolean

Fixed point

Fixed-point data types.

Expression

Expressions that evaluate to data types. Selecting Expression enables a second menu/text box to the right, where you can enter the expression.

Do not specify a bus object as the expression.

Dependency

Clicking the Show data type assistant button enables this parameter.

Command-Line Information

See Block-Specific Parameters for the command-line information.

See Also

See Specify Data Types Using Data Type Assistant.

Interpolate data

Cause the block to interpolate or extrapolate output at time steps for which no corresponding workspace data exists when loading data from the workspace.

Settings

Default: On

On

Cause the block to interpolate or extrapolate output at time steps for which no corresponding workspace data exists when loading data from the workspace.

Off

Do not cause the block to interpolate or extrapolate output at time steps for which no corresponding workspace data exists when loading data from the workspace.

Command-Line Information

See Block-Specific Parameters for the command-line information.

Characteristics

Sample Time

Determined by the signal at the enable port

Dimensionalized

Yes

Virtual

Yes, if not connected directly to an Outport block

For more information, see Virtual Blocks in the Simulink documentation.

Zero-Crossing Detection

Yes, if enabled

Was this topic helpful?