Project settings

So that a TwinCAT project that is managed using a source code management system can be processed in a team as independently as possible, various settings can be set. These are described below.

Independent Project File

It is possible in TwinCAT to save individual sub-projects, NC axes or IO devices explicitly in separate files. These files then contain all the parameters, etc. of the respective TwinCAT object, so that the complete project file does not have to be "checked out" when making changes to this object. The links of a PLC project, for example, are thus no longer stored in the TwinCAT project file, but in the corresponding XTI file of the PLC project.

So that this function can be used in TwinCAT it must be "globally" enabled once. This is done via the TwinCATXAE Environment - File settings category in the TwinCAT engineering environment options.

Project settings 1:

The "Enable multiple files" option enables the use of this function for new projects. The options below it define the elements in a new project for which this function is switched on by default.

Restart required

Changes to these options only become effective after restarting the development environment!


Use of Independent Project Files in a project

If this option is not activated by default for a TwinCAT object, it can be done manually (or the option can be reset) via the option "Independent Project File" in the context menu of the TwinCAT object.

Project settings 2:

Objects that are saved as Independent Project Files are marked in the TwinCAT tree with the aid of an overlay icon in the form of a small floppy disk. A black floppy disk indicates that there are no unsaved changes yet for this object, whereas this is the case with a red floppy disk.

Project settings 3:

Keep unrestored Links

Unless set differently, TwinCAT tries to avoid unnecessary loads on the project repository by no longer storing information that is no longer required. In association with this, TwinCAT also checks whether links are still valid. Any invalid links found are automatically deleted. This mechanism is obstructive when merging projects, since only the code and the links can be merged, but the updated process image is only available after recompiling the code that has now been merged. It is thus possible for the link information to be newer than the process image and the automatic optimization function would delete all links to the new variables in the process image. With the option "Keep unrestored links", the link information marked for deletion is retained and automatically restored as soon as the variables show up in the process image.

Project settings 4: