How to Access Enum Bus Signal in Variant Subsystem within Referenced Model?

4 visualizaciones (últimos 30 días)
Hello everyone,
I'm facing an issue with a Simulink model where I'm using an enum bus signal to switch between two models configured as variant subsystems. These variant subsystems are part of a referenced model.
The problem is that the models in the referenced subsystem don't seem to have access to the enum bus signal or even to the base workspace variables.
I need the enum bus signal to be available in the referenced models so that it can control the variant conditions. Does anyone have suggestions on how to pass this enum bus signal to the referenced model or how to make it accessible within these models?
Any help or insight would be greatly appreciated!
Thanks in advance!

Respuestas (1)

Jatin
Jatin el 20 de Ag. de 2024
Editada: Jatin el 20 de Ag. de 2024
Hi @Achraf,
As per my understanding you are working with a variant subsystem in your base model, and you have an enumerated bus signal which is inaccessible in the reference model.
These are few ways you can try to help you solve the issue:
  1. Make sure the bus signal is properly routed from the base model to the reference model, ensure that the input ports of the reference model are configured to accept the bus signal. Because the variable in the base workspace may not be directly accessible in the reference model unless they are explicitly passed.
  2. You can also consider using data dictionary to manage your workspace variables and bus objects. This ensures all the necessary variables are available to both your base model and reference models.
You can refer the following MathWorks documentation for more details on data dictionary in Simulink.
  2 comentarios
Achraf
Achraf el 20 de Ag. de 2024
Editada: Achraf el 20 de Ag. de 2024
Thank you @Jatin Singh for your suggestions. However, I want to clarify that the variant subsystem is actually inside a referenced model, not the base model. I did route the bus signal properly within the referenced model, ensuring that all input ports are configured to accept the bus signal. However, the variant subsystem still throws an error, indicating that it cannot find the switching variable, which is part of the bus.
Additionally, the link you provided to the MathWorks documentation for data dictionaries seems to be broken. Any further guidance on resolving this issue would be greatly appreciated.

Iniciar sesión para comentar.

Categorías

Más información sobre Component-Based Modeling en Help Center y File Exchange.

Productos


Versión

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by