主要内容

功能呼叫者

调用sim金宝appulink或导出状态流函数

  • Library:
  • 金宝appSimulink /用户定义的功能

  • 功能调用器块

Description

A功能呼叫者block calls and executes a function defined with a金宝app仿真软件的功能块或导出状态流®函数。使用功能呼叫者blocks, you can call a function from anywhere in a model or chart hierarchy.

You can select a金宝app仿真软件的功能或者功能呼叫者block to highlight blocks related to it. To show a related block in an open diagram or new tab, pause on the ellipsis that appears after selection. Then, selectRelated BlocksRelated Blocks buttonfrom the action bar. When multiple blocks correspond to the selected block, a list of related blocks opens. You can filter the list of related blocks by entering a search term in the text box. After you select a related block from the list, window focus goes to the open diagram or new tab that shows the related block.

端口

输入

expand all

输入信号的输入参数已发送到该函数。

该功能原型确定出现在功能呼叫者块上的输入端口的编号和名称。将信号线连接到输入端口,以通过函数输入参数将数据发送到函数。

例如,y = myfunction(u)creates one input port (u) on the Function Caller block.

Data Types:single|double|int8|INT16|INT32|int64|uint8|UINT16|uint32|uint64|Boolean|固定点|枚举|bus

Output

expand all

Output signal for an output argument that the function returns.

该功能原型确定出现在功能调用器块上的输出端口的数字和名称。将信号线连接到输出端口,以通过函数输出参数从函数接收数据。

例如,y = myfunction(u)creates one output port (y) on the Function Caller block.

Data Types:single|double|int8|INT16|INT32|int64|uint8|UINT16|uint32|uint64|Boolean|固定点|枚举|bus

Parameters

expand all

指定函数接口功能呼叫者block and a Simulink®函数。A Simulink function can be a金宝app仿真软件的功能块,导出的状态流图形函数或导出的状态流MATLAB®函数。调用金宝app仿真软件的功能block:

  • 函数调用参数名称必须匹配函数参数。

  • 函数名称,输入参数和输出参数必须是有效的MATLAB标识符。

Programmatic Use

块参数:FunctionPrototype
类型:character vector
Values:'y = f(u)'|'<功能原型>'
默认:'y = f(u)'

为每个输入参数指定结合数据类型,维度和复杂性(真实或虚构)的MATLAB表达式的逗号分隔列表。有关示例,请参见Argument Specification for Simulink Function Blocks.

This specification must match the金宝app仿真软件的功能指定的块数据类型数据类型参数Argument Inportblock.

Programmatic Use

块参数:'InputArgumentSpecifications'
类型:character vector
Values:''|''
默认:''

Specify a comma-separated list of MATLAB expressions that combine data type, dimensions, and complexity (real or imaginary) for each output argument. For examples, seeArgument Specification for Simulink Function Blocks.

该规范必须匹配Simulink函数块的数据类型金宝app数据类型参数Argument Outport堵塞。

Programmatic Use

块参数:“ outputargumentspifications'
类型:character vector
Values:''|''
默认:''

Specify the interval between times that the功能呼叫者block calls the specified Simulink function.

默认情况下,该块基于模型中块的上下文继承其样本时间。

To set a different sample time, enter a value using a sample time format from the table inSpecify Sample Time.

If the功能呼叫者block has any inputs, it is a nonsource block, and you must set the sample time to-1.

Programmatic Use

Block Parameter:SampleTime
类型: character vector
Values:'-1'|sample time
默认:'-1'

块特征

Data Types

Boolean|bus|double|枚举|固定点|整数|single

直接进料

yes

Multidimensional Signals

yes

Variable-Size Signals

Zero-Crossing Detection

Extended Capabilities

C/C++ Code Generation
Generate C and C++ code using Simulink® Coder™.

Fixed-Point Conversion
使用定点Designer™设计和模拟定点系统。