Products & Services Solutions Academia Support User Community Company

Learn more about SimEvents   

Signal-Based Function-Call Event Generator - Generate function-call events in response to signal-based events

Library

Generators / Event Generators

Description

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.

Ports

Signal Input Ports

LabelDescription
tsThe 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.
trThe 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.
vcThe 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.
fcnThe 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

LabelDescriptionOrder of Update
f1Function-call signal.1
#f1Number 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.

Dialog Box

Function Call Tab

Generate function call only upon

The primary criterion for determining when the block generates a function call. Optional secondary criteria are established by the Suppress function call... parameters below.

Trigger type

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.

Type of change in signal value

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.

Resolve simultaneous signal updates according to event priority

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.

Event priority

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.

Statistics Tab

Number of f1 function calls

Controls the presence and behavior of the signal output port labeled #f1.

Examples

See Also

Signal-Based Event to Function-Call Event

Generating Function-Call Events

  


Related Products & Applications

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