How to generate a single data definition file for several models accessing to the same data dictionary?

3 次查看(过去 30 天)
Hello,
Currently I'm trying to generate C code with several models accessing to the same data dictionary. In the data dactionary, the parameter and signal is set to ExportToFile, and the source file name is xxx.c.
Then I use slbuild command to generate code from the models one by one, however, each model will generate one xxx.c file, containing only the parameters used in this model.
If I want to generate a single xxx.c file once, containing all the parameters of the data dictionary, what should I do?
Thanks for any reply in advance.
Lync

回答(1 个)

Mark McBroom
Mark McBroom 2023-11-18
Is there a reason why you are generating code for each model seperately? When you do this, the xxx.c file will only contain parameters from the SLDD that are used in the particular Simulink model. If you place all of your models as reference models in a single top level model, you would then get a single xxx.c file that contains all parameters used by all of the referenced models.

类别

Help CenterFile Exchange 中查找有关 Simulink Coder 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by