This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

Function-Call Generator

Execute function-call subsystem specified number of times at specified rate


Ports & Subsystems


The Function-Call Generator block executes a function-call subsystem (for example, a Stateflow® chart acting as a function-call subsystem) at the rate that you specify with the Sample time parameter. To iteratively execute each function-call block connected to this block multiple times at each time step, use the ‘Number of Iterations' parameter.

To execute multiple function-call subsystems or models in a prescribed order, use the Function-Call Generator block in conjunction with a Function-Call Split block. For an example, see the Function-Call Split block documentation.

Data Type Support

The Function-Call Generator block outputs a signal of type fcn_call.


Sample time

Specify the time interval between samples. See Specify Sample Time in the online documentation for more information.

Number of iterations

Number of times to execute the block per time step. The value of this parameter can be a vector where each element of the vector specifies a number of times to execute a function-call subsystem. The total number of times that a function-call subsystem executes per time step equals the sum of the values of the elements of the generator signal entering its control port.

Suppose that you specify the number of iterations to be [2 2] and connect the output of this block to the control port of a function-call subsystem. In this case, the function-call subsystem executes four times at each time step.


Data Types

Not applicable

Sample Time

Specified in the Sample time parameter

Direct Feedthrough


Multidimensional Signals


Variable-Size Signals


Zero-Crossing Detection


Code Generation


Introduced before R2006a

Was this topic helpful?