2014年6月5日 星期四

Ethercat 串列式伺服控制技術

                                                        2014/7/4  update!!!
EtherCAT(乙太網控制自動化技術[1])是一個開放架構,以乙太網為基礎的現場總線系統Ethernet-based fieldbus system),其名稱的CAT為控制自動化技術(Control Automation Technology)字首的縮寫。EtherCAT是確定性的工業以太網,最早是由德國的Beckhoff公司所研發[2]( synchronization purposes)。
自動化對通訊一般會要求較短的資料更新時間(或稱為週期時間)、資料同步時的通訊抖動量低,而且硬體的成本要低,EtherCAT開發的目的就是讓乙太網(Ethernat)可以運用在自動化應用中

機能原理
一般工業通訊的網路各節點傳送的資料長度不長,多半都比乙太網幀的最小長度要小。而每個節點每次更新資料都要送出一個幀,造成頻寬的低利用率,網路的整體性能也隨之下降。EtherCAT利用一種稱為「飛速傳輸」(processing on the fly)的技術改善以上的問題[3]

在EtherCAT網路中,當資料通過EtherCAT節點時,節點會複製資料,再傳送到下一個節點,同時識別對應此節點的資料,則會進行對應的處理,若節點需要送出資料,也會在傳送到下一個節點的資料中插入要送出的資料[2] 。每個節點接收及傳送資料的時間少於1微秒,一般而言只用一個的資料就可以供所有的網路上的節點傳送及接收資料。此處有EtherCAT網路傳送原理的動畫。


通訊協定
EtherCAT通訊協定是針對程序資料而進行優化,利用標準的IEEE 802.3以太網幀傳遞,Ethertype為0x88a4。其資料順序和網站上設備的實體順序無關,定址順序也沒有限制。主站可以和從站進行廣播多播等通訊。若需要IP路由,EtherCAT通訊協定可以放入UDP/IP資料包中。

性能
EtherCAT的週期時間短,是因從站(Slave)的微處理器不需處理乙太網的封包。所有程序資料都是由從站控制器的硬體來處理。此特性再配合EtherCAT的機能原理,使得EtherCAT可以成為高性能的分散式I/O系統:包含一千個分散式數位輸入/輸出的程序資料交換只需30us[2],相當於在100Mbit/s的乙太網傳輸125個位元組的資料讀寫一百個伺服軸的系統可以以10 kHz的速率更新,一般的更新速率約為1–30 kHz,但也可以使用較低的更新速率,以避免太頻繁的直接記憶體存取(DMA)影響主站個人電腦的運作。

拓撲
EtherCAT使用全雙工的以太網實體層,從站可能有二個或二個以上的埠。若設備沒偵測到其下游有其他設備,從站的控制器會自動關閉對應的埠並回傳以太網幀。由於上述的特性,EtherCAT幾乎支援所有的網路拓撲,包括總線式、樹狀或是星狀,現場總線常用的總線式拓撲也可以用在以太網中。

EtherCAT的拓撲可以用網路線、分枝或是短線(stub)作任意的組合。有三個或三個以上以太網介面的設備就可以當作分接器,不一定一定要用網路交換器(Ether-Switch)。 由於使用100BASE-TX的以太網物理層,二個設備之間的距離可以到100公尺,一個EtherCAT區段的網路最多可以有65535個設備。若EtherCAT網路是使用環狀拓撲(主站設備需要有二個通訊埠),則此網路還有纜線冗餘的機能。

同步
為了系統的同步,EtherCAT協定中有提供分散式時鐘機制,即使通訊循環週期有抖動,時鐘的抖動遠小於1µs,大約接近IEEE 1588精密時間協議的標準。因此EtherCAT的主站(Master)設備不需針對時鐘使用特殊的硬體,可以用軟體實現在任何標準的的乙太網MAC,即使沒有特殊的通訊協處理器也沒有關係。

標準建立分散式時鐘的程序是由主站送出一特定位址的廣播訊息給所有從站來啟動。若使用環狀拓撲,所有從站會在收到訊息時閂鎖內部時鐘,當訊息回來時會再閂鎖內部時鐘一次。主站會讀所有從站閂鎖的值,計算各個從站的延遲。為了消除抖動的影響及求得平均值,主站會儘可能的多次進行上述的程序。所有的從站延遲會依各從站在從站環狀拓撲的位置來計算,並記錄在一個偏移暫存器中。最後主站送出一個讀寫系統時鐘的廣播訊息,會使第一個從站的時鐘為參考時鐘,其他從站的內部時鐘會調整到和第一個從站相同。

為了在初始化後保持時鐘的同步,主站或從站需定期的再送出廣播訊號,以計算各個從站內部時鐘的速度差異,若有需要時,從站需要可以調整自身時鐘的速度,或是有其他調整時鐘的機制。

系統時鐘是一個64位元的計時器,計數內容是從2000年1月1日0點0分開始所經過的時間,單位是奈秒(ns)。

設備行規
設備行規(device profile)描述應用需要的參數及設備的機能特性,包括可能依設備種類而不同的狀態機。總線技術中已有許多可靠的設備行規,例如I/O設備、驅動器或閥等設備。EtherCAT同時支援CANopen設備行規及Sercos驅動器行規。從CANopen或Sercos移植到EtherCAT時,在應用觀點看到的內容是一様的,也可方便使用者或設備製造商的轉換。

機能安全
EtherCAT有一個加強的協定版本,稱為Safety over EtherCAT,可以在同一個網路上進行機能安全相關的通訊和一般的控制通訊。此安全通訊是以EtherCAT的應用層為基礎,不會影響底層的通訊協定[4]。Safety over EtherCAT有通過IEC 61508的認證,符合安全完整性等級(SIL)3的要求。自2005年起已有使用Safety over EtherCAT的產品上市。

實現
EtherCAT主站可以用軟體,在標準的乙太網媒體接入控制器中實現。許多供應商有提供在不同作業系統下的程式碼,也有許多開源軟體或共享軟體。EtherCAT從站需要特殊的EtherCAT從站控制器,才能實現飛速傳輸(processing on the fly)的技術EtherCAT從站控制器可以用FPGA來實現,且已有現成的代碼,此控制器也可以用ASIC來實現。

參考資料

^ 自動化在線 EtherCAT簡介
^ 2.0 2.1 2.2 cechina EtherCAT 原理介紹
^ ethercat.org EtherCAT簡介
^ The safety solution for EtherCAT
其他參考資料[編輯]
Büttner, H.; Janssen, D.; Rostan, M., EtherCAT - the Ethernet fieldbus, (PDF), PC Control Magazine. 2003, 3: 14–19
Janssen, D.; Büttner, H., Real-time Ethernet: the EtherCAT solution, , Computing & Control Engineering Journal. 2004, 15: 16–21
Rostan, M., High Speed Industrial Ethernet for Semiconductor Equipment, SEMI Technical Symposium: Innovations in Semiconductor Manufacturing (PDF), San Francisco, CA, USA: SEMI. 2004
Potra, S.; Sebestyen, G., EtherCAT Protocol Implementation Issues on an Embedded Linux Platform, IEEE-TTTC International Conference on Automation, Quality and Testing, Robotics AQTR 2006, Cluj-Napora, Romania: IEEE. 2006: 420–425
Robertz, S. G.; Nilsson, K.; Henriksson, R.; Blomdell, A., Industrial robot motion control with real-time Java and EtherCAT, 12th IEEE International Conference on Emerging Technologies and Factory Automation, Patras, Greece: IEEE. 2007
Beckmann, G.; Sachs, J., The safety solution for EtherCAT, (PDF), PC Control Magazine. 2007, 1: 22–27
Cena, Gianluca; Cibrario Bertolotti, Ivan; Scanzio, Stefano; Valenzano, Adriano; Zunino, Claudio, On the accuracy of the distributed clock mechanism in EtherCAT, Factory Communication Systems (WFCS), 2010 8th IEEE International Workshop on, Nancy, France: IEEE. 2010: 43–52,doi:10.1109/WFCS.2010.5548638
外部連結[編輯]
EtherCAT Technology Group
EtherCAT Technology Group China


Others Link :
 Ethercat 串列式伺服控制技術動畫
http://www.ethercat.org/en/video_tech.html

串列式數位伺服運動控制及工業控制自動化乙太網路技術簡介
http://www.epcio.com.tw/paper/串列式數位伺服運動控制及工業控制自動化乙太網路技術簡介.pdf

串列式數位伺服運動控制
http://www.automan.tw/mag_images/book/313--01.pdf

串列式數位伺服運動控制及工業控制自動化乙太網路技術
http://eshare.stust.edu.tw/EshareFile/2013_5/2013_5_7bbf4726.pptx

EtherCAT ASICs

ET1100, ET1200 | EtherCAT ASICs

The ET1100 and ET1200 EtherCAT ASICs offer a cost-effective and compact solution for realising EtherCAT slaves. They process the EtherCAT protocol in the hardware and therefore ensure high-performance and real-time capability, independent of any downstream slave microcontrollers and associated software. Through their three process data interfaces – digital I/O, SPI and 8/16 bit µC (not for ET1200) – the EtherCAT ASICs enable realisation of simple digital modules without microcontrollers and development of intelligent devices with own processor. Both ASICs feature distributed clocks that enable high-precision synchronisation (<< 1 µs) of the EtherCAT slaves. The supply voltage is 3.3 V or 5 V; the core voltage of 2.5 V is generated by the integrated in-phase regulator or can be supplied directly. The ET1100 is suitable as a universal solution for all types of EtherCAT devices; the ET1200 is optimised for modular devices using E-bus/LVDS (Low Voltage Differential Signalling) as internal interface. Due to their compact design and small number of external components, both ASICs only require minimum space on the board.
The ET1100 ASIC housing (BGA128) only measures 10 x 10 mm. The chip can support up to four EtherCAT ports. The 8 kB internal memory (DPRAM) for access to process and parameter data is optionally addressed via parallel or serial data bus. Alternatively, the ASICs can also be used without controller. In this case up to 32 digital signals can be connected directly.
The ET1200 ASIC is the “small” variant of the ET1100; with its QFN48 housing measuring only 7 x 7 mm, the chip is even more compact. The device offers 16 digital I/O interfaces and distributed clock hardware for high-precision synchronisation. The 1 kB internal DPRAM is addressed via a fast (20 Mbit/s) serial interface. The “small ASIC” offers up to three EtherCAT ports, one of which can be used as MII for connecting a standard PHY. The other ports are used for LVDS, which makes the ET1200 the right choice for modular devices using LVDS as internal bus physics.
Technical dataET1100ET1200
Number of EtherCAT ports4 (max. 4 x MII)3 (max. 1 x MII)
FMMUs83
SYNC manager84
DPRAM8 kbyte1 kbyte
Distributed clocksyes (64 bit)
Process data interfaces32 bit digital I/O
SPI
8/16 bit µC
16 bit digital I/O
SPI
HousingBGA128, 10 x 10 mmQFN48, 7 x 7 mm

ET1810, ET1811 | EtherCAT IP core for Altera® FPGAs

ET1810, ET1811 | EtherCAT IP core for Altera® FPGAs

The ET1811 quantity-based licence for Altera® FPGAs offers manufacturers of small lots and development service providers the possibility of entering the world of EtherCAT development with low initial investment. For the development of an EtherCAT device, the ET1811 one-time kick-off charge is required, plus the ET1811-1000 royalty for 1,000 devices. The royalties for 1,000 devices must be paid in advance each time.
For development service providers only the ET1811 one-time kick-off charge will be required; the ET1811-0030 system integrator OEM licence will be required for each customer implementation. The end customer will be required to pay the royalty licence (ET1811-1000).


Configurable featuresET1810, ET1811, ET1812
PHY interface1…3 ports MII, 1…3 ports RGMII or 1…2 ports RMII
FMMUs0…8
SYNC manager0…8
DPRAM0…60 KB
Distributed clocks0…2 SYNC outputs, 0…2 latch inputs (32/64 bit)
Process data interfaces32 bit digital I/O, SPI, 8/16 bit asynchronous µC interface, Avalon interface, AMBA AXI3 interface, 64 bit general via the Avalon® or AXI®, 64 bit general purpose I/O
Ordering information
Node-locked buy out licence
ET1810Node-locked licence for using the EtherCAT IP core on one workstation. The licence includes 1 year of maintenance and updates.
ET1810-0010Extension of the node-locked Altera licence (ET1810) for one additional workstation
ET1810-0020One-year maintenance extension for node-locked licence (ET1810)
Node-locked quantity-based licence
ET1811One-time kick-off charge for the node-locked quantity-based licence for using the freely configurable EtherCAT IP cores on one workstation
ET1811-1000Royalty for 1,000 devices, ET1811 required
ET1811-0020One-year maintenance extension, ET1811 required
ET1811-0030System integrator OEM licence
Floating buy out licence
ET1812Floating buy out licence for Altera FPGAs
ET1812-0010Extension of the floating licence (ET1812) for one additional workstation
ET1812-0020One-year maintenance extension for floating licence (ET1812)
Evaluation licence (Open Core Plus IP)
Full-featured, time-limited version available. Please contact us.

ET1815, ET1816 | EtherCAT IP core for Xilinx® FPGAs

The EtherCAT IP core enables the EtherCAT communication function and application-specific functions to be implemented on an FPGA (Field Programmable Gate Array – i.e. a device containing programmable logical components). The EtherCAT functionality is freely configurable. The IP core can be combined with own FPGA designs, and it can be integrated in System-on-Chips (SoCs) with soft core processors or hard processing systems via the PLB™ or AMBA®AXI™ interfaces. The physical interfaces and internal functions, such as the number of FMMUs and SYNC managers, the size of the DPRAM, etc., are adjustable. The process data interface (PDI) and the distributed clocks are also configurable. The functions are compatible with the EtherCAT specification and the EtherCAT ASICs (ET1100, ET1200).
The ET1816 quantity-based licence offers manufacturers of small lots and development service providers the possibility of entering the world of EtherCAT development with low initial investment. For the development of an EtherCAT device, the ET1816 one-time kick-off charge is required, plus ET1816-1000 royalty for 1,000 devices. The royalties for 1,000 devices must be paid in advance each time.
Development service providers only require ET1816 one-time kick-off charge; the ET1811-0030 system integrator OEM licence is required for each customer implementation. The end customer requires the royalty licence (ET1816-1000).
Configurable featuresET1815, ET1816
PHY interface1…3 ports MII, 1…3 ports RGMII or 1…2 ports RMII
FMMUs0…8
SYNC manager0…8
DPRAM0…60 KB
Distributed clocks0…2 SYNC outputs, 0…2 latch inputs (32/64 bit)
Process data interfaces32 bit digital I/O, SPI, 8/16 bit asynchronous µC interface, PLB v4.6 interface, AMBA AXI4/AXI4 LITE interface, 64 bit general purpose I/O
Ordering information
Node-locked buy out licence
ET1815Node-locked licence for using the EtherCAT IP core on one workstation. The licence includes 1 year of maintenance and updates.
ET1815-0010Extension of the node-locked Xilinx licence (ET1815) for one additional workstation
ET1815-0020One-year maintenance extension for node-locked licence (ET1815)
Node-locked quantity-based licence
ET1816One-time kick-off charge for the node-locked quantity-based licence for using the freely configurable EtherCAT IP cores on one workstation; target hardware: selected Xilinx devices
ET1816-1000Royalty for 1,000 devices, ET1816 required
ET1816-0020One-year maintenance extension, ET1816 required
ET1811-0030System integrator OEM licence
Evaluation licence
Full-featured, time-limited version available. Please contact us.

FB1111 | EtherCAT piggyback controller boards







The FB1111 EtherCAT piggyback controller board offers complete EtherCAT connection based on the ET1100 EtherCAT ASIC. All variants of the FB1111 have the same form factor and can be used with the EtherCAT evaluation kit. They can be integrated as EtherCAT interfaces in devices.
Ordering information
FB1111-0140EtherCAT piggyback controller board with ET1100 and µC interface; can be integrated as EtherCAT interface in devices.
FB1111-0141EtherCAT piggyback controller board with ET1100 and SPI interface; can be integrated as EtherCAT interface in devices.
FB1111-0142EtherCAT piggyback controller board with ET1100 and digital I/O interface; can be integrated as EtherCAT interface in devices; included in the EL9820 evaluation kit.


EtherCAT Specification
EtherCAT Technology Group | Downloads

Master implementation for Linux
http://soem.berlios.de/

As for the NIC issue, it further reinforces the need for a standard embedded platform which has known working hardware.
However, plopping in a PCI(e) network card from say, Intel or Realtek is no real drama either.
I am not confirming there is an issue when using ethernet NICs 

Home :: OpenCores have an ethernet core written up, so you could use that if it works for real-time or build your base up from it. Either way it isn't a ground up development.

Another option for EtherCAT slaves is
Beckhoff EtherCAT ASICs ET1100, ET1200 | EtherCAT ASICs
Not sure of their unit cost however.

Other dribs and drabs
BECKHOFF New Automation Technology
Anybus-S - EtherCAT Interface
IXXAT [Industrial Ethernet Module for EtherCAT]

http://www.fpga4fun.com/10BASE-T0.html



reference1  :
https://sir.upc.edu/wikis/roblab/index.php/Development/Soem
SOEM is a C library implementing an EtherCAT (Ethernet for Control Automation Technology) Master. The homepage of the project is http://soem.berlios.de/.
It's primary target system is Linux, all examples are written for it. But as all applications are different, SOEM tries to not impose any design architecture. It can be used in generic user mode, PREEMPT_RT or Xenomai. Also converting it to other targets is relativly simple. For detailed information about EtherCAT vistit the ETG (EtherCAT technology group) site, see the links section below.
Here, at IOC Robotic's Lab, we have done (with some foreign help) some modifications of the SOEM library to improve it. Basically we have created a migration to CMake as build tool and made some modification to run it under rtnet/xenomaihttp://www.rtnet.org.

CMake improvements

With CMake now you can:
  • Create a static and dynamic library of soem.
  • Install it (default /usr/local) or whenever you want.
  • Build or not the examples.
  • Create the static and dynamic version patched to run under rtnet
  • Build the rtnet version of the examples.

Download and install

We have use git and you can download and build as usual:
git clone http://sir.upc.edu/projects/soem/soem.git soem.git
cd soem.git
mkdir build
cd build
cmake ../
make
make install
Edit the CMake options to fit your needs.

Ethercat Information

We had a student that elaborated some documentation of Ethercat. This documentation could be found here.Development.Ethercat


reference2  :
Master implementation for Linux  http://soem.berlios.de/

RTnet

Hard Real-Time Networking for Real-Time Linux

RTnet is an Open Soure hard real-time network protocol stack for Xenomai and RTAI (real-time Linux extensions). It makes use of standard Ethernet hardware and supports several popular NIC chip sets, including Gigabit Ethernet. Moreover, Ethernet-over-1394 support is available based on the RT-FireWire protocol stack.
RTnet implements UDP/IP, TCP/IP (basic features), ICMP and ARP in a deterministic way. It provides a POSIX socket API to real-time user space processes and kernel modules.
To avoid unpredictable collisions and congestions on Ethernet, an additional protocol layer called RTmac controls the media access. A dedicated Ethernet segment is required to guarantee bounded transmission delays, but RTnet also includes a mechanism to tunnel non real-time traffic like TCP/IP over RTmac, thus allowing a "single-cable" solution for connecting control systems.
Some possible application domains are fieldbus replacements, distributed real-time computing, or video/audio streaming.
RTnet was originally developed by Ulrich Marx for his diploma thesis at the Institute for Systems Engineering, Real-Time Systems Group, University of Hannover (Germany). Now it is being maintained and improved by people at this institute and contributors all over the world.

News


RTnet 0.9.13 released
2012-09-12 11:31 - RTnet - Real-Time Networking for Linux
Yes, this was way too long since the last release. Too many changes piled up, too many people were forced to use a git snapshot. Will try to do better next time. Here are the changes of this release:
Read More »
RTnet 0.9.12 released
2010-04-20 12:18 - RTnet - Real-Time Networking for Linux
Yet another year passed since the last release, so it's definitely time to role out a new one. To make it short, the list of major changes:

- RT-TCP support
Read More »
Almost exactly one year has passed si


reference3:

reference4 : EtherCAT SDK
Tools for embedded systems with EtherCAT support(http://ethercat.rt-labs.com/ethercat)

At rt-labs, we are experts in development of embedded systems with EtherCAT support. At this site you can download and use some of the tools and components we have developed. You can also find a list of useful reference implementations which might be useful for your project.

What you find here:

SOES -SOES (Simple OpenSource EtherCAT Slave Stack) is an opensource slave stack that is very easy to use and provides a small footprint. It is a good alternative to more complex stacks on the market.
SOEM -SOEM (Simple OpenSource EtherCAT Master) is the most used openscource master stack on the market. Key features includes...
rt-labs EtherCAT SDK -All in one SDK for developing EtherCAT slaves on small targets.




Help & Support:

Below are some examples of the available reference designs rt-labs provides. All reference designs are available as either a barebone codebase or with a real-time operating system (rt-kernel).
EtherCAT Master using SOEM
  • Freescale i.MX53
  • Blackfin 5xx
  • Blackfin 6xx
  • Intel
EtherCAT Slave using SOES
  • Freescale K10 - using Beckhoff ET1100
  • Freescale K60 - using Beckhoff ET1100
  • Xilinx Zynq - using Beckhoff ET1815
Supported profiles/features
  • CANOpen over EtherCAT (CoE)
  • Vendor over EtherCAT (VoE)
  • Distributed clocks
  • SERCOS over EtherCAT (SoE)
If you have questions regarding our products, please send an e-mail to support(a)rt-labs.com. If you would like to request support or use one of our solutions, please send an e-mail tosales(a)rt-labs.com.

沒有留言:

張貼留言

注意:只有此網誌的成員可以留言。