Manual Switch
Switch between two inputs
- 库:
金宝appSimulink /信号路由
Description
TheManual Switchblock 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. You control the signal flow by setting the switch before you start the simulation or by changing the switch while the simulation is executing. TheManual Switchblock retains its current state when you save the model.
To programmatically toggle the switch, set theset_param
sw
property to'0'
要么'1'
. For example, to connect the second input to the output:
set_param(gcb,'sw','0')
要将第一个输入连接到输出:
set_param(gcb,'sw','1')
Note
Double-clicking theManual Switchblock does not open the block dialog box. Instead, it toggles the input choice.
Ports
输入
Output
Parameters
Model Examples
块特征
Data Types |
|
直接喂养 |
|
Multidimensional Signals |
|
Variable-Size Signals |
|
Zero-Crossing Detection |
|