Is it possible to debug .ssc of simscape while simulation is running?

조회 수: 7 (최근 30일)
Omprakash Pobbati
Omprakash Pobbati 2019년 5월 13일
답변: Martin 2019년 6월 13일
Hi,
I am simulating a model which has simulink blocks as well as .ssc components from physical modeling (two-phase domian) domain of simscape. I did like to observe the values inside one of the .ssc components during step by step execution.
When I set up the simulink debugger, " the methods" highlighted under "simulation loop" of the debugger window are belonging to basic simulink blocks only. Also even while adding the .ssc components under "blocks" of "break/display points" window of the debugger, I am not successful to get the live values of the .ssc components in the "outputs" of the debugger window.
  1. Kindly let me know if there a way to debugg .ssc components alike regular simulink blocks.
  2. Also, is there a way to put a break point inside the .ssc code and execute step by step, just like the way we can do for any matlab user defined function.
Many thanks,
Omprakash

답변 (1개)

Martin
Martin 2019년 6월 13일
Hello Omprakash,
I key distinction with Simscape is that it uses acausal modeling. This means that the equations written in a component are not simply executed in order. Rather, they are constraints that are all solved simultaneously. For example, F==m*a does not take the current acceleration and mass and multiply them to get force. It ensures that the constraint remains true, so that if one value changes (say, F), then the others change accordingly.
Given that everything is solved simulateously, a step-by-step debugger would not be relevant. I would encourage you to log the system variables and use that to explore the system.
Martin

카테고리

Help CenterFile Exchange에서 Foundation and Custom Domains에 대해 자세히 알아보기

제품


릴리스

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by