To highlight the functional dependencies in a Simulink model with multiple instances of a referenced model, use Model Slicer. You can use Model Slicer on a Simulink model that contains single or multiple references to a same model in normal simulation mode.
This example shows the behaviour of Model Slicer when there are multiple instances of the referenced model. The
slslicerdemo_multi_instance model consists of
sldemo_mdlref_counter referenced two times with different inputs during the course of the signal flow transition.
1. Open the model slslicerdemo_multi_instance.slx.
2. On the Apps tab, under Model Verification, Validation, and Test gallery, click Model Slicer.
3. In the Model Slicer window, click Add all outports. This sets OutA and OutB as starting points.
4. Ensure that the Signal Propagation is set to upstream.
5. In the Simulation time window section, click Run simulation.
6. In the simulation time window, click OK. The model simulation starts.
7. The simulated model highlights the upstream dependency of the outports OutA and OutB.
You can notice that the referenced model in both the instances shows different signal propagations highlighted by Simulink Slicer for which the signal travels.
8. To generate the slice, click Generate Slice.