how to find the floating scope in simulink model?
10 次查看(过去 30 天)
显示 更早的评论
how to find the floating scope present (or) not in model, through line properties for m-scripting
Example:
Type ='Line'
Property = ?
0 个评论
回答(3 个)
Kaustubha Govind
2013-7-22
You can use find_system('modelname','BlockType','Scope') to find all Scopes in a model, but if you are only interested in Floating Scopes, one way of identifying them would be to loop through the blocks returned by the above find_system command, and ensure that it has no input ports. In other words, the field 'Inport' in the structure returned by get_param('path/to/scope', 'PortHandles') should be empty.
3 个评论
Kaustubha Govind
2013-7-23
Select the Scope block in the model and run this at the MATLAB prompt. What do you get as the result?
>> get_param(gcb, 'BlockType')
Kaustubha Govind
2013-7-25
Sorry, I thought you were using the Floating Scope block from the Simulink library. It doesn't look like there is a published API to find Signal Viewers in a model, so I'd recommend that you contact MathWorks Tech Support to see if they have any workarounds.
suresh s
2013-7-25
1 个评论
Kaustubha Govind
2013-7-25
Please reply to comments with another comment instead of creating an answer. I will continue the conversation in the previous thread to avoid confusion.
Subhadra Mahanti
2016-2-4
To find a floating scope in a model
find_system(aModel,'AllBlocks','on','BlockType','Scope','Floating','on')
To find a floating scope viewer in a model (if you are using an older version of MATLAB since I don't think this is supported anymore)
find_system(aModel,'AllBlocks','on','BlockType','Scope','Floating','on', 'IOType', 'viewer')
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Simulink Functions 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!