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

7 visualizaciones (últimos 30 días)
Omprakash Pobbati
Omprakash Pobbati el 13 de Mayo de 2019
Respondida: Martin el 13 de Jun. de 2019
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

Respuestas (1)

Martin
Martin el 13 de Jun. de 2019
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

Categorías

Más información sobre Troubleshooting en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by