Skip to Main Content Skip to Search
Product Documentation

Event Filter - Conditionalize, suppress, or prioritize execution of Atomic Subsystem

Library

SimEvents Ports and Subsystems

Description

This block influences an Atomic Subsystem block by specifying the signal-based events upon which the subsystem executes. This block can also prioritize the execution of a subsystem with regard to other events occurring simultaneously by scheduling a subsystem execution on the event calendar. Consider an event-based signal that is an input to an Atomic Subsystem block. Without the Event Filter block, every sample time hit of the signal causes the subsystem to execute immediately. Inserting the Event Filter block on that signal line enables you to influence the subsystem behavior as follows:

Connecting to Other Blocks

The output port of this block can connect to only one input port of an Atomic Subsystem block. The connection line cannot branch.

Behavior During Simulation

When the input signal of an Event Filter block has a sample time hit, it does the following:

  1. Updates its output signal with the value of the input signal. This value is available to the Atomic Subsystem block to which the Event Filter block connects.

  2. Determines whether to execute the Atomic Subsystem block, based on the settings in the block dialog box of the Event Filter block. If the Event Filter block is not supposed to execute the Atomic Subsystem block, the Event Filter does nothing further, until the next sample time hit of the input signal. Otherwise, processing continues to the next step.

  3. Determines when to execute the Atomic Subsystem block.

    • If you did not select the Resolve simultaneous signal updates according to event priority option, the Event Filter block executes the Atomic Subsystem block immediately.

    • If you select the Resolve simultaneous signal updates according to event priority option, the Event Filter block schedules an event on the event calendar. The event time is the current simulation time. The event priority is the value of the Event priority parameter in the Event Filter block. When the event calendar executes this event, the Atomic Subsystem block performs its computation.

    • If you select both the Resolve simultaneous signal updates according to event priority option, and the configuration parameter Prevent duplicate events on multiport blocks and branched signals, the software uses the Event priority parameter to help Simulink to sort blocks in the model. In this case, the software no longer schedules an event on the event calendar.

Ports

Signal Input Ports

LabelDescription
NoneEvent-based signal. The signal can have any fixed dimension or complexity. It has data type double.

Signal Output Ports

LabelDescription
NoneEvent-based signal whose value matches that of the input signal. This output signal connects to an input port of an Atomic Subsystem block. When the Event Filter block detects a qualifying signal-based event in its input signal, the subsystem executes immediately or the block schedules an execution event on the event calendar. (Block parameters determine the type of event that qualifies and the choice of immediate or scheduled execution.)

The initial output value is the same as that of the input signal. This value is in effect before the first sample time hit of the input signal.

Dialog Box

Execute atomic subsystem

Determines what constitutes a qualifying event in the input signal of this block. If the signal is complex, you must select Upon sample time hit or Never.

Trigger type

The type of trigger that further restricts the event type specified in Execute atomic subsystem. You see this field only if you set Execute atomic subsystem to Upon trigger.

Type of change in signal value

The type of change in the signal value that further restricts the event type specified in Execute atomic subsystem. You see this field only if you set Execute atomic subsystem to Upon change in signal.

Resolve simultaneous signal updates according to event priority

Select this option to control the sequencing of the subsystem execution in response to updates in the input signal of this block, relative to other simultaneous events in the simulation. If you do not select this option, the application executes the subsystem immediately upon detecting the signal-based event. For details, see Choosing How to Resolve Simultaneous Signal Updates.

Event priority

The priority of the subsystem execution event (in response to updates in the input signal of this block), relative to other simultaneous events in the simulation. For details, see Specifying Event Priorities to Resolve Simultaneous Signal Updates.

Use of this parameter depends on the following:

  • You see this field only if you select Resolve simultaneous signal updates according to event priority.

  • If you also select the configuration parameter Prevent duplicate events on multiport blocks and branched signals in your model, the software uses the Event priority parameter to help Simulink to sort blocks in the model. In this case, the software does not schedule an event that you can view on the SimEvents event calendar.

Examples

See Also

Suppressing Computations By Filtering Out Events

Performing Computations in Atomic Subsystems

Choosing How to Resolve Simultaneous Signal Updates

  


Free SimEvents Evaluation Kit

Learn how you can use SimEvents discrete-event simulation capabilities through these technical resources.

Get free kit

Trials Available

Try the latest version of discrete-event simulation products.

Get trial software
 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS