Main Content

Model Reusable Components Using Multiply Instanced Simulink Functions

In this example, the model slexCounterFunctionMdlRef contains the Simulink® function update, which maintains a counter. Multiple instancing provides the ability to reuse this logic as CounterA and CounterB in this example model.

The qualified calling notation CounterA.update and CounterB.update is used to distinguish the two different instances of the counter logic. As illustrated in this example, each instance can be called from multiple caller blocks.