Installing TwinCAT
TwinCAT is the only official way to use EtherCAT on a PC, and it is Windows-only software that makes Windows real-time capable. When using TwinCATLink, TwinCAT must be set up in advance using the following steps.
TwinCAT requires a specific network controller. Check the list of supported network controllers.
Network controllers other than those in the list may also work, but in that case correct operation and real-time performance are not guaranteed.
Installing TwinCAT
Section titled “Installing TwinCAT”Refer to the official site and install the TwinCAT Package Manager. Installing and obtaining packages requires registration of a free myBeckhoff account.
The first time the Package Manager launches, the following initial configuration is required.
- Registering a feed
- Press “Add new feed” and add a feed whose URL ends with
/stable. - Enter the myBeckhoff account credentials and save with “Save”.
- Press “Add new feed” and add a feed whose URL ends with
- Selecting the integration Select the 64-bit version of the TwinCAT XAE Shell. Integration with Visual Studio is not needed.
Once the initial configuration is complete, install “TwinCAT Standard” (both Engineering/Runtime) from the workload list.
Obtaining autd3-console
Section titled “Obtaining autd3-console”The GUI tool autd3-console is used to set up TwinCAT.
Obtain it as described in Console, launch it, and open the “TwinCAT” tab at the top.
Initial Setup
Section titled “Initial Setup”The following three items are required only once per environment.
Disabling Virtualization-Based Security
Section titled “Disabling Virtualization-Based Security”TwinCAT does not work when virtualization-based security features are enabled.
Whether it is disabled can be diagnosed by selecting “Doctor” in the “TwinCAT” tab of autd3-console and pressing “Run”.
If it is not disabled, the steps to disable it are displayed.
Installing the ESI for AUTD3
Section titled “Installing the ESI for AUTD3”To have AUTD3 recognized, the AUTD3 ESI file (AUTD.xml) must be placed into TwinCAT.
Select “Install ESI” in the “TwinCAT” tab and press “Run”.
This copies AUTD.xml to the TwinCAT ESI directory (<TwinCAT install dir>/TwinCAT/3.1/Config/Io/EtherCAT/).
Installing the Real-Time Ethernet Driver
Section titled “Installing the Real-Time Ethernet Driver”Install the real-time Ethernet driver on the network adapter to be used.
Open the TwinCAT XAE Shell and open “TwinCAT” → “Show Realtime Ethernet Compatible Devices” from the top menu. Select the supported device under “Compatible devices” and click “Install”. Success is indicated when the installed adapter appears under “Installed and ready to use devices (realtime capable)”.
Building a TwinCAT Project
Section titled “Building a TwinCAT Project”With AUTD3 connected to the PC and the AUTD3 power on, select “Run” in the “TwinCAT” tab. Set the following parameters as needed, and press “Run” to scan the devices and configure the TwinCAT project.
| Item | Description | Default |
|---|---|---|
| Client IP | The client’s IP address. Can be empty for local. | Empty |
| Device name | The Ethernet device name to use. Empty uses the first found device. | Empty |
| Sync0 (x500us) | Sync0 cycle time (in units of 500 µs). | 2 (= 1 ms) |
| Task (x base time) | Task cycle time (in units of base time). | 1 |
| Base time | CPU base time. | 1 ms |
| Keep XAE Shell open | Whether to keep the XAE Shell open. | On |
To simply reopen a project that has already been configured, open it from “Open”.
License
Section titled “License”If a license-related error appears, configure the license.
If you do not have a license, you can issue a 7-day trial license. In the XAE Shell, open “Solution Explorer” → “SYSTEM” → “License”, click “7 Days Trial License …”, and enter the characters shown on the screen. After configuring, close the XAE Shell and run again.
Troubleshooting
Section titled “Troubleshooting”Attempting to use a large number of devices may cause TwinCAT to raise an error.
In this case, increase the Sync0 / Task values in the “Run” form and rerun.
The appropriate values depend on the number of connected devices.
The smallest values that do not produce an error are preferable.