필터 지우기
필터 지우기

how to find the floating scope in simulink model?

조회 수: 14 (최근 30일)
suresh s
suresh s 2013년 7월 22일
답변: Subhadra Mahanti 2016년 2월 4일
how to find the floating scope present (or) not in model, through line properties for m-scripting
Example:
Type ='Line'
Property = ?

답변 (3개)

Kaustubha Govind
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
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
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
suresh s 2013년 7월 25일
>> get_param(gcb, 'BlockType')
ans
Scope
It's finding the Scope blocks,but my question is find only floating scope (it's not a simulink block) you can right click on a line----->Create & connect Viewer----->Simulink---->floating scope
The floating scope on a line will present.
In my model having only floating scope, this i have to find.
Thanks in Advance
  댓글 수: 1
Kaustubha Govind
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
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')

카테고리

Help CenterFile Exchange에서 View and Analyze Simulation Results에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by