The Design of Industrial Ethernet Adapter Based On Ethernet/IP

Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

Proceedings of 2009 4th International Conference on Computer Science & Education

The Design of Industrial Ethernet Adapter Based


On Ethernet/IP*

T.D.Liu W.Tang and H.Jiang


Department of Automation
University of Xiamen
Xiamen, Fujian Province, China
[email protected]

Abstract—Aiming at application of industrial network, this III. HARDWARE DESIGN OF INDUSTRIAL ETHERNET ADAPTER
paper adopted ARM9 microprocessor to construct the hardware
system of an industrial Ethernet adapter, developed I/O interface Ethernet/IP has worked out device profile specification to
driver under Windows CE.NET operating system and completed categorize the industrial devices completing the same function.
the application software of the industrial Ethernet adapter based Device profile favored different companies to go into a unified
on EADK software platform. In addition, with the help of action. Communication adapter is one kind of device class
EIPScan, EDITT, PCU-ETHIO Ethernet/IP scanner, etc, a defined by the device profile regulations. (Class number is
complete test was given to the communication adapter. Test 0Chex).
results demonstrate that the industrial Ethernet adapter has not
only good performance in stability, real-time property of data Aiming at the development of industrial Ethernet adapter,
transmission but also bright prospects in application. this paper adopted S3C2410 microprocessor to construct the
hardware system of industrial Ethernet adapter, and it
Index Terms—Industrial Ethernet, communication adapter, architecture is as shown in Fig.1.
Ethernet/IP

I. INTRODUCTION SDRAM NAND Flash


The distribution, intelligence and informatization of
industrial control system require enterprises to be integrated
from control layer to management layer seamlessly. Industrial JTAG Serial
S3C2410
Ethernet satisfies this requirement and turns to become a main Port Communication
direction of the control network. As a mainstream kind of Microprocessor
industrial Ethernet, Ethernet/IP gains wide acceptance. LCD I/O Port
Currently, more than 100 million Ethernet/IP nodes have been
installed all over the world. Ethernet/industrial protocol has
been transformed into China Machinery Enterprise standards
[1] USB Mouse Ethernet Port
.
In this paper, an industrial Ethernet adapter was developed.
Fig.1 Hardware architecture of S3C2410 based communication adapter
The adapter integrated industrial control devices into
Ethernet/IP control network, and improved the flexibility and This paper adopted large-capacity NAND Flash and
compatibility of control system. Currently, Ethernet/IP devices SDRAM so as to assure the system software operate stably
are mainly supplied by foreign companies, which mean the and fast. Due to S3C2410 itself not including Ethernet port,
domestic enterprises have to pay high fees for those devices. Network card chip CS8900 was adopted to realize the Ethernet
So the industrial Ethernet adapter provided a high-effective function. The hardware system of industrial Ethernet adapter
kind of industrial control device and filled domestic blank. also included other parts, such as power, reset circuit, serial
II. SUMMARY OF ETHERNET/IP bus port, LCD port, JTAG program real-time simulation port
and so on.
Ethernet/IP (Ethernet/industrial protocol) is an open
protocol system suitable to industrial environment application IV. I/O INTERFACE DRIVER DESIGN OF INDUSTRIAL
[2-3]. It integrated standard TCP/IP Ethernet with CIP (control ETHERNET ADAPTER
and information protocol) so as to extend standard TCP/IP
Having completed the design and manufacture of the
Ethernet to industrial real-time control. Ethernet/IP introduced
hardware circuit, it is needed to write both stable and reliable
the CIP protocol to supply a unified application layer protocol.
I/O port driver so as to provide a software platform
This enabled each network to realize the seamless integration
independent of hardware. I/O interface driver adopted flow
in application layer. In addition, the Ethernet/IP network could
interface driver model and processed data in way of interrupt.
be easily integrated to Internet/Intranet.

* Supported by Fujian province key scientific and technological project (2008H0060)

978-1-4244-3519-7/09/$25.00 ©2009 IEEE ICCSE 2009


978-1-4244-3521-0/09/$25.00 ©2009 IEEE 1239

Authorized licensed use limited to: Universidad Tecnologica Metropolitana (UTEM). Downloaded on July 15,2021 at 02:21:42 UTC from IEEE Xplore. Restrictions apply.
Proceedings of 2009 4th International Conference on Computer Science & Education

A key step of this driver development was the implementation Ethernet/IP control network. Explicit message server and I/O
of interrupt processing. Interrupt processing was divided into server mainly undertook to connect with Ethernet/IP scanners
two stages, Interrupt Service Routine (ISR) and Interrupt and exchange real-time I/O data. The overall software
Service Thread (IST). When hardware happened to interrupt, architecture of this communication adapter is as shown in Fig.
OS kernel called OAL function OEMinterruptDisable to 2.
inform hardware of closing this specific interrupt until certain
necessary measures ended. Then, OS kernel called ISR to map Start
the physical interrupt into logical interrupt value, and triggered
an event to invoke the suspended IST. Structure of IST is as Start EADK protocol Stack
follows.
DIO_Initialize Address(); //virtual memory mapping
Dynamically register custom CIP type
DIO_EnableInterrupt(); //relevant register’s configuration
while(g_fRun) //circulate until informed to exit
{…… Start Start Start
dwStatus=WaitForSingleObject(g_hevInterrupt, UCMM UCMM explicit
INFINITE); //wait for synchronized event server client- message
if(dwStatus==WAIT_OBJECT_0) side server
{ // undertake interrupt handling at this time
……
// inform inner core that interrupt handling had been Configure combination object instance
// accomplished
InterruptDone(g_dwSysInt);
Start I/O connection server
}
}
When had been started, IST needed to accomplish Wait for message in callback function
initialization work, including virtual memory mapping and
relevant register’s configuration. Then IST entered the status
of circularly waiting for interrupt event until the triggering Establish Receive Receive
event returned from OS kernel. Once the interrupt happened, new and and
explicit respond forward
IST would communicate with I/O interfaces to read all message UCMM I/O data
necessary data. Last IST adopted relevant logical interrupt to and I/O message
call ‘InterruptDone’ function, and informed OS kernel that the connecti
interrupt handling had been accomplished.
Fig.2 Application software functional structure
Having finished programming of the driver, we also
needed to enclose the compiled driver file to operating system When program had begun to run, firstly, initialize EADK
image. So far, application program could achieve access and protocol stack and dynamically register custom CIP class.
control of the devices through visiting a particular file. Secondly, start server and client-side of UCMM as well as
explicit message server so as to send, receive UCMM message
V. APPLICATION SOFTWARE DEVELOPMENT OF INDUSTRIAL
and explicit message. Thirdly, according to I/O module
ETHERNET ADAPTER
connected to this communication adapter, configure matching
The communication adapter defined in CIP device profile combination object instance and start I/O server. Finally, make
should include identity object, message routing object, the execution thread of application program wait in the
connection object and the objects relevant to network callback function so as to receive the right connection request
connection. As for Ethernet/IP, the objects relevant to network to establish explicit-message connection and I/O connection
connection included TCP/IP interface object and Ethernet with remote Ethernet/IP scanner, Then exchange explicit
connection object [4-5]. According to the device object model
message and real-time I/O data.
defined by Ethernet/IP, this paper designed application
software to accomplish the various functions of Ethernet/IP B. Implementation of Application Program
Communication adapter on the basis of EADK (Ethernet/IP
adapter developers kit). EADK is a kind of software protocol CIP was a connection-oriented protocol, so connection
stack, and it can make the developers to add Ethernet/IP object played a fairly important role in Ethernet/IP.
adapter function to product quickly. Connection object was mainly responsible for recording every
connection’s information such as setting value, connection
A. Overall Software Architecture of Adapter status, etc. In each node, there were at least two connection
Ethernet/IP communication adapter should serve as the instances in order to separately process I/O connection and
client-side and server of UCMM (unconnected manager), explicit message connection. Each CIP connection can be
explicit message server and I/O server. Among them, UCMM expressed by a connection object instance. Connection
was responsible to process unconnected information and establishment could be achieved by using Create service of
establish connection for the unconnected devices in the connection object or Forward Open service of connection

1240 978-1-4244-3521-0/09/$25.00 ©2009 IEEE

Authorized licensed use limited to: Universidad Tecnologica Metropolitana (UTEM). Downloaded on July 15,2021 at 02:21:42 UTC from IEEE Xplore. Restrictions apply.
Proceedings of 2009 4th International Conference on Computer Science & Education

manager object. The both establishment of explicit message case NM_NEW_MEMBER_DATA:


connection and I/O connection were accomplished with the switch(nParam1)
help of Forward Open service of connection manager object {
[6]
. Part of header file definition of connection manager object case CONSUMING_SLOT0:
is as follows. EtIPGetAssemblyInstanceData(
CONSUMING_SLOT0,OtoTData,
// connection manager object class ID slotsInfo[0].outputSize);
#define CONNMGR_CLASS6 ……
// connection request service
#define FWD_OPEN_CMD_CODE 0x54 VI. TESTING AND APPLICATION OF INDUSTRIAL ETHERNET
…… ADAPTER
// initialize connection manager object
void connmgrInit(void); When having compiled application software of industrial
// process Forward Open connected request Ethernet adapter, there was another critical job—testing of
void connmgrIncomingConnection( REQUEST* communication adapter. This paper undertook a complete
pRequest); communication test with the help of EIPScan(Ethernet/IP
// send Forward Open response. scanner simulation tool), EDITT(Ethernet/IP device
void connmgrPrepareFwdOpenReply( interoperability test tool), Rockwell company’s ControlLogix
SESSION*pSession, CONNECTION* pConnection, PLC and Woodhead company’s PCU-ETHIO Ethernet/IP
REQUEST*pRequest); scanner, etc. Among this software, EIPScan could successfully
// analyze unconnected request (UCMM) establish explicit message connection and I/O connection and
void connmgrProcessUnconnectedSend( REQUEST* accurately exchange data with this communication adapter.
pRequest); EDITT was applied to test this adapter’s interchangeability
…… with other Ethernet/IP devices. Rockwell’s ControlLogix
series PLC was able to send Forward Open connection request
Usually, Ethernet/IP scanner sent Get_Attributes_All and establish I/O connection with Ethernet/IP communication
service to a certain device’s identity object in the network to adapter. Woodhead Company’s PCU-ETHIO CRD card was
gain the device’s information. I/O module connected to the an integrated Ethernet/IP scanner, and it can give a complete
communication adapter itself did not support Ethernet/IP test to communication adapter’s function.
protocol. Besides, under different occasions, both the number
and class of I/O modules connected to the communication Lastly, in order to further verify the stability and reliability
adapter were uncertain. So registering a custom CIP class was of data exchange, EIPScan, ConrolLogix PLC, PCU-ETHIO
needed so that combination tool can obtained the information Ethernet/IP scanner all undertook a 72h-long data exchange
of connected I/O module. The code of this class was defined with this Ethernet/IP communication adapter at the frequency
as 78hex, belonging to vendor specific. This CIP class of timing 20ms. During the test, all CIP connection ran stable
returned each I/O module’s external ID to configuration with a packet loss rate less than 0.1%. Certainly, the product
software by responding to Get_Attributes_All request. In this needs to experience the consistency test in lab appointed by
way, users can make the right configuration and choice on ODVA before being put onto the market.
configuration software. VII. CONCLUSION
On the basis of having enclosed required CIP classes, Industrial Ethernet adapter developed by this paper
application software needed to integrate server and client-side perfectly integrated the embedded developing technique with
of UCMM, I/O connection server and explicit message Ethernet/IP technique. Stable operated I/O interface driver
connection server into a complete Ethernet/IP communication provided solid foundation for the development of application
adapter. Owing to space constraints, here we only show part of software, and at the same time, implemented CIP protocol on
implementation code, specific as follows. the basis of TCP/IP protocol stack and accomplished various
EtIPAdapterStart(); // start EADK protocol stack function required by Ethernet/IP communication adapter. This
EtIPRegisterEventCallBack((LogEventCallbackType*)&fn industrial Ethernet adapter provided an open solution to
Callback); // register callback function promote industrial users to Ethernet/IP network.
EtIPRegisterObjectsForClientProcessing((iAppClasses,1,N ACKNOWLEDGMENT
ULL,0); // dynamically register 0x78 class
…… The authors wish to express their gratitude to Wenbo Zhou,
if(slotsInfo[0].bUsed= =TRUE) Changcai Wu and Qiqi Yu for all constructive discussions
{ // create combination object instance for each I/O module during the initial phase of this work and to the anonymous
EtIPAddAssemblyInstance( reviewers for their helpful comments.
PRODUCING_ASSEMBLY_SLOT0,
AssemblyStatic|AssemblyProducing, INVALID_OFF- REFERENCES
SET, slotsInfo[0].inputSize, NULL); [1] CH.T.Li, D.Y.Gu and W.J.Meng: Study of Ethernet/IP using trends in e-
…… enterprise (Chinese) [J]. Chinese Journal of Scientific Instrument, 2005,
switch(nEvent ) 26(Suppl.2), p.698-700.
{ // receive I/O data [2] ODVA. Ethernet/IP: the proven and complete solution for manufacturing
automation [M].2006.

978-1-4244-3521-0/09/$25.00 ©2009 IEEE 1241

Authorized licensed use limited to: Universidad Tecnologica Metropolitana (UTEM). Downloaded on July 15,2021 at 02:21:42 UTC from IEEE Xplore. Restrictions apply.
Proceedings of 2009 4th International Conference on Computer Science & Education

[3] D.Y.Gu and F.H.He: Realization of Ethernet/IP protocol on Linux [5] Y.X.Wang and L.D.Wang: Design of multicast and switch gateway
(Chinese) [J].Chinese Journal of Scientific Instrument, 2005, 26 between CAN field bus and Ethernet (Chinese) [J]. Journal of Electronic
(Suppl.1), p.441-444. measurement and Instrument, 2007, 21(3). p.83-87.
[4] W.J.Huang and J.X.Jin: Developing a field controller based on the EPA [6] ODVA. Ethernet/IP specification [M]. Release 1.0, 2001.
industrial Ethernet (Chinese) [J]. Chinese Journal of Scientific
Instrument, 2006, 27(8), p.949-952.

1242 978-1-4244-3521-0/09/$25.00 ©2009 IEEE

Authorized licensed use limited to: Universidad Tecnologica Metropolitana (UTEM). Downloaded on July 15,2021 at 02:21:42 UTC from IEEE Xplore. Restrictions apply.

You might also like