Variant Event-Based Components
You can activate or deactivate the execution of subsystems on a model initialize, reset, and terminate events depending on the variant control you select. You can also execute Simulink® functions conditionally.
The code that you generate for event-based variant blocks can contain all the variant choices of a system. You can switch between the choices prior to code compile. For information on generating code with event-based variant blocks, see Represent Subsystem and Variant Models in Generated Code (Embedded Coder).
|Class enumeration members and names|
- Conditionally Execute Custom Initialize, Reinitialize, Reset, and Terminate Routines
The custom routine blocks(Initialize Function, Reinitialize Function, Reset Function, and Terminate Function) blocks are preconfigured subsystem blocks that enable you to add custom routines to the default initialize, reset, and terminate routines to change or read block states.
- Conditionally Execute Simulink Functions
With variant blocks, you can conditionalize functions defined using Simulink Function blocks.