How do I manage the Model configuration parameters when using variant with several system targets ?

My objective is to be able to generate the code of a model to several system targets.
By using variant subsystems, I'm able to select the target's specific blocks but not the model configuration parameters.
Is there a way?

 Accepted Answer

You can have multiple model configuration sets saved with the model and switch them. It can be done manully or through API.

5 Comments

Hi Fangjun,
Thanks for your reply. I know that you can have and select several model configuration sets, or define configuration reference. In fact, by the variant manager, I would link a variant with a model configuration set.
My question is : is there a way to link a model configuration set with a variant defined in the variant manager?
Indeed, I didn't find a way to link them, not even some type of callback to use the API to switch model configuration.
If you are using later versions, please consider the "sim codegen switching" for "variant conrol mode". You might be able to switch codegen target directly in variants.
R2017b is too old. It doesn't have this capability.
Search "sim codegen switching" at this link
Thanks for your reply, it confirms me 2 points : no links is available and RT2017b is too old...
I'll update soon my package, so it should solve my problem. If not I'll try this trick : put codes in blocks's callback which are managed by variant.

Sign in to comment.

More Answers (0)

Products

Release

R2017b

Community Treasure Hunt

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

Start Hunting!