This example shows how to use a model reference block which is explicitly triggered by means of its function-call trigger port.
During this example, Simulink generates files in the current working directory. If you do not want to generate files in this directory, you should change the working directory to a suitable directory.
This model contains three Model blocks: 500ms Counter, 1 sec Counter and Asynchronous Counter. These blocks reference the same model sldemo_mdlref_fcncall_cntrsldemo_mdlref_fcncall_cntr. The model blocks represent saturating counters which increment their output values by one each time they are explicitly triggered through their function-call trigger ports. The Stateflow Chart Scheduler calls each Model block at its specified rate.