Is it possible to toggle visibility of signals in (floating) scope during simulation?
조회 수: 2 (최근 30일)
이전 댓글 표시
I am looking for a way to connect multiple signals to a Simulink scope (can be a floating scope as well) and dynamically toggle the visibility of lines (individual signals) during a simulation. The toggling could for example be handled in a callback function, a Matlab function block, or a StateFlow action. Is there a way to (programmatically) achieve this? Important is that it needs to work during a simulation.
댓글 수: 0
답변 (2개)
Anh Tran
2017년 9월 8일
편집: Anh Tran
2017년 9월 8일
I tried a simple test to check if setting scope configuration in runtime is possible or not: 1. Open shipped demo 'vdp'
>> vdp
2. Set the end time to Inf and run the model
3. In MATLAB command window, I can change the scope configuration during simulation. In this case, by changing 'Visibility' property, I can open or close the scope.
>> myScopeConfiguration = get_param('vdp/Scope','ScopeConfiguration')
>> myScopeConfiguration.Visible = true
If you are able to dynamically toggle the visibility of lines with callback function or MATLAB function block, you should be able to perform this workflow with command line functions. Good luck!
Anh Tran
2017년 9월 11일
I was not able to find information on how to toggle which input signals are shown on the scope programmatically. I will create an enhancement request for the development team to consider this feature in future release.
참고 항목
카테고리
Help Center 및 File 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!