Coder Social home page Coder Social logo

tcbuild's Introduction

TcBuild

CLI tool for building Beckhoff TwinCAT solutions

Requirements

  • Windows 10 x64 with .NET Framework 4.8 or higher
  • Beckhoff TwinCAT v3.1.4024 or higher, installed stand-alone (integration with Visual Studio is not tested)

Installation

Use TcBuild_Installer.msi to install TcBuild.

Tip: Add the installation folder (e.g. C:\Program Files\Industrial Brains B.V\TcBuild) to the PATH environment variable in order to launch TcBuild.exe from any folder.

Examples

Building a solution

TcBuild build SomeSolution.sln

Feedback from the compiler is shown. The prefix (Info, Warning, Error) shows the build error level.

D:\>TcBuild build SomeSolution.sln
I: generate global initializations ...
I: typify code ...
I: Generate TMC information ...
I: Import symbol information ...
I: generate code initialization ...
I: Size of global data: 12245 bytes
I: Memory area 0 contains  Data, Input, Output, Memory, Code, Persistent Data and Nonsafe Data: size: 1048576 bytes, highest used address: 449584, largest contiguous memory gap: 598992 bytes (57 %)
I: generate code...
I: generate relocations ...
I: Size of generated code: 52912 bytes
I: ------ Build started: Application: SomeSolution.PLC -------
I: Build complete -- 0 errors, 0 warnings : ready for download!
I: Total allocated memory size for code and data: 449584 bytes
I: PLC.SomeLibrary:0 - generate boot information...

Installing a library

TcBuild install Library.sln -x LibraryFoobar -p SomeLibrary

Installs a library into the Library Repository (usually located at D:\TwinCAT\3.1\Components\Plc\Managed Libraries), and saves the library as a .library file.

D:\>TcBuild install Library.sln -x LibraryFoobar -p SomeLibrary
I: generate global initializations ...
I: typify code ...
etc...

Note the 2 additional arguments LibraryFoobar and SomeLibrary. These point to the names of the TwinCAT XAE project and the PLC project containing the library:
Solution Explorer

Help

Use the help function for more information on the available commands and options:

D:\>TcBuild --help
Description:
CLI tool for building Beckhoff TwinCAT solutions

Usage:
TcBuild [command] [options]

Options:
--version       Show version information
-?, -h, --help  Show help and usage information

Commands:
build <file>    Build the solution.
install <file>  Save and install a PLC project in the solution as a library.

This also works for the miscellaneous commands:

D:\>TcBuild install --help
Description:
Save and install a PLC project in the solution as a library.

Usage:
TcBuild install [<file>] [options]

Arguments:
<file>  The TwinCAT solution file (.sln)

Options:
-x, --xaeproject <xaeproject> (REQUIRED)    The XAE project containing the PLC project.
-p, --plcproject <plcproject> (REQUIRED)    The PLC project to be used as a library.
-l, --libraryfile <libraryfile>             The filename of the resulting .library file. Overwrites existing file.
                                            If left empty, the PLC project name is used.
-?, -h, --help                              Show help and usage information

Exit codes

The application exit code (echo %errorlevel%) provides more information on the build result.

Code Description
0 Successful build
1 Successful build, but with compile warnings
2 Build failed due to compile errors
3 Unhandled COM exception (tricky COM issue, try again)
4 Unknown exception
5 Missing file

tcbuild's People

Contributors

justusrijke avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.