Installation

System requirements

In the following, a distinction is made between the engineering PC and the runtime PC. The following definition applies: on the engineering PC, MATLAB® functions are converted to TwinCAT objects by using the Target for MATLAB®. Likewise, a TwinCAT solution can, but does not have to, be created on this PC, which uses the created objects. 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.

On the engineering PC

On the runtime PC

Installation 1:

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.

Installation

Install one of the supported Visual Studio versions, if not already installed. Note the installation of the option Desktop development with C++.
1. Start TwinCAT 3 XAE or Full Setup, if it does not already exist.
If a Visual Studio and a TwinCAT installation already exists but the Visual Studio version does not meet the requirements mentioned above (e.g. TwinCAT XAE Shell or Visual Studio without C++ option), you first have to install a suitable Visual Studio version (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 do not have a MATLAB® installation on your system, install it. The order in which MATLAB® was installed is irrelevant.
3. Start TwinCAT Tools for MATLAB® and Simulink® Setup to install TE1401 TwinCAT Target for MATLAB®.
The TwinCAT Target for MATLAB® is installed within 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®.
A setup window opens. See the following section.

Setting up the software

Version SetupTE14xx.p

After executing the p-file, a dialog opens in which you can save general default settings that will then apply to the system. You can make the settings directly or make/change them at a later time.

Installation 2:

If you want to execute the p-file without this dialog, you can use the following command: SetupTE140x('Silent', true);

Setting options in the dialog are:

VendorName, GroupName (MATLAB®) and GroupName (Simulink®)


These settings influence the hierarchy in which the generated TwinCAT objects are sorted. See diagram below. Here the entries VendorName "TE140x Module Vendor" and GroupName "TE140x|MATLAB Modules" are for MATLAB® and "TE140x|Simulink Modules" for Simulink®.

Installation 3:

To change the default settings, you can access the dialog with TwinCAT.ModuleGenerator.Settings.Edit in the MATLAB® Console. Here you are also offered additional entries that you can store as default.