This example shows how to use a Model block that is explicitly triggered by means of its function-call trigger port.
Open the example model.
This model contains three Model blocks: 500ms Counter, 1 sec Counter and Asynchronous Counter. These blocks reference the same model (sldemo_mdlref_fcncall_cntr
). The Model blocks represent saturating counters that increment their output values by one each time they are explicitly triggered through their function-call trigger ports. The Stateflow® chart calls each Model block at its specified rate.
Simulate the model, and verify the behavior of the counters by examining the results displayed by the scope.
Function-Call Feedback Latch | Function-Call Generator | Function-Call Split | Function-Call Subsystem | Model