TwinCAT3 project comparison window

A distinction is made in the comparison window of the TwinCAT3 project between logical (content) and formal changes. In the case of logical changes, the name of the item is displayed in red. These are changes that relate to the behavior of the machine/plant. Formal changes are indicated by a vertical red bar in front of the item name. These are changes that are important for the project handling, but have no meaning for the project in terms of content. One example of formal changes is the LineIDs. These are required to assign code lines within a POU to binary code positions of the generated runtime module. They are required to display breakpoints set in a POU in the right positions, even after code changes that do not require recompilation (e.g. comment lines or empty lines). Formal changes cannot be displayed in the PLC comparison windows; therefore, they have to be compared (if need be) in the XML comparison windows.

Toolbar in the comparison editor of the TwinCAT3 project:

TwinCAT3 project comparison window 1:

Additions

Number of newly added elements.

Deletions

Number of elements to be deleted.

Logical

Number of content changes (only in the TwinCAT3 project comparison window).

Formal

Number of formal changes (only in the TwinCAT3 project comparison window).

 

TwinCAT3 project comparison window 2:

Shows the direction in which merging takes place.

 

TwinCAT3 project comparison window 3:

Search box for searching for components/entries.
Available in the comparison editors of the TwinCAT3 project and the XML comparison.

TwinCAT3 project comparison window 4:

Jump to the next change.

TwinCAT3 project comparison window 5:

Jump to the previous change.

TwinCAT3 project comparison window 6:

Accept selected change.

TwinCAT3 project comparison window 7:

Accept all changes.

Context menu in the comparison window of the TwinCAT tree:

Context menu on a free area in the comparison editor of the TwinCAT project

TwinCAT3 project comparison window 8:

Hide Items

Opens the submenu Hide Items.

Hide Items -> None

Selection: Do not hide any items.

Hide Items -> Hide equal items

Selection: Hide equal items.

Hide Items -> Hide equal items + formal Changes

Selection: Hide equal items and items with only formal changes.

Show Plc Folders

Selection: Show PLC folders.

With the help of the option Show Plc Folders, you can set whether the POUs are to be compared in the existing folder structure of the PLC or in an alphabetically sorted flat list. The comparison using the folder structure thus displays a change for POUs that are identical in terms of content and form, even if they are located in different folders of the PLC.

Since these POUs are not "opposite" one another in the comparison windows, they are not compared in terms of content, but displayed as Addition and Deletion at the respective points. The content comparison can be initiated with the option Compare To… (see TwinCAT3 project comparison window). However, since this assignment has to take place manually for every POU pair located in different places within the PLC folder structure, the comparison can also be initiated in a flat, alphabetically sorted list by deactivating the option Show Plc Folders. In order to merge all changes (content, formal and structural) it may therefore be useful to compare a project with the option Show Plc Folders switched on and also with it switched off.

TwinCAT3 project comparison window 9:

Changes when switching over the option Show Plc Folders are not recognized without a Reload

Since the displayed status information and thus the determined changes relate to the last successful comparison, it is necessary to reload the project after switching over the option Show Plc Folders. Otherwise a POU that has remained the same both content-wise and formally will nevertheless be recognized as changed if it is contained in two different folders.

Context menu at a node in the TwinCAT project tree

TwinCAT3 project comparison window 10:

Compare To…

Manual assignment to an object to be compared.

Compare in Xml-Diff

Comparison using the XML comparison.

If objects or sub-projects are renamed in the course of the project, they are displayed in the TcProjectCompare as Addition or Deletion respectively. A content or formal comparison does not take place. In order to be able to compare these objects or sub-projects with each other despite that, it is possible to force a manual assignment/manual comparison with the option Compare To….