0% found this document useful (0 votes)
146 views5 pages

25875769

Uploaded by

Auditio Mandhany
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
146 views5 pages

25875769

Uploaded by

Auditio Mandhany
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Advances in Engineering Research, volume 86

2nd International Conference on Electrical, Automation and Mechanical Engineering (EAME 2017)

Development of Remotely Monitoring and Control


System for Siemens 840D sl NC Machine Tool Using
Snap 7 Codes
Bo Zheng1, Junjie Xu2,3, Helin Li2,3, Junwei Xing2, Huadong Zhao1 and Guoning Liu1,*
1
School of Mechanical Engineering, Zhengzhou University, P R China
2
IIoT Institute, Zhengzhou University, P R China
3
R&D Center, Zhengda Zhineng Company, P R China
*Corresponding author

Abstract—Based on the understanding of the communication widely adopted NC system in manufacturing industry,
methods and the structure and architecture of databases/data SINUMERIK 840D sl, to explore the methods to extract useful
blocks of numeric control (NC) system, an open source data like those concerning the state of manufacturing, the motor
communication suite designed specifically for Siemens NC system, and so on.
Snap 7, is used to realize data acquisition from Siemens 840D sl
NC system of which the communication interfaces are industrial
Ethernet. Furthermore, monitoring system for display and II. SINUMERIK 840D SL NC SYSTEM AND THE MODULUS
analyses of the production processing state is developed and its SINUMERIK 840D sl NC system is capable of high-
reliability is evaluated. performance milling and turning and opens up a nearly
inexhaustible technology range: from grinding to modern
Keywords-monitoring; remote control; snap 7; 840D sl; NC manufacturing technology like the laser machining [6-7]. This
system system boasts of high flexibility in terms of new manufacturing
technology fields. In addition, the SINUMERIK 840D sl also
I. INTRODUCTION provides excellent modularity of the operator components and
To meet the competitive priorities like low cost, good has such unique open system architecture that the CNC with
quality, short delivery times, high flexibility, and good service this NC system can be optimally adjusted to the machine
[1], modern manufacturing needs rich information on various technology [7]. And the SINUMERIK 840D sl supports
factors/parameters related to production like those for product various communication protocols and is commutative at all
design, materials, and particularly production processing. levels. 840D sl mainly consists of human machine interface
Modern technologies like NC system and information and (HMI), PC unit (PCU), numeric control unit (NCU), drive and
communication technology (ICT) make it possible to motors [7]. The communication architecture is shown as Figure
generate/store/transfer data (information) relevant to the 1.
situation and conditions during the manufacturing, e.g., the
manufacturing parameters, the state of the machine tools and
measurement probes and so on [1-4]. Data (information) can be
further analyzed to optimize the manufacturing processes,
provide basic information for manufacturing execution system
(MES), and set the basis for product life management [1,5].
Clearly, realization of the real time monitoring and control
system for manufacturing processes becomes very important
today. Mainstream NC systems like those of Siemens and
Fanuc are not open systems and data acquisition can be made
through their own specifically defined interfaces among the
system modulus or by the exchange between the machine data
blocks (MDB) [6]. This situation not only limits the advanced
system development based on current mainstream NC systems,
but also hinders the interoperability since usually more than
one NC systems may be used in manufacturing plants.
Therefore, the methods for data acquisition other than those
provided by the specific NC system itself are preferable for the
development of distributed NC system (DNC) which nowadays FIGURE I. COMMUNICATION ARCHITECTURE OF 840D SL
constitutes the base for smart manufacturing. In this study,
aiming at the realization of monitoring system, we choose a

Copyright © 2017, the Authors. Published by Atlantis Press.


This is an open access article under the CC BY-NC license (http://creativecommons.org/licenses/by-nc/4.0/). 108
Advances in Engineering Research, volume 86

The deep green lines, light green lines and purple lines are information on the manufacturing processes, provides with the
for the industrial Ethernet communication, drive CLiQ Ethernet, USB and PROFIBUS DP communication interfaces
communication and PROFIBUS communication, respectively. as illustrated in Figure 2. The manufacturing capacity of the
Its NCU module, which provides the most important NCU can be further extended by adding NX modules.
SINUMERIK Order No.
840D sl Pre-assembled cable
NCU
DRIVE-CLiQ DRIVE-CLiQ cable
X100 see MOTION-CONNECT SINAMICS S120
X101
NX10/NX15
X102
X103
X1043) Included SINUMERIK
SINUMERIK TCU/PCU
X1053) in package operator panel front

24V DC X124 Power supply Emergency stop/


Connection box/ enabling circult
Connection module PN 6XV1440-4B... SINUMERIK
6FC5348-0AA08-3AA0 HT 2/HT 8
Ethernet cable
Ethernet X120
SINUMERIK
MCP 310C PN/MCP 310PN 6FX8002-2CP00-... Electronic handwheel
MCP 483C PN/MCP 483 PN ≤25m(82ft)
MPP 483 IE

Ethernet X127 Programming device PG

Ethernet X130 Ethernet cable Factory net

PROFINET Port1
SINAMICS S120
Port2 SINAMICS
Motor S120
Module
Port3 Through CU320 with CBE202)
Port4 SINUMERIK 6FX8002-2CP00-...
MCP 483C/MCP 483/ Electronic handwheel
Slot for option4) SINAMICS I/O MCP310/MPP 483 ≤25m(82ft)
PROFINET I/O
SINAMICS S120
Motor Module 2)
Instrument X131 Through CU320
Mini handheld unit
Sockets X132
ADI 4
X133
Included
X134 PP 72/48 in package
PROFIBUS cable I/O module
USB X125/X135 SIMATIC Emergency stop/
I/O Enabling circuit
CF card X109 PROFIBUS DP
PLC inputs

Handwheel
Connection 6FX8002-2CP00-... Connection kit
Module1) ≤25m(82ft) 6FX2006-1BG02

PROFIBUS X126 6FX8002-2CP00-... Electronic handwheel


DP ≤25m(82ft)

6FX8002-2CP00-...
Distributor
≤25m(82ft) Handheld unit
PROFIBUS cable Type MPI
PROFIBUS DP/MP X136 MPI cable see MOTION-CONNECT
Emergency stop/
Enabling circuit

Digital I/O X122 8 digital inputs and Included


8 digital inputs/oiutputs in package
Digital I/O X132
Handheld unit
Type B-MPI
RS 232 C X140
(Service)
1) Not requ. When handwheel connected over MCP or MPP.
2) Only for positioning tasks over PLC.
3) Only for NCU 720.2/NCU 720.2 PN/NCU 730.2/NCU 730.2 PN
4) For NCU 720.2PN/NCU 730.2PN pre-assigned by PROFINET.
FIGURE II. INTERFACES OF NCU FOR 840D SL

109
Advances in Engineering Research, volume 86

The components of 840D sl are almost same as 840D (now A. Machine Data Type
renamed as 840D pl). For 840D pl NC system, the Machine data can be categorized by their functions as:
communication interfaces have operator panel interface (OPI),
multi-point interface (MPI) and PROFIBUS [6,10]. And its 1) General machine data: for the basic settings of NC
communication architecture may be schematically presented as: system, the drive setting and memory setting et al;
MPI 2) Channel data: for the management of specific channels,
for example, the allocation of the channel for axis/axes;
MPI NCU 3) Axis/Axes data: for the settings of spindles, for example,
MCP BHG
the spindle position and the maximum speed and the
DB PLC NCK manufacturing area;
4) Tool data and magazine data: for example, tool type,
MMC
COM
tool name, tool offset and tool characteristics et al;
5) Drive data: for the setting of motor, for example, the
FIGURE III. COMMUNICATION ARCHITECTURE OF 840D SL NC maximum electric current et al.
SYSTEM
B. Machine Data Exchange/Communication
MCP and MMC in Figure 3 denote the units of machine
The NC system of 840D sl consists of NCK unit, PLC unit
control panel and man-machine control, respectively. NCK and
and COM interface unit. The variables are set in specific areas
PLC denote the numeric control kernel and programmable
of NCK unit in the modular features. NC system specifies the
logic control, respectively. The baud rates of MPI and OPI
areas, the data modules, the data types and data classes/struts.
interfaces are 1.5Mbits/s and 187.5Kbits/s, respectively. For
The data exchange between the PLC unit and NCK unit is
840D sl and 840D pl, besides COM module, the NCU also
through data blocks (DB) exchange via specific interfaces.
includes NCK and PLC modules where the data of the machine
Basic DBs have been set and defined by NC system. The DBs
tool, NC program and processing data and so on are processed
corresponding to the PLC unit are given in Figure 5. The
or stored. The architecture of NC system in our study is of the
interfaces include those of MMC, NC, COM, NC channels,
NCU+MCP+PCU+OP type, and may be schematically
tool/magazine management, spindles and so on. Interface
presented as Figure 4.
protocols, which can not be modified or changed by users,
Hand
Wheel
should be followed in the processes of reading/writing data.
The signals/data exchange in NCU unit is directional. For
OP PCU example, signals from NCK to PLC can be transferred after
X60
MCP X21
X20 Main spindle motor PLC unit makes requests in NC system and are only for reading.
PP72/48 I/O In response to PLC’s requests, NCK unit performs relevant
X150 P1 X120 SINAMICS S120 X axis spindle motor
Module
Port1
NCU functions after “interpreting” the signals from PLC. The
X127 X100 Drive
X111 Y axis spindle motor functions could be about the control methods, feed rate,
Z axis spindle motor
coordination axis selection, et al. User DB is the interface
between user’s programs and basic program.
Signals from PLC to NC
I/O Interface
DB10 Signals from NC to PLC
FIGURE IV. ARCHITECTURE OF 840D SL NC SYSTEM Selection/State signals from HMI to PLC
Signals to BAG
OP is short for operator panel in Figure 4. As indicated in DB11
Signals from BAG
Figure 2, the communication interfaces of 840D sl enable much
higher baud rates. Therefore, meaningful real time data Signals to operator panel
acquisition, data analysis and control of machine groups can be DB19
PLC data block Signals from operator panel
realized.
DB20 Machine data in PLC
III. DATA AND DATA BLOCKS (DB) OF THE 840D SL NC
SYSTEM Signals to channel
DB21
The functions of SINUMERIK 840D sl NC system are Signals from channel
realized via the machine data (MD) and data communication. Signals to spindle/main spindle
The data/programs can be used for drive control, axis/axes DB31
Signals from spindle/main spindle
channel setting, machining process and the setting of auxiliary
system [10]. FIGURE V. TYPICAL DBS FOR PLC UNIT

110
Advances in Engineering Research, volume 86

Through variables data exchange can be made between ConnectTo function can connect the IP address of PLC and
other NC units shown in Figure 1, e.g., data exchange between the parameters of concerned Rack and Slot. For S7-300, Rack
PLC and MMC. The state data of NCK unit concerning the and Slot are set as 0 and 2, respectively. Successful access has
situations of manufacturing processes can be accessed by PLC the return value of zero. Otherwise, codes for error message
unit. Accordingly, by acquisition data from PLC unit, the state will be returned.
data of machine tool can be temporally stored, accessed,
extracted, loaded and transferred. 2) Reading function
public int ReadArea (int Area, int DBNumber, int Start, int
IV. METHODOLOGY FOR DATA ACQUISITION AND Amount, int WordLen, byte[] Buffer);
MONITORING SYSTEM DEVELOPMENT This function can extract the data listed in Table 1 by
accessing/analyzing the DBs, the input/output signals,
A. Open Resource Snap 7 memories for counter and timer.
PLC of 840D sl NC system is S7-300. It supports MPI,
PROFIBUS and industrial Ethernet (TCP/IP) communications.
TABLE I. AREA FUNCTION AND THE PARAMETERS
X127 connection of its NCU is for the industrial Ethernet
communication. As mentioned previously, the systems Parameters Data
specifically for one NC system, e.g., WINCC and OPC of 0x81 Input
Siemens NC system, have many shortcomings and limit the
data/information exchange across different NC systems. And 0x82 Output
these systems routinely cost customers a lot for various 0x83 Marker
authorization fees. Fortunately, many open resources provide
with ways or functions to realize data acquisition from PLC 0x84 DBs
unit without the help of the specific systems like WINCC or
Siemens’ DNC interfaces. And Snap 7 is a powerful tool today 0x1C Counter
to manage this approach [8-9].
0x1D Timer
Snap7 is an open source, 32/64 bit, multi-platform Ethernet The parameters in the bracket are defined as: DBNumber:
communication suite for interfacing natively with Siemens S7 DB number; Start: Starting address; Size: Bytes length;
PLCs, i.e., from S7-200 to S7-1500 [9]. And it is free. Snap 7 Wordlen: data type; Buffer: byte group.
can be downloaded from the website snap7.sourceforge.net.
The documentation of Snap 7 is somewhat better than that of 3) Writing function
other open resources. High level object oriented wrappers are public int WriteArea(int Area, int DBNumber, int Start, int
provided in Snap7, inclouding .Net [8], so the PLC driver can Amount, int WordLen, byte[] Buffer);
be written in C# language, users don’t need to handle any
interoperability with native code [9]. It has the capabilities of WriteArea function works in the same way as the reading
connecting and disconnecting with the PLC using sockets, function ReadArea.
reading and writing bytes from a single area of memory if a Besides the functions above, Snap 7 also provides many
starting address and the number of bytes are given. In addition, other functions like PLC parameter configuration function, et al.
it can directly map DBs to classes and structs. What’s more, The interface of the monitoring/control system developed here
Snap 7 supports various operating systems like Windows, is shown in Figure 6. The system can realize various controls
Linux, Mac OS and Oracle Solaries. like emergency stop, reset, start, stop, clockwise or anti-
clockwise rotation, and auxiliary functions like magazine
B. Monitoring System Development management, lubrication, cooling, lighting, feed rate control, et
Information concerning the state of machine tool includes al. Using routers or adapters, DNC system can be realized to
machine start/stop, manufacturing processes, measurement, monitor the state of machine groups and to remotely control
tool/magazine situation, alarms, et al. The information can be machine tool as well.
acquired by accessing the DBs of PLC via Snap 7
codes/functions. IP address and configuration can be
automatically made via the X127 connection of NCU. And
NCU switch and PLC protection switch should be set as zero.
In our research, the IP address is: 192.168.214.1. The platform
and softwares for system development here are Windows 7,
Visual Studio and C#. Snap 7 supports DLL of Windows
platform.
Typical functions are:
1) Connection function
public int ConnectTo (string Address, int Rack, int Slot); FIGURE VI. INTERFACE OF THE DEVELOPED
MONITORING/CONTROL SYSTEM

111
Advances in Engineering Research, volume 86

V. CONCLUSION
Based on the protocols of communication interfaces of
SINUMERIK 840D sl NC system, and utilizing particularly the
data exchange rules of PLC unit and NCK unit, the
methodology for direct reading/writing of variables in PLC unit
is proposed. In this study, monitoring/control system is
developed using Snap 7, an open source software, and C#
language to extract the data in PLC unit. The system is
evaluated and proved reliable to monitor and remotely control
the machine tool with 840D sl NC system. The research in this
study paves the way for future DNC system development.

REFERENCES
[1] Louis B, International Manufacturing Strategy in a Time of Great Flux,
Springer Switzerland, 2017.
[2] Ward P T, McCreery J K, et al, Competitive priorities in operations
management. Decis. Sci. 29(4):1035–1046,1998.
[3] Boyer M, Lewis M, Competitive priorities: investigating the need for
tradeoffs in operations strategy. Prod. Oper. Manag. 11(1):9–20, 2002.
[4] Hallgren M, Olhager J, Schroeder R G, A hybrid model of competitive
capabilities. Oper. Prod. Manag. 31(5):511–526, 2011.
[5] Baines T S, Lightfoot H W, et al, The servitization of manufacturing: a
review of literature and reflection on future challenges. J. Manuf. Tech.
Manag. 20(5):547–567, 2009.
[6] SINUMERIK 840D sl, SINAMICS S120, Machine data and parameters
manual, 2013.
[7] http://w3.siemens.com/mcms/mc-solutions/de/maschinenbau/handlingsy
steme/handling-mit-sinumerik/Seiten/sinumerik-handling.aspx.
[8] Nardella D., Snap7 reference manual, 2015.
[9] https://www.mesta-automation.com/siemens-s7-plc-c-s7-net-plc-driver/.
[10] SINUMERIK 840D sl/840D/810D/840Di lists manual, 2005.

112

You might also like