Build failed happen when convert subsystem to model reference

조회 수: 7 (최근 30일)
Bui
Bui 2024년 4월 28일
답변: Omega 2024년 8월 2일
I have 1 model with top level is a subsystem, i can success build it. But, when i converted that subsystem to a model reference, build failed happen with this information;
Error: Invalid data scope setting 'File' for data object 'ABC' when code is generated for model 'ABC'. The data object is either used in more than one file in the generated code, has no readers or writers, or is a signal that is connected to a root input/output port. Modify the data scope of the data object to either 'Auto' or 'Exported'.

답변 (1개)

Omega
Omega 2024년 8월 2일
Hi Bui,
The error you're encountering typically occurs when the data scope setting for a signal or parameter is not compatible with the requirements of code generation for a model reference. Specifically, the error message indicates that the data object "ABC" has an invalid scope setting of "File".
You can fix the error by following the steps mentioned below:
  • Locate the data object "ABC" in your model. This could be a signal, parameter, or any other data object defined in your workspace or model.
  • Check the properties of the data object "ABC".
  • Change the "DataScope" property from "File" to either "Auto" or "Exported".
To learn more about the Storage Classes you can refer to the following documentation link:
Storage Classes for Parameters and Signals Used in Model Blocks

카테고리

Help CenterFile Exchange에서 Deployment, Integration, and Supported Hardware에 대해 자세히 알아보기

제품


릴리스

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by