What does error: "The selected subsystem exposes Simscape connection ports, which model reference does not support." means
조회 수: 15(최근 30일)
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.
Ryan G 2013년 4월 19일
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.