Compare Model Differences Using System Composer Comparison Tool
This example shows how to use the System Composer 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 System Composer 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 sideDeletion
— Removed elements that did exist on the left side but not on the right sideModification
— Changes to existing elements that exist on both the left and right sides
Compare Structural Differences
The Architecture section of the System Composer comparison report includes 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 Controladded to thePower Supply Boardcomponent and connected to theBattery PackcomponentA new port named
Wheel Studconnected from theWheelscomponent to theMobile Robot CasecomponentA new owned interface with elements
SignalandMessageowned by theCommandoutput portA port on the
Target Machinecomponent renamed fromCommandstoCommandThe
Controllercomponent 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 each row of the comparison report, the corresponding open models on the right side are highlighted.
Compare Interface Differences
The Interfaces section of the System Composer comparison report includes changes to interfaces on the model data dictionary. The comparison report displays:
Three new value type interfaces called
RedPhase,GreenPhase, andBluePhaseA new
Colorsdata interface with three data elements:R,G, andBA new physical interface named
ThermalMeasurewith the physical elementHeat

When you click a 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 View Differences
The Architecture Views section of the System Composer comparison report includes 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
BatteryPackview and the components that are displayed within it:Power Supply Board,Battery Pack, andCharge BoardChanges to the existing views
Life ExpectancyandMobile Robotdue to renaming theBatterycomponent toBattery Pack

When you click each of the view names, the bottom pane indicates if the views have further modifications.