Installation
System requirements
In the following, a distinction is made between the engineering PC and the runtime PC. The following definition is used:
On the Engineering PC, Simulink® models are converted into TwinCAT objects by using the TwinCAT Target for Simulink®. The TwinCAT objects created can be instantiated in TwinCAT projects and thus integrated into the program flow.
Built objects can be easily forwarded TwinCAT objects built on an engineering PC (or Build Server) can be easily forwarded to other people. They only need the TwinCAT XAE development environment in order to use the created objects (TcCOM or PLC function blocks) in a TwinCAT solution. |
The created TwinCAT Solution is then loaded from the engineering PC to a runtime PC in the TwinCAT runtime environment for execution of the project.
Requirements on the engineering PC
- MATLAB® R2019a or higher and at least Simulink® and Simulink® Coder™
- Visual Studio 2017 or higher (Professional, Ultimate or equivalent edition)
- During installation, the option Desktop development with C++ must be selected manually. The option can also be installed later.
- To support the TwinCAT OS (ARMV8-A) platform (for compiling for CX82xx and CX9240), the MSBuild Support for llvm (clang-cl) toolset component is also required. This must also be selected manually.
- TwinCAT 3.1.4024.35 or higher
- TwinCAT Target for Simulink®
- TwinCAT-build 4024: Use the Download Finder on the Beckhoff website and install TwinCAT tools for MATLAB® and Simulink®
- TwinCAT-build 4026: Install the appropriate workload for you (see next paragraph).
On the runtime PC
- Supported operating systems
- Windows Embedded Standard 7, Windows 10, Windows Server (32-bit and 64-bit)
- Beckhoff RT Linux® (only from TwinCAT build 4026)
- TwinCAT/BSD®
- TwinCAT XAR version 3.1.4024.35 or higher
Installation (TwinCAT 3.1 Build 4026)
The TE1400 | TwinCAT 3 Target for Simulink® workload installs all the dependencies required to create TwinCAT objects.
- Install one of the supported Visual Studio versions, if not already installed. Note the installation of the Desktop development with C++ option.
- Install the TwinCAT Package Manager.
- Install the following workload:
- Name in the UI: TE1400 | TwinCAT 3 Target for Simulink®
Command line:tcpkg install TE1400.TargetForSimulink.XAE
- Execute the integration in the Visual Studio that you have installed with the Desktop development with C++ option.
- Start MATLAB® as administrator and execute
C:\Program Files (x86)\Beckhoff\TwinCAT\Functions\TE14xx-ToolsForMatlabAndSimulink\SetupTE14xx.p in MATLAB®.
If you want to create a TwinCAT project and use TwinCAT objects that have already been built, install the following workloads:
- TwinCAT Standard
tcpkg install TwinCAT.Standard.XAE
- TwinCAT Block Diagram Classic
tcpkg install TwinCAT.XAE.BlockDiagramClassic
- In some cases you will also need the following packages:
tcpkg install TwinCAT.XAE.TMX.DataExchange
(see DataExchangeModules)
(for converting ITcVnImage to ARRAY)
tcpkg install TwinCAT.XAE.TMX.MatSimUtilities
Installation (TwinCAT 3.1 Build 4024)
- Install one of the supported Visual Studio versions, if not already installed. Note the installation of the Desktop development with C++ option.
- 1. Start TwinCAT 3 XAE or Full Setup, if it is not already present.
If a Visual Studio and a TwinCAT installation are already present but the Visual Studio version does not meet the requirements mentioned above (e.g. TwinCAT XAE Shell or Visual Studio without C++ option), you need to install a suitable Visual Studio version first (install C++ option, if necessary). Then run TwinCAT 3 setup to integrate TwinCAT 3 into the new (or modified) Visual Studio version. - 2. If you have not yet installed MATLAB® on your system, install it. The order in which MATLAB® has been installed is irrelevant.
- 3. Start TwinCAT Tools for MATLAB® and Simulink® setup to install the TE1400.
- The TE1400 is installed in the TwinCAT folder structure, i.e. it is separate from the MATLAB® installation.
- 4. Start MATLAB® as administrator and run
%TwinCAT3Dir%.. \Functions\TE14xx-ToolsForMatlabAndSimulink\SetupTE14xx.p in MATLAB®.