How can I comment out a subsystem from the mask initialisation pane (the subsystem is inside the masked subsystem)?
4 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
I would like to comment out either this or that subsystem from within the mask initialization pane, depending on the user's choice of a certain mask parameter. But when I use the set_param command, I get these error messages Error in 'xyz': Initialization commands cannot be evaluated. Caused by: Block 'xyz' cannot be commented during execution of a callback
Is this impossible in general, or do I have to use some tricks here?
0 Commenti
Risposte (2)
Kiran
il 8 Feb 2016
Hi Hans,
The ability to comment out blocks from inside the block callback during the initialization phase is not available in Simulink.
This is expected behavior because the Simulink solver decides the block executing order during the model compilation phase. Therefore, commenting out blocks would be an unexpected behavior for the solver and the model would give an error message.
To enable this kind of behavior, you may use a variant subsystem with a subsystem variant that is just a direct feed-through from the inport to the outport.
Hope this would help.
0 Commenti
Vedere anche
Categorie
Scopri di più su Subsystems in Help Center e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!