Creating Entity-Departure Subsystems

Overview of Entity-Departure Subsystems

You can create a subsystem that executes only when an entity departs from a particular block in your model. The figure below shows a prototype, although most ports are not yet connected. The prototype uses the Entity-Based Function-Call Event Generator block to generate a function call when an entity departs. The function call executes the subsystem.

Prototype of Entity-Departure Subsystems

Accessing Blocks for Entity-Departure Subsystems

To create discrete event subsystems that respond to entity departures, use some or all of the blocks listed below.

BlockLibrary LocationPurpose
Entity-Based Function-Call Event GeneratorEvent Generators library in the SimEvents® library setIssues a function call corresponding to each entity departure
Entity Departure Event to Function-Call EventEvent Translation library in the SimEvents library set
MuxSignal Routing library in the Simulink® library setCombines multiple function-call signals into a single function-call signal, if needed
Function-Call SubsystemPorts & Subsystems library in the Simulink library setContains blocks to execute upon each function call. You must configure the subsystem to propagate its execution context, as described in Creating Entity-Departure Subsystems.
InportPorts & Subsystems library in the Simulink library setLinks a subsystem to its parent system
Outport

Setting Up Entity-Departure Subsystems

To create subsystems that respond to entity departures, follow the procedure below.

  1. Insert and configure the Function-Call Subsystem block as described in Setting Up Function-Call Subsystems in SimEvents® Models.

  2. Insert one or more of these blocks into your model. The first is easier to use but less flexible.

  3. Connect the newly inserted blocks to indicate which entity departures should call the subsystem. If entity departures from multiple blocks should call the subsystem, then combine multiple function-call signals using a Mux block.

  


 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS