Welcome to SimDiff

How to Use this Manual

Before using SimDiff we highly recommend that you watch the Flash demos. There are two demos, the SimDiff Pro demo and the SimDiff LT demo.

After that you can use this manual as a quick reference while using SimDiff. Its small width makes it fit perfectly next to SimDiff on your monitor.

[simdiff window next to manual on a monitor]

Organization

This manual is organized into instructions for various tasks you may want to perform in SimDiff. For example how to diff two models, how to audit differences, etc.

Typically each step in a set of instructions will have a diagram indicating what parts of SimDiff's window you need to focus on for that step. Blue shaded parts of the diagram indicate where to perform the described action, and green shaded parts of the diagram indicate where results are displayed. For example:

  1. 4 [example diagram]Click on a difference in the center panel. Attribute changes for the selected difference appear in the lower mid panel.

Text Conventions

Instructions     Regular
Screen Elements     Blue Italic
Menus     MenuMenu Item

Table of Contents

Installation

Diffing Two Simulink Models

Configuring SimDiff to work with MATLAB

Viewing differences in Simulink/Stateflow

Changing Highlighted Colors

Diffing Referenced Libraries

Comparing base MATLAB workspace

Changing Simulink Window Positions

Diffing Two Subsystems

Viewing Differences From Model Hierarchy

Customizing Columns

Filtering Attributes

Auditing Differences

Generating an HTML Report

Integrating with ClearCase Explorer

Integrating with Other Repository Clients

Choosing to show entire added/deleted model hierarchies

Accessing SimDiff from MATLAB

Requesting Support from EnSoft

Legal Notice

Installing SimDiff

  1. 1 Run the installer from the e-mail you received from EnSoft or your SimDiff Installation CD. The installer file is named in the format SimDiff-3.x.x-install.exe
  2. 2 Follow the on-screen instructions.
  3. 3 The first time you run SimDiff you will be asked to enter your license key or license server information.

Diffing Two Simulink Models

  1. 1 [diagram]Select the first model to compare.
  2. 2 [diagram]Select the second model to compare.
  3. 3 [diagram]Click on the Diff button.
  4. 4 [diagram]Click on a difference on in the center panel. Attribute changes for the selected difference appear in the lower mid panel.
  5. 5 [diagram]Click on the View Difference button to view the difference highlighted within Simulink/Stateflow.

Notes: If you see this icon [clearcase repository icon]to the right of a model you selected, the model is stored in a ClearCase repository. Click on the icon to change which version you want to diff.

Configuring SimDiff to work with MATLAB

SimDiff connects to a MATLAB Automation Server to perform certain tasks, such as displaying Simulink models. When starting an operation that requires MATLAB, if no installations are configured, SimDiff will require the user to make one or more MATLAB installations available to SimDiff before continuing. The list of MATLAB installations available to SimDiff can also be configured at any time from the preferences:

  1. 1 [diagram]Open FilePreferencesMATLAB.
  2. 2 [diagram]Use the Autodetect button to have SimDiff automatically search for MATLAB installations, or use the Add button to browse and add installations manually.
  3. 3 [diagram]Click OK.

Notes:
—The Available column indicates whether or not SimDiff was able to successfully connect to MATLAB on its last attempt. SimDiff will not try to connect to an unavailable installation until it is refreshed using the Refresh button.
—In some cases, SimDiff may not be able to connect to MATLAB on a limited user account. This mostly occurs on machines with more than one installation of MATLAB.
—In Windows Vista and later, if User Account Controls (UAC) are enabled, a UAC prompt will appear when administrator privileges are needed. The connection will fail if privileges are not granted.
—Due to compatibility issues, SimDiff is not able to connect to MATLAB R14SP1 and older on Windows Vista or newer.
—Features that require connecting to MATLAB will include a note: This feature requires MATLAB

Viewing differences in Simulink/Stateflow

Differences in blocks will appeared colored in the Simulink model. Differences in Stateflow objects will appear with a prefix ("c_" for changes, "a_" for additions and "d_" for deletions) in its label. This is so since Stateflow currently does not support adding colors to objects.

Notes:
This feature requires MATLAB

Changing Highlighted Colors

  1. 1 [diagram]Click on one of the colored squares:
    Additions, Changes, Deletions, Flashing Color
  2. 2 [diagram]Pick the color you want.
  3. 3 [diagram]Click on the Diff button.

Notes:
—Changing Flashing Color does not require that you click on Diff—it is immediately applied.

Diffing Referenced Libraries

Your model may contain library reference blocks. By default SimDiff will only diff the information inside the .mdl file—in this case the reference block, not the referenced block. If you want SimDiff to diff the referenced block instead, follow these instructions:

  1. 1 [diagram]Check-off Inline under the Library Links section.
  2. 2 [diagram]Click Directories to open the Library Directories dialog.
  3. 3 [diagram]Add library directories using [+]. Directories may be specific to the first or second model, or common to both.
  4. 4 [diagram]Click OK. Next time you click Diff, SimDiff will ask MATLAB to create a model with referenced blocks inline.

Notes:
This feature requires MATLAB
—Library directories may be relative or absolute.

Comparing base MATLAB workspace

Your models may use base MATLAB workspace variables during simulation. If you want SimDiff to compare workspace variables follow these instructions:

  1. 1 [diagram]Open FilePreferencesDiff.
  2. 2 [diagram]Check off Base (MATLAB) Workspace.
  3. 3 [diagram][Optional] Specify .m setup script files to perform workspace initialization, such as setting the MATLAB path, before loading the model.
  4. 4 [diagram]Click OK. On next diff, Base (MATLAB) Workspace differences will be shown.

Notes:
This feature requires MATLAB
—SimDiff displays the value of workspace variables in the Attributes Panel when selected. Actual values are displayed for most variable types including strings, vectors and two-dimensional matrices and cell arrays. For other types, the type is displayed instead of the actual value.

Changing Simulink Window Positions

When you view differences in Simulink, SimDiff organizes the Simulink windows so that you can browse differences efficiently. All the windows for model 1 will appear in the same place, and all the windows for model 2 will appear in another.

[window position example]
  1. 1 [diagram]Open FilePreferencesView.
  2. 2 [diagram]Click Set Window Positions.
  3. 3 [diagram]Place the windows where you want them.
  4. 4 [diagram][diagram]Click OK. Click OK. Next time you click Diff the windows will appear in their new positions.

Diffing Two Subsystems

SimDiff allows subsystems of models to be diffed, while ignoring the rest of the model.

  1. 1 [diagram]Select the first model to compare.
  2. 2 [diagram]Click Select to open the Available Subsystems dialog.
  3. 3 [diagram]Select the subsystem to diff from the tree.
  4. 4 [diagram]Click OK.
  5. 5 Repeat steps 1-4 for the second model.
  6. 6 [diagram]Click on the Diff button.

Notes: To clear a subsystem selection, click the [X] next to the subsystem name.

Viewing Differences from Model Hierarchy

The Model Hierarchy panel shows the unified tree of the subsystem for the first and second model. The subsystems that are changed, added or deleted are colored using the highlighted colors. Subsytems that have their name changed are shown in bold.

  1. 1 [diagram]Select the node in the model hierarchy tree. The difference list is updated to show only differences in that subsystem.
  2. 2 [diagram]Choose the option "Show difference in selected subsystem only" or "Show all differences under selected subsystem" to see the elements under that node.

Customizing Columns

  1. 1 [diagram]Click on the "Choose columns" button to choose the columns you want to be displayed.
  2. 2 Columns can also be moved around by clicking on the column heading and dragging them to an appropriate location.

Filtering Attributes

SimDiff can be told to ignore certain attributes when determining if a block or line has changed. The attribute can be ignored for specific block or line types, or for all blocks and lines.

  1. 1 [diagram]Open the Attributes Filter Editor dialog.
  2. 2 [diagram]If the element is a Stateflow element, switch to the Stateflow tab.
  3. 3 [diagram]Select the block or line type in the left column. Attributes for that type are displayed on the right.
  4. 4 [diagram]Select the attribute name in the right column.
  5. 5 [diagram]Click Save to save the filter to an ".af" file. The next diff will ignore the attributes specified in this file.

Notes:
—The special types [All Block Attributes], [All Line Attributes], [All Stateflow Object Attributes], and [All Transition Attributes] can be used to filter out an attribute from every block or line in the model, not just a specific block type or line type.
—If the text (Common) appears at the end of an attribute name, the attribute is common to all blocks or all lines. Otherwise, the attribute is specific to that block type or line type.
—Custom attributes and undocumented MATLAB attributes can be imported into the editor by selecting Import and choosing an ".mdl" file containing these attributes.

Auditing Differences

This feature is only available in SimDiff Pro

  1. 1 [diagram]After you are done reviewing a difference, click the checkbox on the left side of the difference. SimDiff will fill out the user name of the person who checked off the difference and the date and time it was checked off.
  2. 2 [diagram]You can add a comment if you like.
  3. 3 When you are done you can generate an HTML report. Refer to the next section for instructions.

Generating an HTML Report

This feature is only available in SimDiff Pro

  1. 1 [diagram]Open FileExport HTML Report.
  2. 2 [diagram]Select where you would like to save the HTML report.
  3. 3 [diagram]Select export options, such as whether or not to generate subsystem screenshots.
  4. 4 [diagram]Click OK.

Notes:
—Matlab is not required to generate the HTML report, but generating subsystem screenshots requires MATLAB
—Additional HTML report options, such as a custom header image and custom CSS, can be configured in the SimDiff preferences

Integrating with ClearCase Explorer

  1. 1 Run StartAll ProgramsEnSoftSimDiffClearCase Integration ToolClearCase Integration Tool
  2. 2 [diagram]Select the directory Clearcase is installed in.
  3. 3 [diagram]Select the directory SimDiff is installed in.
  4. 4 [diagram]Click on the Install or Update button.
  5. 5 [diagram]Select the VOB Configuration tab.
  6. 6 [diagram]Select the VOB(s) containing MDL files. Multiple VOBs can be selected by holding the CTRL key while clicking each VOB following the first.
  7. 7 [diagram]Click on the Install/Update on Selected button.

Notes: For more information, refer to the integration tool documentation at StartAll ProgramsEnSoftSimDiffClearCase Integration ToolManual

Integrating with Other Repository Clients

Most repository clients allow you to specify an external tool to diff specific file types. For instructions, please consult your repository client's documentation.

For most clients you will be asked to enter a command to execute. For SimDiff use this command:
C:\Program Files\EnSoft\SimDiff\simdiffgui.exe MDL1 MDL2
(please use the path to your specific SimDiff installation)

Replace MDL1 and MDL2 with the appropriate syntax for your client. For example, for CM Synergy, replace MDL1 and MDL2 with %1 and %2, respectively.

If your repository client adds any invalid characters to the model names that would prevent Simulink from opening them, SimDiff will automatically remove them.

Choosing to show entire added/deleted model hierarchies

SimDiff's default behavior when one element is added/deleted is to only show that element as added/deleted and do not include descendants in the difference list. To change this behavior follow these instructions:

  1. 1 [diagram]Open FilePreferencesDiff.
  2. 2 [diagram]Check off Show elements contained in an added or deleted parent element.
  3. 3 [diagram]Click OK.

Accessing SimDiff from MATLAB

You can now run SimDiff from MATLAB. Type help simdiff in MATLAB for instructions on how to use the API. To use the SimDiff API please follow these instructions:

  1. 1 Please add the SimDiff installation directory on your system path. The installation directory is the directory that contains the simdiff.exe and simdiff gui.exe files.
  2. 2 Please add the SimDiff installation directory on your MATLAB path. Open MATLAB. Click on FileSet Path. Click on Add Folder and add the SimDiff installation directory to the MATLAB path.

Notes:
This feature requires MATLAB

Requesting Support from EnSoft

  1. 1 Send an e-mail to support@ensoftcorp.com.
  2. 2 Please include general questions in the body of your email.
  3. 3 If you experience an error while running SimDiff please include your SimDiff log.
    Open the log by selecting: StartAll ProgramsEnSoftSimDiffSimDiff Log
    Save it to a location of your choice and attach it to your e-mail.

Legal Notice