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

4 次查看(过去 30 天)
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!

回答(1 个)

Jatin
Jatin 2024-8-20
编辑:Jatin 2024-8-20
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 个评论
Achraf
Achraf 2024-8-20
编辑:Achraf 2024-8-20
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.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Component-Based Modeling 的更多信息

产品


版本

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by