Category:EtherCAT:ECAT GENERAL GUIDE
Category:EtherCAT:ECAT GENERAL GUIDE EtherCAT - General Guide
The front page is EtherCAT
Contents
Introduction
From Wikipedia:
"EtherCAT - Ethernet for Control Automation Technology - is an Ethernet-based fieldbus system, invented by Beckhoff Automation. The protocol is standardized in IEC 61158 and is suitable for both hard and soft real-time requirements in automation technology.
The goal during development of EtherCAT was to apply Ethernet for automation applications requiring short data update times (also called cycle times; ≤ 100 µs) with low communication jitter (for precise synchronization purposes; ≤ 1 µs) and reduced hardware costs."
http://en.wikipedia.org/wiki/EtherCAT
softMC's current main fieldbus is EtherCAT and this guide will help you to better understand and setup the system.
A part of softMC is a software entity called "EtherCAT Master". The ECat master is a part of the Linux kernel and it works in parallel to the Real-Time Motion task of the softMC.
Connecting the softMC to ECat slaves ins't enough to create motion. A few actions must be carried out in order to setup the real-time communication that allows motion.
The entire EtherCAT configuration and setup process is performed by EC_SETUP.PRG.
EtherCAT slaves and EtherCAT modes
Communication with an ECat slave can be done via SDO or via PDO. When a slave is powered up it automatically gets into ECat mode "INIT". If the slave senses that an ECat master is connected to the physical topology it automatically gets into ECat mode "PREOP". In this mode the ECat master can communicate with the slave, query some basic data that will later be used to setup the real-time communication, and allow the user to communicate with the slave via SDO. SDO communication isn't real-time. It is useful to gather data and configure the slave before starting the real-time communication. To use SDO communication please refer to:
From the ControlStudio's terminal the user can learn about the state of the ECat master and what slaves are found by the ECat master on the physical topology:
Usually an ECat slave has many SDO objects that can be read or written.
When the real-time communication is initiated the ECat master asks the slaves to rise to Ethercat mode "SAFEOP". In this mode the clocks of the slaves
and the master are synchronized. This process may take up to a 30 seconds and it depends on the number of slaves in the topology. Once the clocks are synchronized the ECat master asks the slaves to change mode to "OP" and real-time communication is established.
We call this process "Start Master".
Real-Time Communication and PDOs
Once the ECat master is started, the clocks are in sync and all the slaves are in "OP" mode, data is flowing back and forth between the ECat master and the slaves. A round trip is completed within a deterministic cycle time that is chosen by the user. At the moment softMC supports cycle times of: 4000us, 2000us, 1000us, 500us, 250us. Please refer to:
A limited amount of data can be exchanged each cycle between the ECat master and slaves. This data is mapped to "PDOs". Each slave has a fixed and limited list of objects that are mapped to PDOs. Some PDOs are sent from the slave to the master (Tx PDOs) and some are sent from the master to the slave (Rx PDOs).
From the Linux terminal it is possible to list the available PDOs in each slave. Do the following:
1. Connect to the softMC using ssh or serial console.
2. In the Linux terminal type:
-bash-3.2$ ethercat pdos .... ....
Creating Motion
Most ECat slaves are motion drives. In order to create real-time communication that allows motion only a few objects are required. CANopen DS 402 standard defines their addresses:
From ECat master to slave:
Control word - 0x6040 0x0
Position command - 0x607a 0x0
From slave to ECat master:
Status word - 0x6041 0x0
Position feedback - 0x6064 0x0
The ECat slave must have these four objects mapped to a PDO in order to allow motion.
Drive Address
Example
See Also
- Setup EtherCAT - How to setup EtherCAT
This category currently contains no pages or media.