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.
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:
Click on a difference in the center panel. Attribute changes for the selected difference appear in the lower mid panel.Instructions Regular
Screen Elements Blue Italic
Menus Menu ▷Menu Item
Select the first model to compare.
Select the second model to compare.
Click on the Diff button.
Click on a difference on in the center panel. Attribute changes for the selected difference appear in the lower mid panel.
Click on the View Difference button to view the difference highlighted within Simulink/Stateflow.Notes: If you see this 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.
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:
Open File ▷Preferences ▷MATLAB.
Use the Autodetect button to have SimDiff automatically search for MATLAB installations, or use the Add button to browse and add installations manually.
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
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
Click on one of the colored squares:
Pick the color you want.
Click on the Diff button.Notes:
—Changing Flashing Color does not require that you click on Diff—it is immediately applied.
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:
Check-off Inline under the Library Links section.
Click Directories to open the Library Directories dialog.
Add library directories using
. Directories may be specific to the first or second model, or common to both.
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.
Your models may use base MATLAB workspace variables during simulation. If you want SimDiff to compare workspace variables follow these instructions:
Open File ▷Preferences ▷ Diff.
Check off Base (MATLAB) Workspace.
[Optional] Specify .m setup script files to perform workspace initialization, such as setting the MATLAB path, before loading the model.
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.
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.
Open File ▷Preferences ▷View.
Click Set Window Positions.
Place the windows where you want them.![[diagram]](images/set_window_positions_ok.png)
Click OK. Click OK. Next time you click Diff the windows will appear in their new positions.SimDiff allows subsystems of models to be diffed, while ignoring the rest of the model.
Select the first model to compare.
Click Select to open the Available Subsystems dialog.
Select the subsystem to diff from the tree.
Click OK.
Click on the Diff button.Notes: To clear a subsystem selection, click the
next to the subsystem name.
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.
Select the node in the model hierarchy tree. The difference list is updated to show only differences in that subsystem.
Choose the option "Show difference in selected subsystem only" or "Show all differences under selected subsystem" to see the elements under that node.
Click on the "Choose columns" button to choose the columns you want to be displayed.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.
Open the Attributes Filter Editor dialog.
If the element is a Stateflow element, switch to the Stateflow tab.
Select the block or line type in the left column. Attributes for that type are displayed on the right.
Select the attribute name in the right column.
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.
This feature is only available in SimDiff Pro
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.
You can add a comment if you like.This feature is only available in SimDiff Pro
Open File ▷Export HTML Report.
Select where you would like to save the HTML report.
Select export options, such as whether or not to generate subsystem screenshots.
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
Select the directory Clearcase is installed in.
Select the directory SimDiff is installed in.
Click on the Install or Update button.
Select the VOB Configuration tab.
Select the VOB(s) containing MDL files. Multiple VOBs can be selected by holding the CTRL key while clicking each VOB following the first.
Click on the Install/Update on Selected button.Notes: For more information, refer to the integration tool documentation at Start ▷All Programs ▷EnSoft ▷SimDiff ▷ClearCase Integration Tool ▷Manual
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.
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:
Open File ▷Preferences ▷Diff.
Check off Show elements contained in an added or deleted parent element.
Click OK.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:
Notes:
—This feature requires MATLAB
SimDiff 3.0 User Manual
Copyright© 2010 EnSoft Corp. All Rights Under the copyright laws, this manual may not be copied, reproduced, or redistributed, in whole or part, without the written consent of EnSoft. Your rights to the software are governed by the accompanying end user license agreement. Every effort has been made to ensure that the information in this manual is accurate. EnSoft is not responsible for printing or clerical errors.
EnSoft Corp.
2501 North Loop Drive, Suite 1800
Ames, IA 50010 USA
Phone: +1-515-296-3253
Email: contactus@ensoftcorp.com
All other company and product names mentioned in this document are trademarks of their respective companies. Mention of third-party products is for informational purposes only and constitutes neither an endorsement nor a recommendation. EnSoft assumes no responsibility with regard to the performance or use of these products.