Comparing Projects

 

Using the 'Project > Compare projects...' command, the project sources of two projects can be compared.

For comparing two projects, it is not necessary to previously compile the projects involved. This way, also projects can be compared which do not compile.

NOTE:

Both projects to be compared must have been edited or at least opened once with EcoStruxure Machine Expert - Safety version 2.0 or later.

This topic contains information on the following:

Compared project parts

The project comparer browses the following project items for differ­ences:

Detected differences are listed in the Project Comparer workspace which opens automatically.

How to compare project sources

As the EcoStruxure Machine Expert - Safety project is part of the related EcoStruxure Machine Expert project, you can select EcoStruxure Machine Expert projects for comparison. The project comparison func­tion compares the safety-related parts contained therein. It is also possible to compare safety-related projects that have been exported from EcoStruxure Machine Expert - Safety.

  1. Open the project to be compared with another project.

    The file extension of EcoStruxure Machine Expert projects is *.project.

    The file extension of safety-related exported projects is *.spa.

  2. Select 'Project > Compare projects...' and choose the project to be compared with the present project.

    You can select either a EcoStruxure Machine Expert project (see note above) or an exported safety-related project (*.spa).

    The comparison is then started automatically.

    If the present project has been modified but not yet saved, you are first asked to save modifications.

    If you do not save these modifications, the project version saved last is compared. The modifications you made, however, are not discarded.

  3. After starting the comparison, the Project Comparer workspace appears displaying the results. (If the Project Comparer workspace is already open showing a previous comparison, its content is updated.)

Project Comparer workspace

The Project Comparer workspace opens automatically after starting the comparison. It is composed of two areas (see example figure at the end of this topic).

The 'Differences' list (lower screen area) displays the detected differ­ences in a grouped way, e.g., by worksheets, code networks, etc. Expanding and collapsing a particular group is done in the usual manner by clicking the '+' or '-' sign at the beginning of the respective entry. To expand/collapse all entries in the list, right-click into the list view and select the 'Expand all' or 'Collapse all' context menu item. Symbols beside the list entries indicate the modification type:

ico_ProjectComparer_New.gif

Added element

ico_ProjectComparer_Updated.gif

Modified/updated element

ico_ProjectComparer_Deleted.gif

Deleted element

ico_ProjectComparer_Moved.gif

Moved element

Comparative code view (upper screen area): Differing worksheets of both projects can be viewed side by side in read-only mode. This is done by clicking on an entry in the 'Difference' list. Differing code-relevant objects (including comments) are highlighted by colored borders and a gray background.

Each modification that affects the resulting application code is consid­ered as code-relevant. Besides inserting, deleting, or modifying code objects, this also includes all modifications that influence the execution order, for example, moving an entire code network.

In contrast, moving single variables, LD objects, or functions/FBs to another worksheet position modifies the visible layout but does not affect the execution order on the Safety Logic Controller. Therefore, such modifications are not considered as code-relevant and are not detected when comparing.

Color

Meaning

Example

Green

Newly inserted objects in the project. Only visible in the left code view.

ProjectCompare_NewVariable.gif

Blue

Modified objects. Visible in both the left and the right code view.

ProjectCompare_ChangedVariable.gif

Red

Deleted objects. Only visible in the right code view.

ProjectCompare_DeletedVariable.gif

Orange

Network which has been moved to another worksheet position. Visible in both the left and the right code view. Observe the explanation regarding "code-relevant modifications" above.

ProjectCompare_MovedNetwork.gif

Functions of the Project Comparer workspace:

Example

ProjectComparerWorkspace.gif