Manual Switch
在两个输入之间切换
- 图书馆:
Simulink / Signal Routing
描述
这Manual Switch块是一个切换开关,它选择其两个输入之一以传递到输出。要在输入之间切换,请双击块。您可以通过在启动仿真之前设置开关来控制信号流,或者在执行模拟时通过更改开关。这Manual Switch保存模型时,块将保留其当前状态。
To programmatically toggle the switch, set theset_param
SW
财产为'0'
or'1'
。For example, to connect the second input to the output:
set_param(gcb,'sw','0')
To connect the first input to the output:
set_param(gcb,'sw','1')
笔记
双击Manual Switch块不打开“块”对话框。相反,它可以切换输入选择。
Ports
Input
输出
参数
Block Characteristics
数据类型 |
|
Direct Feedthrough |
|
多维信号 |
|
可变大小信号 |
|
零交叉检测 |
|
扩展功能
Introduced before R2006a