Using Simulink    

Function-Call Subsystems

You can create a triggered subsystem whose execution is determined by logic internal to an S-function instead of by the value of a signal. These subsystems are called function-call subsystems. For more information about function-call subsystems, see the companion guide Writing S-Functions.


 Creating a Triggered Subsystem Blocks That a Triggered Subsystem Can Contain