Table of Contents

IDE settings

When implementing your own code with the Zeugwerk Framework, these TwinCAT IDE settings help with version control, merging, and consistency. Some are recommended (they simplify workflow and match the framework’s style); others are recommended for CI or when collaborating so that diffs stay clean (e.g. LineID tags, ProjectVersion attributes, method sorting).

Global settings

Select ToolsOptions and adjust the following in TwinCAT Options:

  • PLC environment
    • Smart Coding: uncheck Declare unknown variables automatically (AutoDeclare) (recommended)
    • Smart Coding: check Insert with namespace (recommended)
    • Text editor: Tab width and Indent width of 2 (recommended)
    • Text editor: uncheck Keep Tabs (recommended)
    • Write options: Set Separate LineIDs to True (recommended for consistency and CI)
    • Write options: Set Sort by name to True (recommended for consistency and CI)
  • XAE Environment
    • General: Set Confirm Drag and Drop Operations to True (recommended)
    • File settings: Set Enable Multiple Project Files to True (recommended if your project layout is affected)
    • File settings: Set IO Devices to True (recommended if your project layout is affected)

Project Settings

There are some settings which have to be done in every PLC-project to avoid problems if someone opens your project with a different TwinCAT version then yours.

  • Open the solution and open the PLC node
  • Then right click on the PLC and then select properties
  • Navigate to Advanced
  • Uncheck Write product version in files (recommended for version control)