How to use the results calculated by the previous module to control the variant modules in the system composer (software architecture)?
Mostrar comentarios más antiguos
I am trying to use variant components to build my software architecture. The plan is to use the signal a calculated by the previous calculation module (Planning) to control the selection of variant components, such as selecting component_1 when v=1, and if v=2, select component_2. At present, after consulting the reference documents, it seems that the control variables for the variants can only be used in MATLAB ® Variables, Simulink Parameter object or Simulink The VariantControl object is used for control. And my quantity is the signal, how should this be achieved?
It should be noted that due to project requirements, I am unable to use programming methods likes M-function or S-function. I can only use the built-in module functions of SIMULINK.

Respuesta aceptada
Más respuestas (1)
Swastik Sarkar
el 28 de Ag. de 2024
0 votos
Variant components are used to indicate alternate designs for a component within an architecture. They are not suited for conditional execution of components. More details can be found in the documentation below:
To achieve conditional execution of components, consider creating a wrapper around the components by including them as "Enabled Subsystems" in Simulink. This method allows for control over the execution of components based on specific conditions.
Further information about "Enabled Subsystems" and their implementation can be found in the documentation below:
Hope this information helps.
Categorías
Más información sobre Component-Based Modeling en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!



