Skip to content

Setup Beckhoff project

UP TwinCAT (Beckhoff) Plugin (optionally: UP TwinCAT (Beckhoff) is part of UP release)

For Beckhoff TwinCAT support install UP and UP TwinCAT (Beckhoff) Plugin:

up-tc-installation

Create initial project

Create initial project with Beckhoff Exchange Assistant at target folder or do it manually

Manual setup initial project

  • Open TwinCAT
  • Create New TwinCAT Project
  • TwinCAT Projects (TwinCAT XAE Project (XML format)
    up-tc-installation
  • Select location and name (not UP model dependent if target folder is linked, do not select "Create directory for solution")

tc-add-plc-project

  • Add New Item at Project / PLC

tc-create-plc-project

  • Empty PLC Project with name from UP Project / config / platformConfig [Beckhoff] / hardwareConfig / name

Create a linked Target Folder (Optionally: if UP is located at host)

tc-link-target-folder

  • Link to TwinCAT Solution folder

tc-add-target-folder

  • Add Target Folder

tc-add-build-config

  • Add BuildConfig UPbuild__Beckhoff to target folder. Consider that target folder must pinned to sub folder of solution project where *.tsproj is placed (required to optionally generate multiple UP PLC projects to one TwinCAT Solution).

Install TwinCAT libraries

UP dependent libraries installation (AEMsgHandler, AEMqttInterface, ...)

  • Run force generate at target folder
  • Execute InstallLibs.bat batch file at target folder (if Eclipse placed at host: execution must be done at virtual machine!)
  • Installation successfully done if window is closed automatically after execution (about 30s for installation required).

Task Definition

  • Open TwinCAT Project

tc-create-plc-tasktc-add-plc-task

  • Add Referenced Task at PLC / Project
  • Set Name for new Task
  • Create New Task
  • Close Dialog with Open

tc-link-plc-task

  • Drag and Drop generated groupX PRG from Programs package to created reference Task
  • Drag and Drop generated INTERCOM PRG from Base/Intercoms package to created reference Task (Program does only exist if an intercom task declared)
  • Drag and Drop generated framework PRG from Programs package to a reference Task (Slowest task time and lowest priority)
  • Do it for each required Task

Isolated Task

tc-isolated-task

Consider that PLC must run on an isolated task at virtual machine.

Git Setup

Git ignore

  • ProjectName.tsproj must be part of git.
  • All TcTTO files at PLC root folder must be part of git (not part of git ignore for future tasks).

Next step