Products & Services Industries Academia Support User Community Company

Learn more about Simulink   

Manual Switch - Switch between two inputs

Library

Signal Routing

Description

The Manual Switch block is a toggle switch that selects one of its two inputs to pass through to the output. To toggle between inputs, double-click the block (there is no dialog box). The block propagates the selected input to the output, while the block discards the unselected input. You can interactively control the signal flow by setting the switch before you start the simulation or by changing the switch while the simulation is executing. The Manual Switch block retains its current state when you save the model.

Data Type Support

The Manual Switch block accepts real or complex signals of any data type that Simulink supports, including fixed-point and enumerated data types. For more information, see Data Types Supported by Simulink in the Simulink documentation.

Parameters and Dialog Box

Double-clicking the Manual Switch block toggles the input. To open the Function Block Parameters dialog box, right-click the block, and then select Mask Parameters.

Current setting

This parameter tracks the current state of the Manual Switch block and cannot be modified by the user.

Action

This parameter tracks the current state of the Manual Switch block and cannot be modified by the user

Allow different input sizes

Select this check box to allow input signals with different sizes.

Settings

Default: Off

On

Allows input signals with different sizes, and propagate the input signal size to the output signal.

Off

Requires that all input signals be the same size.

Command-Line Information

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

Characteristics

Direct Feedthrough

Yes

Sample Time

Inherited from driving block

Scalar Expansion

N/A

Dimensionalized

Yes

Multidimensionalized

Yes

Zero Crossing

No

  


Related Products & Applications

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.

 © 1984-2009- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS