Main Content

Signal Conversion

Convert signal to new type without altering signal values

  • 图书馆:
  • 金宝appsimulink /信号属性

    HDL编码器 /信号属性

  • 信号转换块

描述

Signal Conversion块将信号从一种类型转换为另一种类型。要选择要执行的转换类型,请使用输出参数或这些预先配置之一Signal Conversion堵塞s:

  • 信号副本堵塞

  • To Virtual Bus堵塞

  • To Nonvirtual Bus堵塞

Ports

Input

展开全部

Input signal to convert, specified as a scalar, vector, matrix, or N-D array.

数据类型:单身的|双倍的|一半|int8|int16|int32|INT64|UINT8|uint16|UINT32|Uint64|细绳|布尔|fixed point|enumerated|公共汽车

输出

展开全部

输出signal is the input signal converted to the specified type.

数据类型:单身的|双倍的|一半|int8|int16|int32|INT64|UINT8|uint16|UINT32|Uint64|布尔|fixed point|enumerated|公共汽车

参数

展开全部

Specify the type of conversion to perform. The type of conversion that you use depends on your modeling goal.

建模目标 输出Option

Reduce generated code for a muxed signal.

For an example involving金宝app®CODER™software, see从子系统生成返回代码(金宝appSimulink编码器)

Signal copy

将具有恒定示例时间的块连接到启用子系统的输出端口。

Signal copy

Save memory by converting a nonvirtual bus to a virtual bus.

Virtual bus

Pass a virtual bus to a modeling construct that requires a nonvirtual bus, such as aModel堵塞。

非虚拟巴士

  • Signal copyoption is the default. The type of conversion that theSignal Conversion块使用Signal copy选项取决于输入信号的类型。

    输入信号类型 Conversion That the Signal Copy Option Performs
    Muxed (nonbus) signal

    将其元素占据不连续的记忆区域的序列信号转换为矢量信号,其元素占据了连续的记忆区域。转换为MUXED信号的元素分配了一个连续的内存区域,并将不连续区域(由块输入表示)的值复制到每个时间步骤的连续区域(由块输出表示)。

    公共汽车

    输出s a contiguous copy of the bus that is the input to theSignal Conversion堵塞。

    对于一系列总线输入信号,请使用Signal copyoption.

  • Virtual bus选项将非虚拟巴士转换为虚拟总线。

  • 非虚拟巴士option converts a virtual bus to a nonvirtual bus.

程序化使用

Block Parameter:ConversionOutput
类型:角色向量
值:“信号副本”|'Virtual bus' | 'Nonvirtual bus'
默认:“信号副本”