Compare Model Differences Using System Composer Comparison Tool
This example shows how to use the Comparison Tool to compare two System Composer™ architecture models with differences in architectural data. The models represent a mobile robot hardware architecture and an edited version of the same model.
To open the Comparison Tool, enter this command.
visdiff("scMobileRobotHardwareArchitecture.slx","scMobileRobotHardwareArchitectureEdited.slx")
Rows in the comparison report are highlighted according to the type of difference:
Insertion
— Added elements to the right side that did not exist on the left side
Deletion
— Removed elements that did exist on the left side but not on the right side
Modification
— Changes to existing elements that exist on both the left and right sides
Compare Structural Differences
The first section of the System Composer comparison report is called Architecture
. The differences in this section include changes to components, ports, and connectors. This section also includes changes to component types, port types, and any owned interfaces added to ports. The comparison report displays:
A new physical port named
Temperature Control
added to thePower Supply Board
component and connected to theBattery Pack
component.A new port named
Wheel Stud
connected from theWheels
component to theMobile Robot Case
component.A new owned interface with elements
Signal
andMessage
owned by theCommand
ouput port.A port on the
Target Machine
component renamed fromCommands
toCommand
.The
Controller
component that is converted to a Stateflow® chart component.
To learn more about specific changes, you can select the row in the comparison report and view additional information in the bottom pane. As you click on each row of the comparison report, the corresponding open models on the right side are highlighted.
Compare Interface Dictionary Differences
The second section of the System Composer comparison report is called Interfaces
. The differences in this section include changes to interfaces on the model data dictionary. The comparison report displays:
Three new value type interfaces called
RedPhase
,GreenPhase
, andBluePhase
.A new
Colors
data interface with three data elements:R
,G
, andB
.A new physical interface named
ThermalMeasure
with the physical elementHeat
.
When you click on the data element: R
, G
, or B
, you can see that the element is typed by its value type. You can also inspect the physical domain that types the physical element Heat
.
Compare Views Differences
The third section of the System Composer comparison report is called Architecture Views
. The differences in this section added or deleted architecture views and shows whether the view mode has changed between Component Diagram
, Component Hierarchy
, or Architecture Hierarchy
. The comparison report displays:
The new
BatteryPack
view and the components that are displayed within it:Power Supply Board
,Battery Pack
, andCharge Board
.Changes to the existing views
Life Expectancy
andMobile Robot
due to renaming theBattery
component toBattery Pack
.
When you click on each of the view names, the bottom pane will indicate if there are further modifications to the views.