Products & Services Solutions Academia Support User Community Company

Learn more about SimEvents   

Discrete Event Subsystem - Subsystem to be executed upon signal-based events

Library

SimEvents Ports and Subsystems

Description

This block represents a subsystem of the system that contains it. It is configured so that the application executes the subsystem when at least one of the Discrete Event Inport blocks within the subsystem detects a qualifying signal-based event. If N qualifying events occur at the same simulation time (whether at distinct Discrete Event Inport blocks or at distinct sample time hits of a single Discrete Event Inport block), then the subsystem executes N times and updates its output signals N times.

Attach inputs from the upper level to blocks inside the subsystem using the Din, Din1, Din2, and similarly labeled ports on the Discrete Event Subsystem block. Inputs are real or complex sample-based signals, of type double and any dimension. Attach outputs, if necessary, from blocks inside the subsystem to the upper level using the Dout, Dout1, Dout2, and similarly labeled ports on the Discrete Event Subsystem block.

The number of input ports drawn on the Discrete Event Subsystem block's icon corresponds to the number of nonduplicate Discrete Event Inport blocks inside the subsystem. Similarly, the number of output ports drawn on the block corresponds to the number of Discrete Event Outport blocks inside the subsystem.

To create a subsystem using the Discrete Event Subsystem block, see Setting Up Signal-Based Discrete Event Subsystems. A discussion of discrete event subsystems and examples using this block are in Controlling Timing with Subsystems. To view the contents of the subsystem, double-click the Discrete Event Subsystem block; the Model Explorer tool does not show the contents.

"Block execution" in this documentation is shorthand for "block methods execution." Methods are functions that the Simulink engine uses to solve a model. Blocks are made up of multiple methods. For details, see Block Methods in the Simulink documentation.

Ports

Signal Input Ports

LabelDescription
Din, Din1, Din2, and so onSignals that serve as inputs to the blocks in the subsystem. At least one input signal must be present; others are optional. Each port appears only if the subsystem contains a Discrete Event Inport block of the same name.

Signal Output Ports

LabelDescription
Dout, Dout1, Dout2, and so onOptional signals that serve as outputs from the blocks in the subsystem. Each port appears only if the subsystem contains a Discrete Event Outport block of the same name.

The initial output value for each output signal, which is in effect from the start of the simulation until the first update by the block, is 0.

Examples

See Examples Using Discrete Event Subsystem Blocks.

See Also

Discrete Event Inport, Discrete Event Outport

Controlling Timing with Subsystems

  


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