文档

Mux

将相同数据类型和数字类型的输入信号组合到虚拟向量中

  • 图书馆:
  • 万博1manbetxSimulink /常用块

    Simulink / Signal Routing

描述

Mux块将其输入组合到单个向量输出中。输入可以是标量或向量信号。所有输入必须具有相同的数据类型和数字类型。有关创建和分解向量的信息,请参阅MUX信号

矢量输出信号的元素从顶部到底部或从左到右输入输入端口信号。看旋转或翻转后的端口位置for a description of the port order for various block orientations.

虚拟信号的非虚拟组件称为地区。A virtual signal can contain the same region more than once. For example, if the same nonvirtual signal is connected to two input ports of aMuxblock, the block outputs a virtual signal that has two regions. The regions behave as they would if they had originated in two different nonvirtual signals, even though the resulting behavior duplicates information.

笔记

万博1manbetx®提供了多种将信号组合为复合信号的技术。有关更多信息,请参阅Composite Signal Techniques

端口

Input

展开全部

接受输入nonbus向量信号的端口,从中提取和输出信号。

输出

展开全部

从输入向量提取的输出信号。输出信号端口是从上到下排序的。看旋转或翻转后的端口位置for a description of the port order for various block orientations.

参数

展开全部

指定输入信号的数量。您还可以指定信号名称和大小。使用以下格式之一。

Format 块行为

标量

Specifies the number of inputs to the Mux block.

当您使用此格式时,块会接受任何大小的标量或向量信号。万博1manbetxSimulink分配每个输入名称信号, 在哪里n是输入端口号。

向量

这length of the vector specifies the number of inputs. Each element specifies the size of the corresponding input.

正值指定相应的端口只能接受该大小的向量。例如,[2 3]specifies two input ports of sizes2and3, respectively. If an input signal width does not match the expected width, an error message appears. A value of-1specifies that the corresponding port can accept scalars or vectors of any size.

单元阵列

单元阵列的长度指定输入的数量。每个单元格的值指定相应输入的大小。

标量值n指定大小的向量n。一个值-1表示相应的端口可以接受任何大小的标量或向量信号。

信号名称列表

You can enter a list of signal names separated by commas. Simulink assigns each name to the corresponding port and signal. For example, if you enter位置,速度, 这Mux块有两个输入,命名positionandvelocity

小费

如果指定标量输入数量和所有的参数put ports are connected, as you draw a new signal line close to input side of aMux块,Simul万博1manbetxink添加了一个端口并更新参数。

程序化使用

块参数:输入
类型:标量,矢量,单元格数,信号名称列表
值:数字,端口号的向量,单元格数或信号名称列表
默认:{'2'}

By default, the block icon is a solid bar of the block foreground color. To display the icon as a hollow bar containing input signal names, select信号。要将图标显示为包含块类型名称的框,请选择没有任何

程序化使用

块参数:显示器
类型:角色向量
值:'酒吧'“信号”'没有任何''酒吧'
默认:'酒吧'

Block Characteristics

数据类型

双倍的|单身的|布尔|基础整数|fixed point|enumerated

多维信号

no

可变大小信号

no

扩展功能

PLC代码生成
使用Simulink®PLCCoder™生成结构化文本代码。万博1manbetx

Introduced before R2006a

Was this topic helpful?