Unable to Link Data Dictionary entries to System Composer Component Properties

조회 수: 10 (최근 30일)
ydyd
ydyd 2025년 2월 18일
답변: Josh Kahn 2025년 2월 24일
Hi,
I am currently working with MATLAB R2024b, Simulink, and System Composer on Ubuntu 24.04.1 LTS, and I am encountering an issue when attempting to link data dictionary entries to System Composer component properties.
Context:
  • I have a System Composer model representing a spacecraft system.
  • My components have a Profile (PhysGeneral) in which I added properties such as Mass, PowerConsumption, and Volume.
  • I have created a data dictionary SatelliteData.sldd with corresponding entries (e.g., TotalMass as data type double).
  • My goal is to link data dictionary entries to the respective component properties to maintain a centralized data management approach.
Issue:
When trying to link a component property e.g. Mass to a data dictionary entry TotalMass, I get the following error:
What I’ve Tried:
  • Different data types, Matlab Variables and Simulink Parameters
  • Ensuring that the component properties are defined with the correct type and data dictionary entries exist.
  • Verifying that the data dictionary is correctly attached to the System Composer model.
  • Looking into System Composer documentation and related MathWorks resources.
Questions:
  1. What is the correct procedure to ensure linking between System Composer component properties and data dictionary entries?
  2. Is it possible to achieve persistent linking between System Composer component properties and data dictionary entries? If not, what alternative approach should I consider?
Any guidance, best practices, or troubleshooting steps would be greatly appreciated.
Thank you in advance for your support!
Best regards
YD

답변 (2개)

Aabha
Aabha 2025년 2월 24일
Hi @ydyd,
The System Composer component properties can be linked to data dictionaries using the “linkDictionary” function in MATLAB. This function associates the specified Simulink data dictionary with the system composer model.
In Simulink, when a data dictionary is linked to a model using linkDictionary, the model cannot have locally defined interfaces. This means that the model should not have its own local definitions for data types, signals, parameters, or any other interfaces that are intended to be managed by the data dictionary. This ensures consistency and reusability across different models by maintaining a single source for data definitions.
If the model has locally defined interfaces, that may conflict with or duplicate the definitions in the dictionary, it might cause the above error.
Please refer to the following documentation link for more details about the “linkDictionary” function:
Please refer to the following example, which explains the workflow of building an architecture model programmatically using System Composer. It shows how to build an architecture model, add a data dictionary with data interfaces, data elements, a value type, and a physical interface.
I hope this is helpful.

Josh Kahn
Josh Kahn 2025년 2월 24일
Hi @ydyd,
System Composer Profiles do not currently support linking to Simulink Data Dictionaries for data type definitions. I have reported this as a feature request in our internal tracking system. In the meantime, the easiest alternative is to use the built-in features in the profile editor to specify min/max and units, using base stereotypes to avoid duplication of effort.
A more advanced alternative would be to use a custom edit time check to perform the value validation but you would also have to decide how to maintain the mapping between stereotype properties and the data dictionary entries.
Hope this helps. If you have questions about the edit time check, let me know.
Josh

카테고리

Help CenterFile Exchange에서 System Composer에 대해 자세히 알아보기

제품


릴리스

R2024b

Community Treasure Hunt

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

Start Hunting!

Translated by