主要缺点tent

Enable

Add enable port to subsystem or model

  • Enable block

Libraries:
Simulink / Ports & Subsystems
HDL Coder / Ports & Subsystems

Description

TheEnableblock allows an external signal to control execution of a subsystem or a model. To enable this functionality, add the block to aSubsystemblock or at the root level of a model that is referenced by aModelblock.

If you use an enable port at the root-level of a model:

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

  • For models with a fixed-step size, at least one block in the model must run at the specified fixed-step size rate.

Examples

Ports

Output

expand all

Enable signal attached externally to the outside of an启用子系统block and passed to the inside of the subsystem. An enable signal port is added to anEnableblock when you select theShow output portparameter.

Data Types:single|double|int8|int16|int32|int64|uint8|uint16|uint32|uint64|Boolean|fixed point|expression

Parameters

expand all

When aSubsystemblock orModelblock is disabled, select what happens to block states for the blocks within the subsystem or model.

held

Hold block states at their previous values.

reset

Reset block states to their initial conditions (zero if not defined).

Programmatic Use

Block parameter:StatesWhenEnabling
Type:character vector
Values:'held'|'reset'
Default:'held'

Select when to propagate a variable-size signal.

Only when enabling

Propagate a variable-size signal when reenabling aSubsystemblock orModelblock containing anEnableport block. When you select this option, sample time must be periodic.

During execution

Propagate variable-size signals at each time step.

Programmatic Use

Block parameter:PropagateVarSize
Type:character vector
Values:'Only when enabling'|'During execution'
Default:'Only when enabling'

The output port passes the enable signal attached externally to the outside of an启用子系统block or enabledModelblock to the inside.

off

Remove the output port on theEnableport block.

on

Display an output port on theEnableport block. Selecting this option allows the subsystem or model to process the enable signal.

Programmatic Use

Block parameter:ShowOutputPort
Type:character vector
Values:'off'|'on'
Default:'off'

Control zero-crossing detection for a model.

on

Detect zero crossings.

off

Do not detect zero crossings.

Programmatic Use

Block parameter:ZeroCross
Type:character vector
Values:'on'|'off'
Default:'on'

Specify dimensions for the enable signal attached externally to aModelblock and passed to the inside of the block.

1

Scalar signal.

[n]

Vector signal of widthn.

[m n]

Matrix signal havingmrows andncolumns.

Programmatic Use

Block parameter:PortDimensions
Type:character vector
Values:'1'|'[n]'|'[m n]'
Default:'1'

Specify time interval between block method execution. SeeSpecify Sample Time.

-1

Sample time inherited from the model.

Ts

Scalar where Ts is the time interval.

[Ts, To]

Vector where Ts is the time interval and To is the initial time offset.

Programmatic Use

Block parameter:SampleTime
Type:character vector
Values:'-1'|'Ts'|'[Ts, To]'
Default:'-1'

Specify minimum value for the enable signal attached externally to aModelblock and passed to the inside of the block.

金宝app®uses this value to perform:

[]

Unspecified minimum value.

real scalar

Real double scalar value.

Programmatic Use

Block parameter:OutMin
Type:character vector
Values:'[]'|''
Default:'[]'

Specify maximum value for the enable signal attached externally to aModelblock and passed to the inside of the block.

Simulink uses this value to perform:

[]

Unspecified maximum value.

real scalar

Real double scalar value.

Programmatic Use

Block parameter:OutMax
Type:character vector
Values:'[]'|''
Default:'[]'

Specify data type for the enable signal attached externally to aModelblock and passed to the inside of the block.

double

Double-precision floating point.

single

Single-precision floating point.

int8

Signed 8-bit integer.

uint8

Unsigned 8-bit integer.

int16

Signed 16-bit integer.

uint16

Unsigned 16-bit integer.

int32

Signed 32-bit integer.

uint32

Unsigned 32-bit integer.

int64

Signed 64-bit integer.

uint64

Unsigned 64-bit integer.

boolean

Boolean with a value oftrueorfalse.

fixdt(1,16)

Signed 16-bit fixed point number with binary point undefined.

fixdt(1,16,0)

Signed 16-bit fixed point number with binary point set to zero.

fixdt(1,16,2^,0)

Signed 16-bit fixed point number with slope set to2^0and bias set to0.

Data type object, for exampleSimulink.NumericType. You cannot enter the name of aSimulink.Busobject as a data type expression.

Programmatic Use

Block parameter:OutDataTypeStr
Type:character vector
Values:'double'|'single'|'int8'|'uint8'|'int16'|'uint16'|'int32'|'uint32'|'int64'|'uint64'|'boolean'|'|'fixdt(1,16,0)'|'fixdt(1,16,2^0,0)'|''
Default:'double'

Select data type category and display drop-down lists to help you define the data type.

Build in

Display drop-down lists for data type and Data type override.

Fixed point

Display drop-down lists for Signedness, Scaling, and Data type override.

Expression

Display text box for entering an expression.

Dependency

To enable this parameter, select the Show data type assistant button.

Programmatic Use

No equivalent command-line parameter.

Specify value of missing workspace data when loading data from the workspace.

on

Linearly Interpolate output at time steps for which no corresponding workspace data exists.

off

Do not interpolate output at time steps. The current output equals the output at the most recent time step for which data exists.

Programmatic Use

Block parameter:Interpolate
Type:character vector
Values:'on'|'off'
Default:'on'

Block Characteristics

Data Types

Boolean|double|fixed point|integer|single

Direct Feedthrough

no

Multidimensional Signals

yes

Variable-Size Signals

no

Zero-Crossing Detection

yes

Extended Capabilities

C/C++ Code Generation
Generate C and C++ code using Simulink® Coder™.

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

Fixed-Point Conversion
Design and simulate fixed-point systems using Fixed-Point Designer™.

Version History

‘茵特罗德女士’uced before R2006a