| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → Simulink |
| Contents | Index |
| Learn more about Simulink |
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 you specify for the Sample time parameter. To execute multiple function-call subsystems in a prescribed order, first connect a Function-Call Generator block to a Demux block that has as many output ports as there are function-call subsystems to control. Then connect the output ports of the Demux block to the systems to control. The system connected to the first demux port executes first, the system connected to the second demux port executes second, and so on.
The Function-Call Generator block outputs a signal of type fcn_call.

The time interval between samples. See How to Specify the Sample Time in the online documentation for more information.
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.
Direct Feedthrough | No |
Sample Time | Specified in the Sample time parameter |
Scalar Expansion | No |
Dimensionalized | Yes |
Zero-Crossing Detection | No |
![]() | From Workspace | Function-Call Subsystem | ![]() |

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |