You are on page 1of 4

The Application and Research of the Liquid Level Control Technology Used in

Mineral Flotation Process which Based on the Modbus Communication


Protocol
Zhaoyong Li 1, Shouming Zhang 1, Jianliang Lang 1 ,Hualiang Shao 2
1. Kunming University of Science and Technology, Yunnan 650500; 2. Yuhang TCM hospital, Hangzhou 311106
E-mail: zsmingxm@sina.com

Abstract: Flotation level control is a very important part in the flotation mineral separation process. This article
introduces one application of the Modbus RTU protocol which used in the flotation liquid level control system, discusses
the S7-300's programming ideas and methods which based on the form of communication, and optimize the
communication strategy. The practical application shows that the system of flotation liquid level control which based on
Modbus RTU protocol can get better control effect, and ensure a good target for the mineral separation.
Key Words: Modbus RTU Protocol, Liquid-level Control, UDC3200, CP341, The Flotation Process

the rate of communication, so installed two CP341, and 17


branches for each one.
1 INTRODUCTION
The flotation is the most important way of separating For convenient operation and monitoring, it is equipped
mineral, it had been widely used in the separation of the with ADVANTECH touch screen which is connected with
metal minerals and non-metallic mineral. The technical an Ethernet interface of CP343-1 on the S7-300 PLC by
target of flotation products is limited by the mineral industrial twisted pair cable in the PLC control room.
properties, flotation reagents, equipment and process Another interface is connected with the central control
operating parameters and so on. The automatic control room switches, and was assigned a different IP. Ultimately,
technology is the key technology for the process of flotation it achieves centralized monitoring the multiple workshops.
except the technological innovation, to ensure the quality of The control network structure of the overall system is
the produ- ct and reduce the production cost[1]. It is shown in figure 1.
important to keep the pulp level of the flotation groove
stability for the flotation product properties and the normal
operation of the process, which play an important role in
increasing the production target. The control effect has a
direct influence on the target of the level of mineral and the
recovery rate and so on. Therefore, it is needed to use an
advanced automatic control equipment and build an
advanced stable control system, then to achieve automatic
monitoring the level of liquid. The flotation worshop of
YUNNAN CHIHONG Huize zinc and germanium mineral
separation factory has been using the UDC3200 process
controller which manufactured by the Honeywell company,
and the system realizes the data transmission and remote
monitoring purpose through communication with the
S7-300 PLC.

2 THE COMPOSITION OF THE HARDWA-


RE SYSTEM Fig 1.The control network structure of the overall system
The liquid level monitoring configuration screen in the
In the flotation process control project of Huize mineral
central control room and touch screen control as shown in
separation factory, the S7-300 PLC is the controlling center
figure 2.
for controlling the system, it collects each status signal
which yield by liquid level controller and sends the
real-time control command. The PLC is the modbus 3 THE SYSTEM COMMUNICATION REA-
communication master station with configurable the LIZATION
module CP34 1 and Dongle[2]. The UDC3200 process
controller support two kinds of communication: Modbus 3.1 Modbus Protocol
RTU and Ethernet.This project chooses the Modbus for the Modbus, a kind of bus protocol, is the first real used in the
branch communication component. There are 34 UDC industrial field. Modbus supports a variety of electrical
process controllers, taking into account the factors of the interface, such as RS-232, the RS-485, etc. and can
communication lines and the number of station will affect transmission in various media, such as twisted-pair cable,
optical fiber, wireless and so on. Modbus protocol is the
application layer message transfer protocol on the 7th layer
Corresponding author: Shouming Zhang, Tel:+86-13033381981. of the OSI model, it provided client/server communication

978-1-4673-5534-6/13/$31.00 2013
c IEEE 3603
on connected different types of bus or network equipment. station imme- diately receive the data. The first frame of
There has two kinds of transfer mode in Modbus system: messages which send by the host station is the address
ASCII (American information exchange code) and RTU frame, and the address field is 1b. The slave device address
(remote terminal unit), each Modbus system can only use could be 0-247 (Dec). The subordinate station records the
one model, not combination[3]. The definition of the two address and determine to perform the function. To use the
kinds of modes shows on table 1 and table 2[4]. function code control to exchange data in Modbus system,
which is the 2nd byte of each transmitted communication
message frame. The master station send the request which
use the function code to tell slave-machine what to do; and
the subordinate station response the request, who return a
function code like the host sending which shows that the
subordinate station has response the master station and has
done the operation. The master station or the subordinate
station uses CRC-16 check method to distinguish the
receiving information. The error detection domain content
is obtained by detecting whether the message's content is
long or not. CRC domain attached to the messages' end,
added from low byte to high byte.

3.2 UDC3200 and CP341


The UDC3200 process controller contains infrared
configur- ation interface, general digital/analog input,
multiple signal output and mathematical algorithm and so
on, which provide accurate and reliable control for different
applications. In this example, the UDC3200 control the
number of the admission through contorlling the pneumatic
Fig 2. The liquid level monitoring configuration screen in the central valve which decided by the number of output analog which
control room and touch screen control generated by PID calculate the feedback singal got from
Table 1. ASCII mode detecting the liquid level, and then achieve a relative
stability liquid level in the floation slot.It sopports two
kinds fieldbus protocol: Modbus RTU and Ethernet 10
Base-TCP/IP. In this case, it chooses the way of connecting
the RS422/485 interface of CP341 module with UDC3200.
Table 2. RTU mode It can reach as many as 31 station if the line is short. The
request and the responsive message format of UDC3200
were shown in table 3 and table 4. The function code
14(Hex) is used to read the equipment general parameters,
and the subordinate station should be return the length and
The ASCII format stipulated that each of the 8 bytes as two content of the register data or the other messages.
ASCII character to transmit in the messages, and used The CP341 module is a serial communication module of
LRC(logical redundancy check)check the data.The SIEMENS S7-300/400 PLC, which hardware interface can
advanta- ges of this format is that the interval of the use RS232, TTY, RS422/485, software protocol have some
character's sending time can reach 1 second without kinds, such as Modbus Master/Slave, 3694(R), RK512 and
mistakes, and the disadvantage is that the communication ASCII. The RS422/485 which support Modbus RTU's
rate is slower than the RTU mode. The RTU format is remote terminal can communicat at most 1200m,and the
prescribed that every eight bytes contains two about 4 digit electrical in- terface is D type with 15 port. The S7-300/400
hexadecimal informa- tion in the messages, for the best use who used CP341 can exchange data with a variety of serial
of space of each bit, and improve the communication communic- ation equipment, such as simultaneous
efficiency. connection of mult- iple frequency converter or intelligent
This system uses the RTU transmission mode. The Modbus instrument, etc. This system choose the CP341 module with
RTU communication protocol uses the master-slave way to RS485 interface, and install the Dongle to drive software
transmit data. In the transmission process, the host station is protocol. To set the parameter, the Modbus bus
active role who send request message to the subordinate transportable rate and frame character structure in STEP7
station, and the subordinate return a response message. parameters tools.In this example , set the transportable rate
When the host station send data, all of the subordinate stati- at 9.6 Kbits/s; for the frame character, 1 bit for start byte, 8
on will receive the information, but only the proper address bit for data byte, 1 bit for even parity byte, and 1 bit for stop
station will response, so it is very important to distinguish byte;the electrical interace is half-duplex of RS485;the rest
the address. The Modbus protocol provide 3. 5 frame free is default settings. To set each subordinate station interface
time between two packets[5], and at the same time, all of must consistent with the host station.
the subordinate station should do the preparation for Table 3.the Format of request messages
receiving, once the master station has a packet, the slave

3604 2013 25th Chinese Control and Decision Conference (CCDC)


when a com- munication calls or the detect fault last for
more than 4 seconds, and then do the next calls until the
prarmeter address increased to 17. Initialize the parameter
address for 1, to finish the all polling.By this it can increase
the commun- ication efficiency of the whole Modbus
network. The practise of repairing equipment shows that
Table 4.the Format of responsive message the program can judge the fault subordinate station
correctly [9].
It is desigend for building data communication with 17
UDC3200 that to realize the circulating demand on the
Modbus RTU master inS7-300 PLC. To use the same data
source block DB202 storage the command which send from
PLC to all subordinate stations, and the data block DB203
storage the response message about the subordinate station.
It is possible that only to modify the corresponding device
The CP341 use the function block FB7"P_RCV_RK"to address, function code, data source address, data quantity
receive data and the FB8"P_SND_RK" to send data. In the and CRC check code about data block for different address
client program, there is a background data block in of liquid level controller. The sending function block FC21
FB7/FB8 which can be revised unconditionall and the way call FB8 to send data, and ask the DB200 to save the request
of sending or receiving data can be circulating or time messages. The receiving function block FC23 call FB7 to
driven[6]. FB8 is based on a rising edge for working: work receive data, and ask the DB201 to save the response
a time when meet a rising edge, then send a request packet message. The circulating interrupted block OB35 execute
to the bus. Therefore, a trigger code segment must be the command which is ordered by number increasing from
designed for constantly reset the parameters REQ of FB8 1-34 to complete the PLC polling. The program flow
between 0 and 1 to work normally in the program [2,7] . diagram is shown in figure 3.
The PLC collect each liquid level signal of floation tank in
3.3 Modbus RTU Communication Design and Achieve flotation process of the liquid level control system. The
It is worth to discuss the problem that how to effectively PLC as the Modbus host computer get the correct data
switching the subordinate station address which set for the which collected by the field instruments after the program
S7-300 PLC communicate with multiple subordinate operation. In this project, The monitoring data is
stations.From the design perspective,the commnication transmitted with industrial Ethernet which uninvolves
process is achieved by calling the function block FB7 and Modbus RTU salve protocol between the the S7-300 PLC
FB8 uninterrupted. About the project, for calling FB7 and and the central control room[10]. The following is the
FB8 34 times to write two groups of 17 communication reading and writing UDC3200 data program of STEP7
blocks which set the communication address by liquid level which follow the Modbus RTU protocol.
controller and then set this time regulation communication The reading program:
parameter, the next is to execute the 17 communication L "Slave_address1"
blocks circulating to realize uninterrupted communication T "SOURCE_DB(1)".Slave_address //Slave adress
in each group of liquid level controller. From the operation L W#16#3
mode of program to see that the structure of program is T "SOURCE_DB(1)".Function_code //Function Code
simple, the program parameter and process is clearly. But it L 0
was found that the process of carring out program is T "SOURCE_DB(1)".Reg_startadr //Starting Address
miscellaneous and the Modbus subordinate station response L 22 // LEN is only 22
time is longer than the time of executing each T "SOURCE_DB(1)".Reg_anzahl //reg_anzahl
communication program block which often only a few or UC "Execute Send Jobs(1)" //Call of FC for executing
dozens of milliseconds when PLC circulating carry out on SEND-Jobs
OB1, and the response time of each subordinate station is UC "Execute Receive Jobs(1)" //Call of FC for executing
between in hundreds of millisecond or a few seconds due to RCV –Jobs
the different actual situation (interference, cable impedance, The writting program:
etc) after the experiment[8]. If a communication block L "Slave_address1"
execute over but response not, it can cause the whole T "SOURCE_DB(1)".Slave_address //Slave adress
communication network error response when the next L 6
communication block is running, and then the whole T "SOURCE_DB(1)".Function_code //Function Code
communication process will be interrupt. L "SND6_Reg_address1"
T "SOURCE_DB(1)".Reg_startadr //Starting Address
Therefore, it calls a single block circulation to modify the
L "WriteREG1.V"
preset parameters of communication parameter configura-
T "SOURCE_DB(1)".Reg_anzahl //Modify Value
tion block for switching communication block address. To
UC "Execute Send Jobs(1)" //Call of FC for executing
test the end bit and the fault bit in the each of circulation. It
SEND-Jobs
can call a parameter-modify program to increase the
parame- ter address of the current communication block

2013 25th Chinese Control and Decision Conference (CCDC) 3605


The next repeat it when the last bit finished. The final value
of register is the value of CRC which have executed the
command of message[11].

4 Conclusion
In this project, it achieves stable communication between
the process controller and CP341 by the optimized design
based on Modbus protocol. Huize concentrator practice
shows that the set of level control and technical solutions
used in the flotation units fully able to meet the
technological requirements of the zinc germanium ore
flotation, equipment operation is reliable, accurate slurry
liquid level to ensure a good index of mineral separation.
The next step is to design a set of algorithms, completion of
the PID parameters self tuning in order to achieve more
excellent control effect.

REFERENCES
[1] Z.M. Shao and Y. Gao, Study and application of
process control system for flotation in copper conce-
ntrator, Mining & etallurgy,Vol.21,No.1, 2012.
[2] Siemens(China)Ltd., CP340/CP341/CP440/CP441
Communication and Programming, [Online] Available:
http://www.ad.siemens.com.cn/, 2005.
[3] Modbus Organization, Modbus application protocol
speci¿cation, [Online]. Available: http://www.modbus.org,
2006.
[4] Modbus Organization, Modbus over Serial Line
Fig 3. The program flow diagram Speci¿cation and Implementation Guide,
[Online].Available: http://www.modbus.org, 2006.
3.4 CRC Checking Realize [5] Y.P. Jang and H. Zhang, A Motor temperature measur-
It is very important to check message frame CRC for the ement system based on the Modbus RTU protocol Achieved
host station and the slave. The program of check CRC is the in the field of raw materials Jingtang, Metallurgical Industry
Automation, S2, 2010
prerequisite of the communication program operation
successful. The salve RTU station can correctly answer the [6] Honeywell International Inc., UDC3200 Universal Digital
Controller Product Manual, 2008.
request of the master and the master also receive data
correctly if the result of CRC checking. The CRC domain is [7] Siemens(China) Ltd. CP341 Modbus RTU Polling
MultiSlav- es, [Online] Available:
2 bytes, including 16 bit binary value. At first, the CRC call
http://www.ad.siemens.com.cn/, 2009.
the 16 bit register which filled with "1", then call a process
[8] H.F. You, Communication Between Single Chip Microco-
to deal the value of each register which is continuous 8 bit
mputer and Touch-Screen by Modbus, PC in industry contr-
in the message. Only the 8 bit of each character have a good ol, 63-65, 2008.
effective to CTC, not the start bit, not the end bit, not the [9] F. Xu, The application of Modbus protocol in Qujiang mine
parity bit. Every 8 bit character do a or operation with the gas power generation project ,Coal Engineering, 124- 126 ,
content of register when the CRC execute, and the result 2011.
move to the lowest effective bit with o filled in the highest [10] Q. Chen , Non-driver Application of Modbus Protocol in
effective bit. To test the LSB, if the result is 1, the register's S7-300, Computer Engineering, Vol.35, No.11, 254-259,
value deal or with the preset value; if 0, do nothing. The 2009.
whole process will repeat 8 times. [11] Y.H. Shi, J.W. Wu, S.J. Lian, H.B. Tang, The application of
Modbus RTU in the management system of boundary switch,
Smart grid and advanced power equipment Symposium
academic annual meeting, 2011.

3606 2013 25th Chinese Control and Decision Conference (CCDC)

You might also like