Command ‘Compare’¶
Symbol:
Function: This command opens the Project compare dialog. In this dialog, you define which reference project CODESYS to compare with the current project, as well as what to take into consideration when comparing.
Call: Menu bar:
.Requirement: A project is open and in online mode or offline mode.
Dialog ‘Project Compare’
Project on disk | Path of the reference project on the file system. |
Project in a source control database | This option is available only if the “CODESYS SourceControl” package is installed. Host: Name of the host where the source code management is located. Port: Number of the port for connecting to the source code management. Location: Path of the reference project. |
Ignore Whitespace | ![]() |
Ignore Comments | ![]() |
Ignore Properties | ![]() |
OK | Starts the project compare and displays the result in the view Project compare - Differences. |
View ‘Project Compare’ - ‘Differences’
This view opens when the comparison has been completed between the current project and a reference project. The
command was executed, the reference project given, and the compare options configured.The view shows the device tree and POUs tree of the compared projects (project compare view). The detected, different objects are color-coded. Depending on the object, an object-specific detailed compare view can be opened there. Objects with differences between their child objects are also identified by their own symbols.
(1) Object tree of the current project
(2) Object tree of the reference project
(3) Accept Block, Accept Single
(4) Compare options from 'Project Compare' dialog
Compare statistics: added, deleted, and changed objects
![]() |
Changes the detailed compare view for the object selected in the tree. Alternative: Double-click the object. |
![]() |
Switch back to the project compare view. |
![]() |
Selects the next bottom object in the device tree where differences were detected. |
![]() |
Selects the next top object in the device tree where differences were detected. |
![]() |
The entire block (object plus all child objects) is accepted in the version for the current project as in the reference project.:sup:1 (selected for acceptance) Repeated clicking of |
![]() |
The object is accepted in the version as in the reference project, for the current project.:sup:1 (selected for acceptance) If the detailed compare view of the affected object is opened after accepting the changes, then you are prompted to accept the changes for that view as well. |
![]() |
Opens the Accept dialog. Requirement: The properties, access rights, or contents of the objects selected in the object tree are different. |
![]() |
Switches between the default display where different units (lines, networks, elements) are displayed in red and another display: The units are displayed as recently added in the open project. In the reference project, they are displayed as deleted. Available within the detailed compare view only. Note: Depending on the display, detected differences in the statistics are counted as changed, inserted, or deleted. |
Black font | Objects are identical. |
Object name with ![]() |
Child objects of the object are different |
Gray highlight | Objects are different. |
Gray highlight + bold blue font | Object is only in the reference project. |
Gray highlight + bold green font | Object is only in the open project (not in reference project). |
Gray highlight + red font + ![]() |
Object has different properties. |
Gray highlight + red font + ![]() |
Access rights of object and reference object are different. |
Gray highlight + bold red font + ![]() |
Implementation of objects is different. Double-click the line to display the object-specific compare view. |
Yellow highlight | Object for acceptance is activated. |
Yellow highlight + ![]() |
Adding the reference object to the open project is activated. |
Yellow highlight + ![]() |
Deleting the object (in the open project) is activated. |
Yellow highlight + ![]() |
Properties of the reference object is activated. |
Yellow highlight + red font + ![]() |
Access rights of the reference object is activated. |
Gray highlight + bold red font + ![]() |
Implementation of the reference object is activated. |
1 Accepting is possible only from the reference project to the open project.
2 A block in the project compare view consists of the selected object and its subordinate units. A block in the detailed compare view consists of the unit where the cursor is located and all corresponding units that have the same difference markers. A unit is a line, network, or element. Subsequent lines of a line are examples of corresponding units.
Compare options | Defined comparison options in the Project compare dialog. |
Compare statistics | Number of additions, deletions, and changes in the current project, as compared to the reference project. Change means differences of an object available in both projects. |
![]() |
Closes the view and a prompt appears with the question: Do you want to save the changes that you made in the comparison view? If you select Yes, then the yellow-highlighted objects are changed in the project and then correspond to the contents of the reference project. |
Dialog ‘Accept’
Access rights | ![]() |
Accept groups | Grouping with access rights accepted by the reference project. A group is accepted if it is present in both projects with different access rights. Example: |
Unaccepted groups (missing in a project) | The group is not accepted if it is not present in one of the two projects. |
Properties |
Requirement: The properties of the reference object and object are different. |
OK | Settings are accepted. |