필터 지우기
필터 지우기

How to delete all the scopes in Simulink?

조회 수: 39 (최근 30일)
Maria
Maria 2018년 1월 4일
댓글: Jakob 2024년 3월 6일
Hi, in a Simulink model, I have used "Create and connect viewer" to see the signal in a specific point. I attach a snapshot to show how it looks like.
Now, after I while that I simulate and program, Simulink tells me that it has 7 scopes, but I actually see only one! I have no idea where the other 6 are...Is there a way to see where are the scopes, or just to delete all the scopes from the command window?
  댓글 수: 2
Birdman
Birdman 2018년 1월 4일
Can you share your model?
Maria
Maria 2018년 1월 4일
I attach a smaller version of the file. If I try "connect to viewer", it still shows me that I can choose among 7 scopes that I do not see.

댓글을 달려면 로그인하십시오.

채택된 답변

Emmanouil Tzorakoleftherakis
Emmanouil Tzorakoleftherakis 2018년 1월 8일
Hi Maria,
Please select Diagram > Signals & Ports > Signal & Scope Manager. You will be able to see (and delete) all the scopes attached to the model, even the "invisible ones".
  댓글 수: 2
Maria
Maria 2018년 1월 9일
Thank you!!!!!!!!:))))))
Jakob
Jakob 2024년 3월 6일
Hey it seems as if the signal & scope manager was taken out and I can not figure out how to do this otherwise. I know this is a an old post but it any help would be appriciated!

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

Abhinav Joshi
Abhinav Joshi 2018년 1월 8일
편집: Abhinav Joshi 2018년 1월 8일
%Try running the below command in the command window in your current working directory where the model is present
delete_block(find_system('state_space_forum','BlockType','Scope'));
% where 'state_space_forum'is your Simulink model name % This will delete all the Scopes that are present in the model
  댓글 수: 2
Maria
Maria 2018년 1월 8일
Hi, it does not seem to work...
Fabien Fellay
Fabien Fellay 2020년 6월 30일
편집: Fabien Fellay 2020년 6월 30일
To erase all scope viewers (the 'invisible' scopes) programmatically, use (seems to be working on R2020a):
mdl = 'your_model_name';
all_scope_viewer = find_system(mdl,'AllBlocks','on','IOType','viewer');
delete_block(all_scope_viewer);
This should do the work. The key here is the 'AllBlocks' to 'on' option, which seems undocumented. However, this appears to trigger some handle errors within the Signal & Scope Manager, which seems not aware of the manual deletion. Save your model and next time you open it, the handle errors will be gone.
all_scope_viewer = find_system(mdl,'AllBlocks','on','BlockType','Scope');
should also work, provided that all the scopes in your model are scope viewers (in case you do not want to delete the regular scopes).
A missing feature that would be useful: the ability to 'comment out' those scope viewers without actually deleting them (the same as the regular scopes that support this feature).

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Scopes and Data Logging에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by