Main Content

Model Reference Function-Call

This example shows how to use a Model block that is explicitly triggered by means of its function-call trigger port.

Examine Example Model

Open the example model named sldemo_mdlref_fcncall.

This model contains Model blocks named 500ms Counter, 1 sec Counter, and Asynchronous Counter. These blocks each reference the model named 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 Model and Examine Results

Simulate the model, and verify the behavior of the counters by examining the results displayed by the scope.

See Also

| | | |

Related Topics