Find system is not able to find Function-Call Generators

2 vues (au cours des 30 derniers jours)
Vishnu Swaroop
Vishnu Swaroop le 30 Nov 2017
Réponse apportée : KVM le 30 Nov 2017
I am trying to find all function-call generators in the model using find_system and it is not working (returns an empty array). Here is my command:
find_system('<model name>','LookUnderMasks','all','FindAll','on','FollowLinks','on','Variants','AllVariants','BlockType','Function-Call Generator')
I have tried all combinations of the flags, but nothing works. I have looked at this page to find the keyword: https://www.mathworks.com/help/releases/R2016b/simulink/slref/block-specific-parameters.html
Also, find_system does work for other blocks

Réponses (1)

KVM
KVM le 30 Nov 2017
You can use the Model explorer to find all the parameters associated to the block or you can use the command line (where gcb = your selected block) : >> get_param(gcb,'ObjectParameters')
I decided to use 'ReferenceBlock' as parameter for the search which for a Function Call generator is : 'simulink/Ports & Subsystems/Function-Call Generator'
In Sum, try this commande line: >>find_system(bdroot,'LookUnderMasks','all','FindAll','on','FollowLinks','on','Variants','AllVariants','ReferenceBlock',['simulink/Ports &',char(13),'Subsystems/Function-Call',char(13),'Generator'])
bdroot = Your top Simulink model ('<model name>')

Catégories

En savoir plus sur Schedule Model Components dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by