Best Practice
Note the following points when using TwinCAT 3.1 in co-operation with Source Control systems:
- Both the TwinCAT project tree view and the PLC project tree view contain TwinCAT objects whose information is stored in separate files, i.e. not directly in the respective project file. These elements are marked by a small floppy disk in the tree icon. Their contents therefore cannot be accessed in the case of merging the respective project file (files with the extensions *.tsproj and *.plcproj). It is therefore only possible, for example, to add a POU to a PLC project, but the changes inside a POU cannot be accessed. The background to this is that the Source Control Clients do not "look inside" the files that they check out for merging and then also automatically load all the dependencies listed inside them from the Source Control System.
- Since TwinCAT objects in the project files are clearly identified with a GUID, it is always necessary to confirm the deletion of an object with a "checkin". For this reason the deletion of an object and the creation of a new object with the same name and the same contents is always a change!
- Some objects in the TwinCAT tree require that they are also loaded in the background in order to display them in the tree. Thus all methods, actions, etc. of a POU are also stored in it. For this reason it is a good idea to close a project in TwinCAT first before fetching it again from the Source Control System.