Program a Variant Subsystem
6 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hello everyone,
I want to know how can I configure a Variant Subsystem programmatically. I want to write a script that will generate such a module which just included a Variant Subsystem module and inside different Subsystems. The number of inports and outports depend on the parameters the user passes to the script.
I have read Simulink User Guide and Simulink Reference and didn't found anything under "Model and Block Parameters".
Whoever can lend me a hand please do ;) thanks in advance!
0 commentaires
Réponses (1)
Ryan G
le 5 Oct 2012
Passing different number of input/output ports may not be supported, but you can workaround this issue by passing in the maximum number of signals ever expected and then terminating them in the susbsytems for which they are unused and grounding the inputs when they are not used as inputs programatically.
In the end it looks like you want build a model programitcally around the variant subsytem (adding/removing inports outports grounds and lines). Furthermore, to find out what you can and cannot do with the variant subsystem, you can click the subsystem and then go to the MATLAB command window and type:
get_param(gcb,'DialogParameters')
If you want even more options, try this:
blkHdl = get_param(gcb,'Handle');
get(blkHdl)
As previously stated, you may come across issues with limitation in the variant subsystem, but they can often be easily worked around.
0 commentaires
Voir également
Catégories
En savoir plus sur Component-Based Modeling dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!