Configure Automation1 for EtherCAT

Optional Purchase Necessary: This feature is available only if you purchased the Industrial Ethernet (-IE2) license option. Contact your Aerotech sales representative to speak about your licensing needs.

IMPORTANT: EtherCAT is supported only on drive-based controllers.

You can use the Automation1 EtherCAT slave device with any third-party EtherCAT master device. The procedures that follow show how to configure an EtherCAT network when you use Automation1 and TwinCAT3.

Configure EtherCAT Mappings

To enable EtherCAT, you must first specify an EtherCAT mapping on the Automation1 controller. To do this, use the procedure in the drop-down that follows.

TwinCAT Overview

The Windows Control and Automation Technology (TwinCAT) is a real-time automation control software suite and an industry standard for the TwinCAT communication protocol. TwinCAT runs on the Windows operating system and uses Visual Studio for its front-end.

TwinCAT has two packages, the XAE and XAR:

  • eXtended Automation Engineering (XAE): SDK for building and developing TwinCAT applications
  • eXtended Automation Runtime (XAR): Real-time system environment

System Requirements for TwinCAT

Your system must have the specifications that follow to use TwinCAT.

Dedicated Network Adapter

  • EtherCAT must have its own network adapter. It cannot use the same network adapters that are connected to your company network or to the Internet.

  • Most standard Ethernet Network Interface Cards (NICs) are supported. For a full list, go to the Beckhoff Information System site.

Real-Time Performance

  • The PC that runs TwinCAT must not have a real-time operating system such as TenAsys INtime. If your PC needs to run a real-time operating system, you must run TwinCAT on a different PC.

Virtualization Settings

  • TwinCAT must have the VT-x CPU BIOS setting.

  • TwinCAT cannot run in Hyper-V environments.

Visual Studio

  • TwinCAT is built as an extension to Microsoft Visual Studio. To install Visual Studio from Microsoft, go to the Microsoft Visual Studio download page. TwinCAT supports Visual Studio 2013-2019. Aerotech uses Visual Studio 2019.

  • For the installation workload options, select Desktop development with C++. If you are going to use TwinCAT with a language other than English, you must install that language and select it in Visual Studio before you install TwinCAT.

TwinCAT Network Adapter Configuration

The TwinCAT PC must have a dedicated NIC to run the EtherCAT network. This can be an on-board NIC integrated into the PC motherboard or on an expansion card with the PCIe.

To create an EtherCAT network, use an Ethernet cable to connect the Industrial Ethernet RJ-45 port A of the Automation1 controller to the TwinCAT PC NIC. To add devices to the EtherCAT network, connect them to the Industrial Ethernet RJ-45 port B.

Do a Check for Real-time Data Transfer

The procedures that follow include instructions to make sure that Rx and Tx PDO data transfer works correctly.

TwinCAT3 Advanced PLC Example

The procedures that follow show you how to create and run a sample PLC project within TwinCAT3. This sample project uses a PLC function to generate a sawtooth wave from TwinCAT and output it to the first RxPDO real on Automation1.

EtherCAT Distributed Clocks

The EtherCAT slave protocol of the Automation1 controller supports distributed clocks. The procedures that follow show how to configure an EtherCAT network using distributed clocks when you use Automation1 and TwinCAT3. These procedures allow HyperWire communication to be externally synchronized to other devices on the EtherCAT network. This guarantees the round-trip latency between TwinCAT3 and the Automation1 controller.

Configure Automation1 for EtherCAT Distributed Clocks

Open Automation1 Studio and use Machine Setup to configure your controller to use HyperWire communication. Configure HyperWire External Synchronization to use the EthercatSync0 signal and the frequency that you specified when configuring TwinCAT3 to operate using distributed clocks. Refer to Machine Setup for more information.

Troubleshooting EtherCAT Distributed Clocks in Automation1

Automation1 supplies some HyperWire external signal synchronization status items that you can use directly or through Data Collection. All of the HyperWire external synchronization status items are in the System category. You can access the HyperWire external synchronization status items with the StatusGetSystemItem() function. You can add the HyperWire external synchronization status items to Data Collection with the DataCollectionAddSystemSignal() function.

To get status information for HyperWire external synchronization while using EtherCAT distributed clocks, use the status items that follow.

  • HyperWire External Synchronization Active

  • HyperWire External Synchronization Frequency

  • HyperWire External Synchronization Lagging

  • HyperWire External Synchronization Adjustment Nanoseconds

As an alternative to using status items, refer to the HyperWire tab of the Automation1 Status Utility. The HyperWire External Synchronization section shows the information that follows.

Table: HyperWire External Synchronization

HyperWire External Synchronization Item

Description

Configured Signal

Shows the configured external signal with which HyperWire will be synchronized.

Configured Signal Frequency

Shows the configured frequency of the external signal with which HyperWire will be synchronized in Hertz.

Synchronization Active

Shows whether HyperWire is actively synchronized to an external signal.

Detected Signal Frequency

Shows the detected frequency of the HyperWire external synchronization signal in Hertz.

Synchronization Lagging

Shows whether the HyperWire internal synchronization signal is lagging behind the external synchronization signal.

Synchronization Adjustment

Shows the calculated adjustment between the HyperWire internal synchronization signal and the external synchronization signal in nanoseconds.

Troubleshooting on Your Drive-Based Controller

If you are unable to communicate between Automation1 and TwinCAT, confirm the conditions that follow on your Automation1 drive-based controller.

  • The Industrial Ethernet cable from the master is plugged into the EtherCAT Input port.

  • The Automation1 controller has EtherCAT mappings configured and the controller is running through the Status Utility. The Ethernet tab shows the EtherCAT information that follows.

  • EtherCAT Item Description

    EtherCAT Enabled

    Shows if the EtherCAT slave is configured in the aeroscriptmappings file.

    EtherCAT State

    Shows the current state of the EtherCAT slave. The Init, SafeOp, PreOp, and Op states are supported. This item will display “Off” if EtherCAT enabled is False.

    EtherCAT Connection Error

    Shows the active connection error on the EtherCAT slave, if any.

    EtherCAT RxPDO Byte Size

    Displays the current RxPDO size of the EtherCAT slave in bytes.

    EtherCAT TxPDO Byte Size

    Displays the current TxPDO size of the EtherCAT slave in bytes.

Troubleshooting from TwinCAT

From TwinCAT, if the Automation1 device cannot be found, confirm the conditions that follow.

  • The EtherCAT network hardware is properly configured for the EtherCAT master.

  • There is a valid Ethernet connection between the Automation1 controller and the TwinCAT PC.

  • The Automation1 ESI file has been set correctly on the master. See the How to configure Automation1 for TwinCAT section for instructions.

Related Help Pages 

EtherCAT Overview