Main Content

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.

hardware.png

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 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 the Power Supply Board component and connected to the Battery Pack component.

  • A new port named Wheel Stud connected from the Wheels component to the Mobile Robot Case component.

  • A new owned interface with elements Signal and Message owned by the Command output port.

  • A port on the Target Machine component renamed from Commands to Command.

  • The Controller component that is converted to a Stateflow® chart component.

architecture.png

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, and BluePhase.

  • A new Colors data interface with three data elements: R, G, and B.

  • A new physical interface named ThermalMeasure with the physical element Heat.

interface.png

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, and Charge Board.

  • Changes to the existing views Life Expectancy and Mobile Robot due to renaming the Battery component to Battery Pack.

views.png

When you click on each of the view names, the bottom pane will indicate if there are further modifications to the views.

See Also

Functions

Tools

Related Topics