Model with multiple data dictionaries

조회 수: 8 (최근 30일)
Arunkumar Muthukumaran
Arunkumar Muthukumaran 2015년 5월 18일
댓글: Carl-Jakob Ulmer 2015년 5월 20일
I have a top level model which has two reference models namely a.slx and b.slx . Both have their own data dictionaries namely a.sldd and b.sldd. If I have same simulink enumeration defined in both data dictionaries, as both models use it but I am not able to run the model, since MATLAB says, it is defined twice. But I want to use it this way. Is there any way to override this issue? I have read that Model Workspace can be used to resolve this issue, but I would like to find solutions within data dictionary.

답변 (1개)

Sebastian Castro
Sebastian Castro 2015년 5월 19일
This is a safety mechanism in data dictionaries such that you can't accidentally modify one variable, but not the other. The best approach is to make sure your enumeration comes from a single source.
To do this, you can put the common global data (like that Enumeration) in a third dictionary "c.sldd" and reference it in both "a.sldd" and "b.sldd".
- Sebastian
  댓글 수: 1
Carl-Jakob Ulmer
Carl-Jakob Ulmer 2015년 5월 20일
But it makes things complicated when different people are working within one Simulink project. Usually enumerations are included with .h file for code generation. When enumerations are defined different in different data dictionary I would expect a warning but not an error.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Manage Design Data에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by