How do I switch between Model Reference and Subsystems in my model for debugging?
3 views (last 30 days)
Show older comments
When I model my system using Model Reference blocks, it is difficult to debug problems with Model Reference blocks because there is no way to look into the execution of the block like there is in Normal mode.
Also, if I make small changes to my referenced model, I need to rebuild my model each time, which is time consuming and a lot slower than tuning parameters and editing Subsystems.
Is there a way I can switch back and forth between Model Reference and Subsystems?
Accepted Answer
MathWorks Support Team
on 27 Jun 2009
The attached example in config.zip has a library (called "Config_lib.mdl") that contains a Configurable Subsystem that allows switching between a subsystem implementation and a subsystem wrapped around a Model Reference block (which in turn uses the Subsystem block as its algorithm).
The other files contained in the ZIP-file are:
mtop.mdl - the top level model
Mconfig1.mdl - a referenced model
The Configurable Subsystem in the "Config_lib" library is masked to eliminate the need for two masks. The single source for the algorithm is the Subsystem in the library. The Configurable Subsystem allows for easy switching between a Model Reference implementation and a Subsystem implementation.
0 Comments
More Answers (0)
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!