This example shows the basic workflow for logging simulation data for the whole model and then navigating and plotting the logged data using Simscape™ Results Explorer.
Open the Permanent Magnet DC Motor example model by typing ssc_dcmotor
in the MATLAB® Command Window.
Open the Configuration Parameters dialog box and then, in the left pane, select
Simscape. You can see that this example model already has data
logging for the whole model enabled, as well as simulation statistics, and that the
workspace variable name is simlog_ssc_dcmotor
. Select the
Open viewer after simulation check box and click
OK.
Simulate the model. When the simulation is done, the Simscape Results Explorer window opens. In the left pane, it contains the simulation log tree hierarchy, which corresponds to the model hierarchy.
When you click a node in the left pane, the corresponding plots appear in the right
pane. Expand the DC_Motor
node, and then click the
Rotational_Electromechanical_Converter
node to see all the node plots
for this block.
To isolate the plot of the rotor angular velocity series against time, keep expanding the nodes in the left pane until you get to the series data.