This example shows how the Variant Subsystem block allows function-call signals to be merged on its outports.
Open the model
slexVariantSubsystemFunctionCall.slx. The model contains a Variant Subsystem block with the conditions
A is the variant control variable defined in the
PostLoadFcn in File > ModelProperties > Callbacks. A Pulse Generator block is connected to the Variant Subsystem block and all its choices.
Chart2 are configured with port names that match the corresponding port names of the Variant Subsystem block.
1 Enable the
Output function call option on the outport Block Parameters dialog box on which the function-call is passed. To enable this option programmatically, use this command:
2 Simulate the model by executing Simulation > Update Diagram.The variant condition propagation determines active and inactive variant choices.
Chart1 is active.
Chart2 is active.
activate() gets function-call signal from the choices
Chart2. When the Function-Call Subsystem block is triggered, there is a sine wave output at
sim('slexVariantSubsystemFunctionCall.slx') load_system('slexVariantSubsystemFunctionCall/Variant Subsystem')