Error in 'To virtual Bus' when adding a signal to a Bus used in the reference model

I manage the bus within the SLDD file.
After adding a signal to the bus used in the model reference, an error occurs when I click code generation:
"Error: The interface information in the saved model file for model 'MRef1' is different than the information in the updated diagram. Save the model to resolve the inconsistency."
(If I do an 'update diagram', the error does not occur.)
However, if I slightly move the position of the 'To Virtual Bus' block and generate the code, it works normally.
Is there any additional step I need to perform before running code generation after adding a signal?

 採用された回答

Angelo Yeo
Angelo Yeo 2025 年 4 月 6 日

0 投票

Such issues occur when the model is generated with an older version or library network and then invoked in a newer top-level model. This is a known limitation due to Simulink's architectural choices when using bus element ports with model references.
Such errors may arise when older versions are integrated into newer top-level models. To resolve this, you can try the following steps:
  1. Open the top-level model
  2. Open the referenced model as a top-level model. Update the referenced model and save it.
  3. Update the top-level model.
You should be able to generate the code after the steps above. However, if the issue still persists, please reach out to technical support: Contact Support - MATLAB & Simulink

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File Exchange で Deployment, Integration, and Supported Hardware についてさらに検索

製品

リリース

R2024b

質問済み:

2025 年 4 月 6 日

回答済み:

2025 年 4 月 6 日

Community Treasure Hunt

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

Start Hunting!

Translated by