Azzera filtri
Azzera filtri

What does error: "The selected subsystem exposes Simscape connection ports, which model reference does not support." means

10 visualizzazioni (ultimi 30 giorni)
I created subsystem from a bunch of components in my model. Then I tried to create a referenced model from this subsystem. Then I got this error message:
Error converting subsystem 'MyModel/MySubSys'. The selected subsystem exposes Simscape connection ports, which model reference does not support. To reference a Simscape physical model, ensure it exists entirely within a single subsystem.
What does this mean? What did I done wrong?
Thanks a lot in advance.

Risposte (2)

Ryan G
Ryan G il 19 Apr 2013
The error is fairly self explaining, so I will try to clear it up as best I can.
Short answer: Simscape ports (they look like dots instead of arrows) are not allowed in referenced models. You have to either delete them or pull in other simscape components to make a model reference.
Long answer: Simscape works much differently from Simulink. From a user perspective it's not necessarily obvious. The components are not 'one way' like the Simulink connections. the Simscape blocks, when connected work by solving the systems of equations defined within the blocks. The connections are dots instead of arrows because it is not 'one way'. The advantage here is this allows Simscape to better handle things like algebraic loops and stiff components better than Simulink could. When you have a model reference the solver cannot complete the 2-way connection between what's inside the referenced model and what you are connecting it to in the main model. Instead of attempting this and giving you bad results, this error is thrown not allowing to make the model reference in the first place.
Maybe they'll add the ability to do this in the future. I'm not sure if it's technically possible or not.

Rob il 19 Apr 2013
Hi and thanx for really fast answer. Does this mean I'm not allowed to port entities out of referenced model? I use those dot ports for porting communication packets out of the network node. Thanx.
  1 Commento
Ryan G
Ryan G il 20 Apr 2013
What MATLAB version are you on? Might be worth checking if it's currently supported.
Otherwise, you have to put the entire physical system inside the model reference. One way you may be able to achieve your current goal is to get the data packets, convert to simulink signals, send those into the model reference and then convert back to physical signals.
I would suspect that even if you have to make some changes like this you can maintain the fidelity of your overall system.

Accedi per commentare.


Scopri di più su Discrete Events and Mode Charts in Help Center e File Exchange



Community Treasure Hunt

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

Start Hunting!

Translated by