How is the FIND_SYSTEM command used with referenced models in Simulink 6.5 (R2006b)?

I would like to know if the FIND_SYSTEM command can be used in Simulink 6.5 (R2006b) to search and get information on models containing reference blocks.

 Accepted Answer

You cannot use the FIND_SYSTEM command by itself in Simulink 6.5 (R2006b) to obtain the contents of a referenced model.
There are two possible workarounds:
1) Use the FIND_MDLREFS command in conjunction with the FIND_SYSTEM command.
For example, to find the relational operator blocks inside all of the referenced models that have the relational operator property set to "==" in the demo model "sldemo_mdlref_basic":
[r, b] = find_mdlrefs('sldemo_mdlref_basic');
load_system(r{1})
rel_blks = find_system(r{1},'FindAll', 'on','BlockType','RelationalOperator','Operator','==')
Note: The last two commands can be used in a FOR loop if you have multiple referenced models.
2) A second possible workaround is to use the MATLAB file submitted in the following MATLAB File Exchange link:
Note that MathWorks does not guarantee or warrant the use or content of these submissions. Any questions, issues, or complaints should be directed to the contributing author.

More Answers (0)

Categories

Find more on Modeling in Help Center and File Exchange

Products

Tags

No tags entered yet.

Community Treasure Hunt

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

Start Hunting!