Skip to main content

Creating Comparison Views

Requirement: You have made changes in your current project and want to compare it, for example, with the last saved version. In the meantime, you have, for example, added more POUs, removed a POU, changed some lines of code in POUs, or the object properties.

  1. Click Project → Compare

    The Project Comparison dialog opens.

  2. Specify the path of the reference project, for example, the path of the last saved version of your current project.

  3. Leave the Ignore Whitespace comparison option enabled.

  4. Click OK.

    CODESYS opens the comparison view.

    Title: Project Comparison – Differences

    The device trees of the current project and the reference project are compared and the changed objects are highlighted in color.

  5. In the reference project tree (right), select an object highlighted in blue. This object is no longer included in the current project.

    Click _icon_accept_single.pngAccept Single.

    CODESYS adds the object in the tree of the current project (left). The line is highlighted in yellow. The _icon_project_comp_unit_added.png symbol is displayed in the middle column.

  6. In the current project tree (left), select an object highlighted in green. This object is not included in the reference project.

    Click _icon_accept_single.pngAccept Single.

    CODESYS removes the object from the tree of the current project again (left). The line is highlighted in yellow. The _icon_project_comp_unit_deleted.png symbol is displayed in the middle column.

  7. If CODESYS has detected changes in the contents for an object which is included in the current project and in the reference project, then this is indicated by red text. Then you can double-click the object to switch to the detailed comparison view of the object.

  8. Close the comparison view and answer Yes to the question whether the changes made should be saved.

    The changes will take effect in the project.

For more information, see: Opening the Detailed Comparison View