Filter löschen
Filter löschen

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

1 Ansicht (letzte 30 Tage)
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

Antworten (1)

Mark McBroom
Mark McBroom am 18 Nov. 2023
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.

Kategorien

Mehr zu Deployment, Integration, and Supported Hardware finden Sie in Help Center und File Exchange

Produkte


Version

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by