Azzera filtri
Azzera filtri

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

1 visualizzazione (ultimi 30 giorni)
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

Risposte (1)

Mark McBroom
Mark McBroom il 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.

Categorie

Scopri di più su Deployment, Integration, and Supported Hardware in Help Center e File Exchange

Prodotti


Release

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by