| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → SimEvents |
| Contents | Index |
| Learn more about SimEvents |
Generators / Event Generators
This block generates an output function call corresponding to each signal-based event or input function call. You specify the type of event the block responds to. You can use the function call to invoke function-call subsystems, Stateflow blocks, or other blocks that accept function-call inputs.
This block is similar to the Signal-Based Event to Function-Call Event block, which offers more flexibility.
Signal Input Ports
| Label | Description |
|---|---|
| ts | The block generates a function call when the application updates the signal at this port. You see this port only if you set Generate function call only upon to Sample time hit from port ts. |
| tr | The block generates a function call when the signal has a rising or falling edge, depending on the Trigger type parameter. You see this port only if you set Generate function call only upon to Trigger from port tr. |
| vc | The block generates a function call when the signal at this port increases or decreases, depending on the Type of change in signal value parameter. You see this port only if you set Generate function call only upon to Change in signal from port vc. |
| fcn | The block generates a function call when this input port detects a function call. You see this port only if you set Generate function call only upon to Function call from port fcn. Do not connect this port to an output port from the same instance of this block. |
Signal Output Ports
| Label | Description | Order of Update |
|---|---|---|
| f1 | Function-call signal. | 1 |
| #f1 | Number of function calls the block has generated during the simulation. | 2 |
The initial output value for the numerical signals, which is in effect from the start of the simulation until the first update by the block, is 0.

The primary criterion for determining when the block generates a function call. Optional secondary criteria are established by the Suppress function call... parameters below.
Determines whether rising, falling, or either type of trigger edge causes the block to generate a function call. You see this field only if you set Generate function call only upon to Trigger from port tr.
Determines whether rising, falling, or either type of value change causes the block to generate a function call. You see this field only if you set Generate function call only upon to Change in signal from port vc.
Select this option to control the sequencing of the function-call event, relative to other simultaneous events in the simulation. If you do not select this option, the application issues the function call immediately upon detecting the signal-based event that causes it. For details, see Choosing How to Resolve Simultaneous Signal Updates.
The priority of the function-call event, relative to other simultaneous events in the simulation. For details, see Specifying Event Priorities to Resolve Simultaneous Signal Updates. You see this field only if you select Resolve simultaneous signal updates according to event priority.

Controls the presence and behavior of the signal output port labeled #f1.
Signal-Based Event to Function-Call Event
Generating Function-Call Events
![]() | Signal-Based Event to Function-Call Event | Single Server | ![]() |

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 |