How to get a list of signals and blocks used in a particular Simulink diagram?

9 vues (au cours des 30 derniers jours)
I have a Simulink diagram. Are there any functions that would output a list of blocks used in that diagram with their parameters? Also, are there any functions that would output a list of signals used in the diagram with their names together with information to what blocks those signals are connected to?
All of this is needed so that I could write a script that translates my Simulink diagram to a textual representation (i.e. .txt file), which is later used as an input to an automated theorem prover.

Réponse acceptée

Sreeram Mohan
Sreeram Mohan le 20 Nov 2014
Hi Kestutis,
find_system is the command that is easier way(though slow if the models are large) that can come in handy.
for instance to get the list of blocks you could try this on a simple model like : >> vdp >> find_system('vdp', 'Type', 'Block')
This should return a cell array of all the blocks.
Like wise you could go through the help for find_system to discover more options.
Hope this helps !!!
--sreeram

Plus de réponses (0)

Catégories

En savoir plus sur Programmatic Model Editing 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!

Translated by