Is it possible to debug .ssc of simscape while simulation is running?
8 ビュー (過去 30 日間)
古いコメントを表示
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.
- Kindly let me know if there a way to debugg .ssc components alike regular simulink blocks.
- 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
0 件のコメント
回答 (1 件)
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
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Foundation and Custom Domains についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!