Installation

System requirements

In the following, a distinction is made between the engineering PC and the runtime PC. The following definition applies: Simulink® models or MATLAB® functions are converted into TwinCAT objects on the engineering PC by using TwinCAT Target for Simulink® or Target for MATLAB® respectively. 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 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®.
A setup window opens. See the following section.

Initial setup of the software (Common Settings dialog)

Run SetupTE14xx.p

After executing the p-file (see step 4 under Installation), a dialog opens in which you can save general default settings. These settings then apply system-wide, i.e. for all installed MATLAB® versions.

You can make the settings at this time or make/change them at a later time.

Installation 2:

The following setting options are available in the dialog:

These settings influence the hierarchy in which the generated TwinCAT objects are sorted. See diagram below.

There you can see the entries:

Installation 3:

In the described dialog under the Build tab, you can store a default certificate for driver signing. The setup options for driver signing are explained in full in the chapter Setting up driver signing.

Installation 4:

Entering a certificate at this point is optional and not mandatory.

Run SetupTE14xx.p "silent"

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

Change the software setup

To change the default settings of the TwinCAT target, you can access a dialog in the MATLAB® Console as follows:

TwinCAT.ModuleGenerator.Settings.Edit

Here you are offered various entries that you can store as default values.

Installation 5:

Accept changes

1. Enter the new default settings in the dialog box.
2. Confirm with the Save button.
3. Restart MATLAB®.
The changes have been adopted.