Вы находитесь на странице: 1из 6

ARTÍCULO NO.

XIII CONGRESO NACIONAL DE INGENIERÍA


ARTÍCULO ELECTROMECÁNICA Y DE SISTEMAS (XIII CNIES)

Analysis of the Ladder Diagram a Packaging


System with Petri Nets
J. Carlos Quezada, Joselito Medina and Ernesto Flores

 original program in LD. For switch contacts (normally open or


Abstract. — Control of manufacturing systems and discrete- normally closed) two arcs are proposed: enabled arc and
event processes, having as main control device a Programmable inhibitor arc; for coils it is added an inhibitor arc from the
Logic Controller (PLC) where the control algorithm is developed output to the transition activating the coil, which is to prevent
on Ladder Diagram (LD), is considered. LD, standardized by
accumulating tokens at the output place. Regarding timers, it is
IEC-61131-3, is one of the most used languages in industry;
however, this is empirically developed and has no validation in proposed the use of two transitions and two buffer places, and
order to provide reliability and security to the processes which it their associated arcs to detect positive edge; besides, they
controls. Petri Nets (PN) have been used to analyze, model and require places and transitions to store the accumulated time
simulate basic structures of LDs. This paper analyzes a case study and provide the timer output. In [9], an approach for
of the ladder diagram to control a packaging system of two evaluating LDs and PNs methodologies, transforming them to
weighing scales with a single-discharge duct.
IF-THEN type instructions, is proposed; showing mainly the
Index Terms — Control Algorithm, Ladder Diagram, Petri logic gates AND and OR in both methodologies. In [10], the
Nets, Programmable Logic Controller. authors propose the union and distribution in PN, equivalent to
logic gates AND and OR. This article proposes a PNLD for
I. INTRODUCTION (INTRODUCCIÓN) the case study in particular packaging system with two
weighing scales and a single-discharge duct.
C ontrol algorithms developed by users in industry are not
based on formal theories to perform their simulation
and/or validation in order to ensure their quality be-fore being II. LADDER DIAGRAM
implemented on a Programmable Logic Controller (PLC) for Nowadays, safety in control is one of the most important
processes control. These algorithms are developed based on topics currently studied on the design and development of
experience of programmers or engineers who are responsible automated production systems [11]. PLCs still remain the most
of operation, maintenance and upgrade of the industrial widely used devices in industry for controlling discrete
process control system [1],[2]. Petri Nets (PN) [3],[4],[5] have processes or Discrete-Event Control Systems (DECS),
been used for analysis, simulation and validation of Discrete- dominating modern automated industry due to their robustness
Event Systems (DES), and these are a powerful mathematical and relatively low cost [1]. PLCs are a special type of
formalism with an attractive graphical representation, suitable computer, as shown in Fig. 1, which are used in industry on
for modeling and analyzing DES [6]. safety-critical applications. The purpose of a PLC is to control
Ladder Diagram (LD) is one of the five languages specified by a particular process or a set of processes through generating
the international standard IEC-61131-3 for PLCs [7], and electrical control signals in response to electrical input signals
several papers have reported conversions or transformations coming from the process. In 2003, the International Electro-
from LD to PN for analysis. In [8] it is proposed the creation technical Commission (IEC) standardized the programming
of PN cores equivalent to LD cores and later the synthesis of languages that are mainly implemented on PLCs, through the
the PN in order to generate another PN corresponding to the international standard IEC-61131-3 which specifies the syntax
and semantics of those languages. The standard IEC 61131-3
proposes five programming languages, namely: Ladder
José Carlos Quezada Quezada received the M. S. degree in Mechatronics
Engineering from Tecnológico de Estudios Superiores de Ecatepec, Estado de Diagram (LD), Function Block Diagram (FBD), Structured
México, Mexico, in 2008 (jcarlos@uaeh.edu.mx). Text (ST), Instruction List (IL), and Sequential Function Chart
Joselito M. Medina Marin received the Ph.D. degree in electrical (SFC) [7]. This paper focuses on the analysis of a control
engineering from Centro de Investigación y de Estudios Avanzados del
Instituto Politécnico Nacional (CINVESTAV-IPN), México City, México, in algorithm developed on LD.
2005 (jmedina@uaeh.edu.mx). LD allows modeling networks of electromechanical
Ernesto Flores García received his Ph.D. degree in Automatic Control elements operating simultaneously, such as relay contacts and
from Centro de Investigación y de Estudios Avanzados del Instituto
Politécnico Nacional (CINVESTAV-IPN), México City, México, in 2011 coils, timers and counters, mainly.
(efloresg@uaeh.edu.mx).
MÉXICO, D.F., MÉXICO, NOVIEMBRE 2012 1
ARTÍCULO NO. XIII CONGRESO NACIONAL DE INGENIERÍA
ARTÍCULO ELECTROMECÁNICA Y DE SISTEMAS (XIII CNIES)

TABLE I. PETRI NET DEFINITION


A Petri net is a 5-tuple, PN  {P, T , F , W , M 0 } where:
P  { p1 , p 2 ,..., p m } is a finite set of places,
T  {t1 , t 2 ,..., t n } is a finite set of transitions,
F  ( P  T )  (T  P) is a set of arcs,
W : F  {1,2,...} is a weight function,
M 0 : P  {0,1,2,...} is the initial marking,
P T   and P T   .
Fig. 1. Block diagram of a PLC.

The code structure on LD is developed by using graphic A. Dynamical Behavior


symbols of the electro-mechanical elements, confined at left In modeling, by using the concept of conditions and events,
and right by lines symbolizing the negative and positive of the places represent conditions and transitions represent events.
system power; these elements can be interconnected An event has a certain number of input and output places
horizontally (in series), or vertically (in parallel), ending the representing the pre-condition and post-condition of the event,
line with a coil-type symbol. The electromechanical elements respectively.
can only have two states, off or on, which correspond to the The behavior of many systems can be described in terms of
Boolean values 0 or 1, respectively. To this work, the initial systems states and their changes. With the aim of simulate the
marking of the PN consider the contacts if they are able to pass dynamical behavior of a system, a state or marking in a PN is
energy or not, and if the coils are energized or not. changed according to the following transition rule (trigger):
a) A transition t is enabled if each input place p of t is
III. PETRI NETS marked with at least w(p,t) tokens; where w(p,t) is the arc
PN constitute a tool employed to mathematical and weight from p ∈ P to t ∈ T.
graphical modeling, and are used for describing and studying b) One enabled transition can be fired or not (depending on
information processing systems characterized as being if the current event occurs).
concurrent, asynchronous, distributed, parallel, non- c) Firing an enabled transition t removes the tokens w(p,t)
deterministic, or stochastic. As a graphical tool, PN can be from each input place p of t, and adds w(p,t) tokens to
used as a communication visual aid, in a similar way to flow, each output place p of t; where w(p,t) is the arc weight
block and network diagrams. On the other hand, as a from t ∈ T to p ∈ P.
mathematical tool, PN are used to define state and algebraic B. Petri Nets - Ladder Diagram
equations, as well as other mathematical models employed to
TABLE II. DEFINITION PNLD
represent the systems’ behavior. In addition, markings are used
A PNLD is a 5-tuple PNLD  {P, T , F ,W , M 0 } , where:
to keep the state in the nets places, allowing simulate the
dynamics and concurrent tasks of systems [12]. An advantage P  {I  Q  M  Ti  pa} is a finite set of places, where:
of PN is they allow the mechanisms of DES to be represented, I  {I m | I m  physical inputs};
such as sequential execution, decision making, concurrency,
Q  {Qn | Qn  physical outputs};
synchronization, grouping and inhibition.
A PN is a particular type of directed graph with an initial M  {M o | M o  internal memory};
state called initial marking, M0 . The underlying graph N of the Ti  {Ti p | Ti p  auxiliary places to timed transitions};
PN is directed, weighted and divided into two type of nodes,
pa  { paq | paq  auxiliaryplaces to distributive transitions}.
namely places and transitions, where the arcs join up the
places to the transitions, or conversely. Places are graphically
T  {t  t m'  ta} is a finite set of transitions, where:
represented as circles, whereas transitions as bars or
rectangular boxes. Arcs are labeled with their weights (positive t  {t r | t r  transitions},
'
integers), where a k-weighted arc can be interpreted as a set of t m  {t r' | t r'  transitions to self - loop}, and
k-parallel arcs. Labels for arcs with unit weight, called
ta  {tar | tar  auxiliary transitions}.
ordinary PN, are usually omitted. A mark (state) assigns a
nonnegative integer to each place. If a mark assigns a t  {1,2,...,r}; t m'  {1,2,...,s}; ta  {1,2,...,v}.
nonnegative integer k to a place p, it is said that p is marked F  P  T   T  P
; is a set of arcs.
with k-tokens. A marking is denoted by M and constituted by
its m-vectors, where m is the number of places. The W : F  {1} all arc weights are equal to 1,
component p of M, denoted M(p), is the number of tokens in a M 0  P  {0,1} ; where: 0 close circuit and, 1 open circuit.
place p. Table I shows the formal definition of a PN [12].
MÉXICO, D.F., MÉXICO, NOVIEMBRE 2012 2
ARTÍCULO NO. XIII CONGRESO NACIONAL DE INGENIERÍA
ARTÍCULO ELECTROMECÁNICA Y DE SISTEMAS (XIII CNIES)

The Table II shows the definition of Petri Net–Ladder zuncho


Diagram PNLD, proposed for the analysis of LD to control a %I2 S_ZUNCHO I2 Zuncho sensor
%I3 S_CHAP_B1 I3 Bottom cover sensor scale one
packaging system. %I4 S_CHAP_B2 I4 Bottom cover sensor scale two
%I5 PB_DESC_B1 I5 Pushbutton unloading scale one
C. Relationship between PN and LD
%I6 SEL_AUT_B2 I6 Automatic selection of scale two
Table III shows the correlation between LD and PN %I7 SEL_AUT_B1 I7 Automatic selection of scale one
methods used for diagram transformations of study case. LD %I8 SEL_FUNC_B1 I8 Selector operation of scale one
%I9 S_GRUE_B1 I9 Weight wide sensor of scale one
contains the Boolean logic AND (1) and OR (2) gates,
%I10 S_FINA_B1 I10 Weight fine sensor of scale one
whereas its equivalent PN is a synchronization and a group, %I11 PB_DESC_B2 I11 Pushbutton unloading scale two
respectively. Al-so, LD has interlocks (3) with their respective %I12 SEL_FUNC_B2 I12 Selector operation of scale two
transformation to PN as a self-loop, as well as timers (4) in %I13 S_GRUE_B2 I13 Weight wide sensor of scale two
both methodologies. %I14 S_FINA_B2 I14 Weight fine sensor of scale two
%I15 BANEX_FUNC I15 Belt in operation
%I16 ALIM_127VCA I16 Energy on
TABLE III. RELATIONSHIP PN-LD %Q1 V_ZUNCHO Q1 Valve of the zuncho
LD PN %Q2 V_CHAP_B1 Q2 Valve of bottom cover scale one
1 IN IN IN n OUT IN 1 OUT 1 %Q3 V_PGRU_B1 Q3 Valve piston weight wide scale
1 2 1 IN 2 one
%Q4 V_PFIN_B1 Q4 Valve piston weight fine scale
IN n
one
2 IN OUT %Q5 V_PALR_B1 Q5 Valve piston high performance
1 1
IN 1 OUT scale one
IN IN 2
1 %Q6 V_CHAP_B2 Q6 Valve of bottom cover scale two
2 %Q7 V_PFIN_B2 Q7 Valve piston weight fine scale
IN n
IN n two
%Q8 V_PGRU_B2 Q8 Valve piston weight wide scale
two
3 IN 1 IN 2 IN n OUT p aux t aux %Q9 V_PALR_B2 Q9 Valve piston high performance
1 1 1 scale two
IN 1
%Q10 XL_B2 Q10 Filling light scale two
IN 2
%Q11 XL_B1 Q11 Filling light scale one
OUT IN n OUT 1 %M1 P_SISTEMA M1 System permissive
1 %M2 P_ZUNCHO M2 Zuncho permissive
4 %M3 F_AUT_ZUNCH M3 Automatic system
IN OUT
1 Time %M4 P_B1 M4 Scale one permissive
T OUT
%R T %M5 P_B2 M5 Scale two permissive
Rese IN 1
t %M6 P_APER_B1 M6 Opening scale one permissive
%M7 PESO_B1 M7 Complete weight scale one
Time %M8 P_APER_B2 M8 Opening scale two permissive
%M9 ENC_PF_B2 M9 Latch fine piston of scale two
%M10 PESO_B2 M10 Complete weight scale two
D. Employed Software and Hardware %M11 ENC_PG_B2 M11 Latch wide piston of scale two
%M12 ENC_PF_B1 M12 Latch fine piston of scale one
The control algorithm in LD was developed in Proficy %M13 ENC_PG_B1 M13 Latch wide piston of scale one
Machine Edition and the PNLD in Cimplicity HMI, and PLC %R30 TON_0 pt0 Opening time of the zuncho
series 90-30, all brand GEFanuc. %R35 TON_1 pt1 Opening time bottom cover
scale one
%R40 TON_2 pt2 Opening time piston high
IV. CASE STUDY performance scale one
This paper analyzes the control algorithm of a bag filling %R45 TON_3 pt3 Opening time bottom cover
scale two
system through a single-discharge duct and two weighing
%R50 TON_4 pt4 Opening time piston high
scales or bascule (see Fig. 2). Each scale has its operation performance scale two
selector, as well as its sensors for coarse weighing (to 45 Kg.)
and fine weighing (50 Kg.). By analyzing the LD, it is
determined the system has physical digital inputs and outputs A. Ladder diagram of packaging systems
denoted by I and Q, respectively; internal memories having The LD of packaging system is shown in Fig. 3 and 4. Its
contacts in the LD, defined by M and timers by T. Table IV control algorithm involves general protections and the
presents the items’ correlation with the PNLD. possibility of working the packaging system with a single
scale, by turning off the corresponding operating selector. It is
TABLE IV. ADDRESS RELATIONSHIP PN-LD also possible to download manually the scales, existing cross-
Address Tag Place Description contacts used in the sequence to determine that the scale to
%I1 PB_ZUNCHO I1 Pushbutton opening manual
MÉXICO, D.F., MÉXICO, NOVIEMBRE 2012 3
ARTÍCULO NO. XIII CONGRESO NACIONAL DE INGENIERÍA
ARTÍCULO ELECTROMECÁNICA Y DE SISTEMAS (XIII CNIES)

download is the first having gotten its corresponding weight.


Timers are used for the time that the zuncho must be closed,
while some scale is being downloaded; that is to say, the time
that the gate bottom must be open, and the time to give
mechanical stability to each scale.

Fig. 2. Packaging system.

With the selectors in working position the operating


sequence of the overall system is as follows: both scales are
beginning to fill, if weight wide sensor is activated then the
valve piston weight wide is actuated, reducing the flow of
product which is filling corresponding scale. If weight fine
sensor is activated then the valve piston weight fine is
activated, obstructing the flow of product into the
corresponding scale. If the system is in automatic and there is
bag in the discharge duct activating zuncho sensor when is
activated the valve of bottom cover, discharged the scale
which was first filled, and so on until the system conditions
change.

Fig. 4. LD packaging system, part two.


B. Simulation PNLD
The following considerations are for the analysis of PNLD
packaging system, based on the principle of operation of the
Fig. 3. LD packaging system, part one. PLC and the initial conditions (electrical signals) for control
and system operation.
MÉXICO, D.F., MÉXICO, NOVIEMBRE 2012 4
ARTÍCULO NO. XIII CONGRESO NACIONAL DE INGENIERÍA
ARTÍCULO ELECTROMECÁNICA Y DE SISTEMAS (XIII CNIES)

1. In each PLC scan cycle it is generated an snapshot of the Later, making a snapshot of the conditions that keep the output
input signals’ conditions, wherewith control algorithm is signals (coils) and transferring them to the corresponding
evaluated on PLC and on PN, in order to prevent the output modules.
accumulation of markings when tested with the created image.

Fig. 5. PNLD of packaging systems


MÉXICO, D.F., MÉXICO, NOVIEMBRE 2012 5
ARTÍCULO NO. XIII CONGRESO NACIONAL DE INGENIERÍA
ARTÍCULO ELECTROMECÁNICA Y DE SISTEMAS (XIII CNIES)

2. Whereas the system is physically sequential, ie; [11] José Mendes, José Creissac, Filomena Soares, Celina Pinto, Jaime
Ferreira, Simulation and Formal Verification of Industrial Systems
a. Automatic systems and both scales in operation (I6, I7, Controllers, ABCM Symposium Series in Mechatronics, Vol. 3, pp.
I8, I12, I15, I16), 461-470, 2008.
b. Bottom cover sensor scale's (I3, I4), [12] Murata, Petri Nets: Properties, Analysis and Applications, Proceedings
c. Valve of bottom cover scale's (Q2, Q6), of the IEEE, 1989.

d. Weight wide sensor's (I9, I13),


VII. BIOGRAPHIES
e. Valve piston weight wide scale's (Q3, Q8),
f. Weight fine sensor's (I10, I14),
g. Valve piston weight fine scale's (Q4, Q7),
h. Zuncho sensor (I2), José Carlos Quezada Quezada received the M. S.
degree in Mechatronics Engineering from
i. Valve zuncho (Q1), Tecnológico de Estudios Superiores de Ecatepec,
j. Valve piston high performance scale's (Q5, Q9 Estado de México, Mexico, in 2008 and his title of
Electronic Engineering at the Technological Institute
V. CONCLUSIONS of Lázaro Cárdenas, Michoacán , Mexico, in 1992.
He has worked in Fertilizantes Mexicanos S.A. de
The PNLD allows transforming control algorithms C.V., CFE, SICARTSA and Fertinal. He is currently
developed on LD, including basic Boolean functions and self- Research Professor of the high school of Tizayuca, Hgo. where its main
loops to PN, for modeling and simulation of the control interest is on process automation by means of PLC, PAC and HMI.
system, allowing detecting errors in the control or excessive
repetition of physical signals in the control algorithm.
Petri nets allow the analysis of systems by reducing
complexity sections. For the packaging system may be when Joselito Medina-Marin. He received the M.S. and
the systems working with a single scale. Ph.D. degrees in electrical engineering from the
Future work considers the application of mathematical tools Research and Advanced Studies Center of the
National Polytechnic Institute at Mexico, in 2002
for optimization and simulation of dynamical behavior with and 2005, respectively. Currently, he is a Professor
human machine interface of the PNLD to reduce code and of the Advanced Research in Industrial Engineering
streamline the packaging system. Center at the Autonomous University of Hidalgo
State at Pachuca, Hidalgo, México. His current
research interests include Petri net theory and its applications, active
VI. REFERENCES databases, simulation, and programming languages.

[1] Sammy Korotkin, Guy Zaidner, Benny Cohen, Amir Ellenbogen, Meir
Arad and Yosef Cohen, A Petri Net Formal Design Methodology for
Discrete-Event Control of Industrial Automated Systems, IEEE 26-th Ernesto Flores obtained his MSc and PhD in
Convention of Electrical and Electronics Engineers in Israel, 2010. Automatic Control specialty from the CINVESTAV-
[2] Karl-Heinz John, Micahel Tiegelkamp, IEC 61131-3: Programming IPN of México City, México. He received his
Industrial Automation Systems, Second Edition, Springer, 2010. Engineer degree in Aeronautics from the IPN of
[3] Marius Kloetzer, Cristian Mahulea, Calin Belta, and Manuel Silva, An México. Dr. Flores has worked as a university
Automated Framework for Formal Verification of Timed Continuous researcher professor in areas such as Control Theory
Petri Nets, IEEE Transaction on Industrial Informatics, 2010. and Mathematics, mainly. His research interests
[4] Adamo Castelnuovo, Luca Ferrarini, Senior Member, IEEE, and Luigi include Electromechanical Systems Control,
Piroddi, An Incremental Petri Net-Based Approach to the Modeling of Servomechanisms, Robotics, among others.
Production Sequences in Manufacturing Systems, IEEE Transactions on
Automation Science and Engineering, 2007.
[5] Bani Younis, M., Frey, G., Formalization of existing PLC Programs: A
Survey. Proceedings of CESA 2003.
[6] W. Bolton, Programmable Logic Controller, 4th Edition, Elsevier Ltd.,
2009.
[7] International Electrotechnical Commission, Programmable Controller -
Part 3: Programming Languages, Edition 2.0, 2003.
[8] J. Lee and J.S. Lee, Conversion of Ladder Diagram to Petri Net Using
Module Synthesis Technique, International Journal of Modeling and
Simulation, Vol. 29, No. 1, 2009.
[9] J.S. Lee and P.L. Hsu, An improved evaluation of ladder logic and Petri
nets for the sequence controller design in manufacturing systems,
International Journal Advance Manufacture Technologic, pp. 279-287
2004.
[10] T. Suesut, P. Inban, P. Nilas, P. Rerngreun and S. Gulphanich,
Interpretation Petri Net Model to IEC 1131-3: LD for Programmable
Logic Controller, Proceedings of the 2004 IEEE Conference on Robotic,
Automation and Mechatronics, December 2004.

MÉXICO, D.F., MÉXICO, NOVIEMBRE 2012 6

Вам также может понравиться