You are on page 1of 4

International Conference on Control, Automation and Systems 2010

Oct. 27-30, 2010 in KINTEX, Gyeonggi-do, Korea

Gateway Between High-performance Fieldbus and Serial Communication


Sung Su Yoon1, Jea Chul Lee1, Seong Jin Cho2, Jae Wook Jeon3
1

The School of Information and Communication Engineering, Sungkyunkwan University, Suwon, Korea
(Tel : +82-31-299-4655; E-mail: bboggi33@skku.edu; doradorn@ece.skku.ac.kr)
2
The Department of Mobile System Engineering Engineering, Sungkyunkwan University, Suwon, Korea
(Tel : +82-31-290-7237; E-mail: liberty3@ece.skku.ac.kr)
3
The School of Information and Communication Engineering, Sungkyunkwan University, Suwon, Korea
(Tel : +82-31-290-7129; E-mail: jwjeon@yurim.skku.ac.kr)
Abstract: In this paper, we present a design of a gateway system to adapt the family of industrial computer network
protocols used for real-time distributed control (Fieldbus) and the traditional serial communication. This gateway is
designed to receive the data frame of Fieldbus and send the transferred data via serial communication. The proposed
gateway can combine the properties of the high performance Fieldbus with the serial communication for industrial
distributed control systems. Many control systems use RS-485, since RS-485 serial communication is simple to use
and very popular in low cost control systems. Conversely, the Fieldbus, with high speed, great reliability, simple low
cost line structure, is one of the most popular automation networks in industry. Therefore, combining the Fieldbus and
RS-485 produces a low cost solution for modern communication and the traditional distributed controller. The
implementation of the proposed gateway on a Digital Signal Processor (DSP) based platform, and RS-485 motor driver
to control an X-Y table will verify the correctness of the proposed gateway.
Keywords: Gateway, Fieldbus, EtherCAT, RS-485
It is based on Ethernet. It is high-speed and has reliable
performance [3]. It is open technology, fully disclosed
and supported by the world largest industrial Ethernet
Organization. It only uses standard frames based on
IEEE 802.3 [4]. Fig1 shows the EtherCAT telegram
structure. It overcomes the inherent limitations of other
Ethernet solution.
The Ethernet packet is no longer received then
interpreted, and process data then copied at every device,
but the EtherCAT slave devices read the data addressed
to them, while the frame passes through the node.
Similarly, input data is inserted whilst the telegram
passes through. It can support most topologies, such as
Line, Tree and Start. The bus or line structure known
from the field-buses thus becomes available to Ethernet,
without the quantity limitations implied by cascaded
switches or hubs. The number of organizations applying
EtherCAT is increasing in Korea, Japan and Europe.

1. INTRODUCTION
Many kinds of Fieldbus [1], such as PROFIBUS,
Ethernet for Control Automation Technology
(EtherCAT) [2] and Mechatrolink-III, are used in the
industrial automation field, since Fieldbus provides high
speed, real-time, reliable and low cost solutions. When
using traditional serial communication, network systems
consist of many cables, because usually master and
slaves are connected directly to each other. It is not easy
to set up and maintain network systems. Fieldbus
provides a solution to these problems. Fieldbus uses a
bus network. It can reduce the number of
communication cable lines and their length. This
simplifies the control network system and makes
maintenance easier. This is a major advantage of
Fieldbus implementations. Another advantage is high
speed and reliability, since Fieldbus uses digital
signals. Although Fieldbus has many advantages, many
organizations cannot replace their network system by a
Fieldbus, as they already have machines based on
RS-485 communication. As the price of fieldbus
components is at present higher, it would cost
organizations a lot to replace them. The proposed
gateway can solve this problem. The gateway can
enable the organization to adopt the high performance
Fieldbus.
The remainder of the paper is organized as follows.
Section 2 introduces EtherCAT, an example Fieldbus.
Section 3 introduces the two-axis X-Y table with
RS-485 communication used in the experiment. In
Section 4, we detail the proposed gateway and explain
how it is implemented in Section 5. Finally, we
conclude the paper.

3. Two-axis X-Y table and RS-485


In this paper, we use a Two-axis X-Y table for the
experiment (Fig 2). This X-Y table has two servo drives
with RS-485 communication protocol. It consists of two
Ethernet Header

2. Fieldbus : EtherCAT

SA

Type

(6)

(6)

Ethernet
Header

IP
Header

UDP
Header

(20)

(8)

(2/4)

EtherCAT Telegram

Frame
HDR

Data
gram 1

Data
gram 2

(2)

(n)

(m)

ECAT
HDR

Ethernet

Data
gram n

Pad.

FCS

(k)

(32)

(4)

EtherCAT Telegram

Fig 1. The EtherCAT telegram structure

EtherCAT is developed by BECKHOFF in Germany.

978-89-93215-02-1 98560/10/$15 ICROS

DA

ECAT

971

Ethernet

Gateway

Servo drive
With RS-485

Fig 2. Two-axis X-Y table with RS-485

Fig 4. Gateway Block diagram

step motors. We input command data to servo drives


through the RS-485 and then servo drives move each of
the two motors. We can draw some shapes, such as a
circle, straight line, and curve using two step motors
with each different axis. We can control motor speed
naturally.
The RS-485 is very popular communication protocol.
This protocol is one of the simplest and easiest networks
It uses just two lines to communicate. Handshaking in
this is also very simple: master command send mode or
read mode and the slave follows the master. However,
RS-485 communicates across a shorter distance than
EtherCAT. Generally, 1.2km is the limitation with
RS-485. Therefore, RS-485 protocol is more reasonable
in a small workplace than EtherCAT. Thus, many
organizations use RS-485 as a communication protocol.

serial communication, can sell their product to other


organizations that have the Fieldbus system. Conversely,
if the Gateway is included with the Fieldbus system, the
Fieldbus organization can sell their product.
In the experiment, we use the two-axis X-Y table
with the RS-485 as slave and use EtherCAT as the
Fieldbus. We can control the X-Y table using the
TwinCAT NC program in a Personal Computer(PC).
We will show this set up drawing a straight line and
circle.
B. The components for experiment
We use the two gateways and the X-Y table with the
RS-485 for the experiment. Fig 6 shows how to connect
the components for this experiment.
The first gateway is connected to the master PC and the
second gateway is connected to the first gateway. Each
gateway is connected to the servo-drive. So, the master
PC sends the data frame to the gateways and then the
gateway catches and converts the data to RS-485 format.
The servo-drive receives the converted data and
operates each axis of the X-Y table. We use a PC as a
master. The PC has a popular Local-area network card
(LAN-card) for the Ethernet port. EtherCAT already
uses the Ethernet port. However, the EtherCAT protocol
is different from Ethernet. So, we install the EtherCAT
protocol and configure that. We recommend the Intel

4. GATEWAY
In the gateway (Fig 3)[5], we use DSP to convert
command data. The gateway should analyze the data
frame, because Fieldbus has a unique data frame type.
So, DSP will analyze the data frame and convert to the
data type of RS-485 (Fig 4). The gateway consists of the
input Fieldbus protocol part, the analysis and conversion
part by DSP, and the output of RS-485 parts.

5. IMPLEMENTATION
A. The hole system structure
In this proposal, a Fieldbus is applied to the Master
and serial communication is applied to the Slave. So,
the gateway is positioned between Master and Slave.
Fig 5 shows the network structure with the gateway [6].
When the Master sends a data frame, the Gateway
receives the data frame. After receiving it, DSP analyzes
the data frame and converts it to serial communication.
The data frame converted by DSP is transferred to
slaves. This may be implemented in two ways in the
real field. The first includes the Gateway with the slave.
In this case, the organization, with a slave based on
EtherCAT
PHY Chip
DSP

Fig 5. Network structure with GATEWAY

Fig 3. Gateway EtherCAT to RS-485

978-89-93215-02-1 98560/10/$15 ICROS

972

C. CONVERSION of EtherCAT to RS-485


The gateway converts EtherCAT data to RS-485 data
using DSP. It is simple. The Twin-CAT PLC control
program generates the data frame. There is only a speed
variable in the data frame. The Twin-CAT PLC control
program receives data from the axis encoder and
computes speed using some acceleration speed,
maximum speed, minimum speed, target position,
movement direction and so on. So, finally the
Twin-CAT program forms the data frame with speed
data every 200 ms. We can see the speed data using the
Wireshark [7] program. We use version 1.2.9. This is
open-source. This program can capture the data frame in
the Ethernet protocol. So, we can see which bit frame is
the speed data. We can see the speed data changing in
Fig 8.
This variable is changed from 00000000 to B0010000.
In this case, the movement direction is positive. When
this variable is decreased from FFFFFFFF, in this case,
the movement direction is negative.
The DSP in the gateway receives this EtherCAT data
frame and reads the speed data. Then, it makes a new
data frame for RS-485 protocol with the already
received speed data. The servo-drive with the RS-485
receives the new data frame and reads the speed data. It
moves the motor using this.

Gateways
Servo drive
With RS-485

X-Y Table
Fig 6. The experimental system
Family LAN-card, because the other Family LAN-cards
are unstable in transmitting the EtherCAT protocol data.
BECKHOFF also recommends Intel-Family LAN-cards
in informal comment.
We use the Twin-CAT as a PC based controller
program. This program is made by BECKHOFF. It
supports IEC 61131-3 standard Programming
Languages. So, we use the Structured text language of
the IEC 61131-3 standard to move each axis to draw a
straight line and circle.
Fig 7 depicts the Twin-CAT program flowchart. The
Twin-CAT program consists of two parts: System
Manager and PLC Control. The System Manager scans
EtherCAT devices and maps PLC variables with the
gateway. We can check the status of each EtherCAT
device and the information of the motor, such as the
current position, and speed. The PLC Control receives
and sends data to move the axis. We use two kinds of
equation to draw a straight line and circle in the PLC
Control: a first-order equation and a trigonometrical
equation, respectively.

D. X-Y table result


We wrote PLC code to draw a straight line and circle
to use simple equations, then drew them. Fig 9 shows
the result of drawing a straight line. We wrote PLC code
to generate two-hundred points and send these points to
the X-Y table using RS-485 via the proposed gateway
for this first experiment. The two axes of the X-Y table
move correctly. If the servo-drive with RS-485 could
not receive the data frame the same as for the EtherCAT

Scanning EtherCAT devices


System
Manager
Mapping PLC Program with device

Receive data from each axis encoder


PLC
Control

Computing next data to move axis

Send to each axis

Fig 8. Captured EtherCAT data frame

Fig 7. Twin-CAT program flowchart

978-89-93215-02-1 98560/10/$15 ICROS

973

functions correctly.

6. CONCLUSION AND FUTURE WORKS


Many organizations apply Fieldbus in the Automation
field, as the high-performance of Fieldbus can reduce
the communication cable length and support high-speed
communication with great reliability. It also makes
maintenance easier and reduces maintenance cost.
However, the problem is that they should replace all the
slaves based on serial communication to apply Fieldbus,
since their protocols are very different. Fieldbus has
many kinds of new protocols. So, in this paper, we
proposed a gateway between the high-performance
Fieldbus and serial communication. This gateway will
allow organizations to use their existing slaves with the
high-performance Fieldbus system. They do not need to
pay much to use the Fieldbus system. Assume there is a
large factory; this factory consists of several local
workplaces, each workplace in one control room and
each place should communicate with each other. We
cannot connect the workplace and control room with
serial communication protocol, because this protocol
can only transmit data 1.2 km. Within the workplace,
we can connect devices with Fieldbus. However, the
cost will be high. In such a case, serial communication
protocol is much more efficient than Fieldbus. So. we
want use both kinds of protocol as a solution. Thus, we
need the gateway between the Fieldbus and serial
communication protocol.

Fig 9. Experiment 1. Drawing a straight line.


data frame, the X-Y table cannot draw the correct line.
In this experiment, the result link is correct. That is, the
gateway functions correctly.
Fig 10 shows the result of drawing a circle. As in
experiment 1, we wrote PLC code to generate
four-hundred points and send these points to the X-Y
table using RS-485 via the proposed gateway for this
experiment.
We can see the correct shape in this experiment to
draw a circle. The circle shape is correct and the start
and end points match. That is, the gateway works
correctly.
Finally, the result is successful. Drawing a circle is
sensitive work, because if one servo-drive misses just
one data point, the circle will be broken. So to draw a
circle, both servo-drives must work correctly without
just one missing data point. In this experiment, we can
see the correct circle. So, we can say the gateway

REFERENCES
[1]

[2]

[3]

[4]

[5]

[6]

[7]
Fig 10. Experiment 2. Drawing a circle

978-89-93215-02-1 98560/10/$15 ICROS

974

In : N.P. Mahalik, Editor, Fieldbus Technology :


Industrial Network Standards for Real-Time
Distributed Control, Springer Verlag, Germany
(2003)
Prytz, G., A performance analysis of EtherCAT
and PROFINET IRT, Emerging Technologies
and Factory Automation, 2008, pp. 408 415,
2008
Guido Beckmann, EtherCAT Communication
Specification,
Version
1.0,
EtherCAT
Technology Group, 2004.
Lei Wang and Junyan Qi, The Real-Time
Networked Data Gathering Systems Based on
EtherCAT, ESIAT International Conference
2009, pp.513-515, 2009
Zin-Won Park and Myung-Kyun Kim, Design
of an integrated fieldbus gateway, KORUS
International Symposium, 2005, pp.843-846,
2005
Zaiping Chen; Xiaowei Yao, Xunlei Yin,
Research of schemes on integration of fieldbus
system, IECON Industrial Electronics Society,
2005, 5pp, 2005
Wireshark,
network
protocol
analyzer,
the
Wireshark
http://www.wireshark.org,
Foundation

You might also like