Documentation Center

  • Trials
  • Product Updates

Signal-Based Function-Call Event Generator

Generate function-call events in response to signal-based events

    Note:   The Signal-Based Function-Call Event Generator block will be removed in a future release. Use the Signal-Based Function-Call Generator block instead. To update your model to avoid using obsolete blocks, see seupdate.

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 Function-Call Generator block, which offers more flexibility.

Ports

Signal Input Ports

LabelDescription
tsWhen this signal has an update, the block generates a function call. This signal must be an event-based signal. You see this port only if you set Generate function call only upon to Sample time hit from port ts.
trWhen this signal satisfies the specified trigger criteria, the block generates a function call. This signal must be an event-based signal. You see this port only if you set Generate function call only upon to Trigger from port tr.
vcWhen this signal satisfies the specified value-change criteria, the block generates a function call. This signal must be an event-based signal. You see this port only if you set Generate function call only upon to Change in signal from port vc.
fcnWhen this signal carries a function call, the block generates a function call. This signal must be an event-based 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 Resolve Simultaneous Signal Updates.

Event priority

The priority of the function-call event, relative to other simultaneous events in the simulation. For details, see Specify 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

Allows you to use the signal output port labeled #f1.

Was this topic helpful?