How to create an empty Variant Subsystem without getting an error message?

What would be the recommended way to handle an intentionally empty model within a 'Subsystem Variant' block? For example, I have a model with a "Variant Subsystem" block with two subsystems. Variant A has logging and Variant B should have no logging. Variant B consists of an “Inport” and a “Terminator” block. However, my model outputs this error message:

Error:Block diagram 'TranslationVelLimitsDeratingLogging' contains no blocks or all blocks are virtual
How do I make Variant B do nothing without throwing an error message? 

 Respuesta aceptada

In order to have a Variant Subsystem, there must be a nonvirtual block within the subsystem.
Since the “Inport” and “Terminator” blocks are both virtual blocks, they lead to the mentioned error. To create an empty Variant Subsystem, we can add a nonvirtual block such as a "gain" block between the “Inport” and “Terminator” blocks. This will remove the error, but you may still experience a warning message stating that there is nothing to simulate while this variant is active. 

Más respuestas (0)

Categorías

Más información sobre Component-Based Modeling en Centro de ayuda y File Exchange.

Productos

Versión

R2024b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by