Function Element Call
Libraries:
Simulink /
Ports & Subsystems
Description
A Function Element Call block specifies which function call in a model is issued through the invoking function port. Use Function Element Call blocks to call port-scoped Simulink® functions that are defined in other models.
For example, the Function Element Call block labeled
CliPort.f specifies that the call of function,
f, is issued through the invoking function port,
CliPort.

Invoke Simulink Functions Using Function Element Call Blocks
When you place a Function Element Call block at the root level of a referenced model, the corresponding Model block displays an invoking function port. An invoking function port is a port on a Model block that enables the model to issue function calls to a function provided by another referenced model.
For example, the Model block displays an invoking function port labeled
CliPort.

Note
A Function Element Call block can be placed anywhere in the current model hierarchy. Each Function Element Call block must correspond to a function caller, which specifies the function call associated with the invoking function port.
You can call a Simulink function in several ways, such as Function Caller block, a Chart (Stateflow), or a MATLAB Function block. For more information, see Call a Simulink Function from a Model.
Connecting this invoking function port to an exporting function port of another Model block enables a function in that model to be called. For more information, see the Model Client and Server Components Using Function Ports.
When to Use Function Element Call Blocks
Use Function Element Call blocks when:
You need a model to call a function defined in another referenced model.
You want to reuse function calls across multiple models without duplicating logic.
You have export-function models that require asynchronous function calls across model boundaries.
Examples
Ports
Output
Parameters
Block Characteristics
Data Types |
|
Direct Feedthrough |
|
Multidimensional Signals |
|
Variable-Size Signals |
|
Zero-Crossing Detection |
|
Tips
Use the Filter box to specify a search term to use for filtering a long list of function elements. Do not enclose the search term in quotation marks. The filter does a partial string search and supports regular expressions. To use a regular expression character as a literal, include an escape character (
\). For example, to use a question mark, typefcn\?1. For more information, see Regular Expressions.To change the background color of a Function Element Call block, click
and select a standard color or specify a
custom color. Alternatively, use the BackgroundColorblock property. For more information, see Programmatically Specify Block Parameters and Properties.

