Int J Adv Manuf Technol (1998) 14:716-728 © 1998 Springer-Verlag London Limited The Intemational Journal of Rdvanced manufacturing Technologu Discrete Event Control System Design Using Automation Petri Nets and their Ladder Diagram Implementation M. Uzam* and A. H. Jones:~ *Nigde klniversitesi, Mtihendislik-Mimarlik Faktiltesi, Elektrik-Elektronik Mtihendisligi B61timti, Nigde, Turkey; and ;Intelligent Machinery Division, Teltbrd Research Institute, Research and Graduate College, University of Salford, Salford, UK As automated manufacturing systems become more complex, the need f o r an effective design tool to produce both highlevel discrete event control systems (DECS) and low-level implementations becomes more important. Petri nets represent the most effective method f o r both the design and implementation of DECSs. In this paper, automation Petri nets (APN) are introduced to provide a new method f o r the design and implementation of DECSs. The APN is particularly well suited to multiproduct systems and provides a more effective solution than Grafcet in this context. Since ordinary Petri nets do not deal with sensors and actuators of DECSs, the Petri net concepts are extended, by including actions and sensor readings as formal structures within the APN. Moreover, enabling and inhibitor arcs, which can enable or disable transitions through the use of leading-edge, falling-edge and level o f markings, are also introduced. In this paper, the methodology is explained by considering a fundamental APN structure. The conversion o f APNs into the I E C t t 3 1 - 3 ladder diagrams (LD) f o r implementation on a PLC is also explained by using the token passing logic (TPL) concept. Finall); an illustrative example of how APNs can be applied to a discrete manufacturing problem is described in detail. Keywords: Automated manufacturing systems; Discrete event control systems; IEC1131-3 standard; Petri nets; Programmable logic controllers; Real-time implementation 1. Introduction In today's automated modern factories, programmable logic controllers (PLCs) have emerged as the mainstay in the execution of automation tasks. Their selection for discrete event control tasks is due to their low cost, ruggedness and ease of programming. Indeed, the majority of PLCs can be programmed in a graphical symbolic language called ladder logic, which is Correspondence and offprint requests to: Dr M. Uzam, Nigde Universitesi, Mtihendislik-Mimarlik Faktiltesi, Elektrik-Elektronik Miihendisligi B61iimii, 51100 Nigde, Turkey. E-mail: murat-uzam@hotmail.com known to be very difficult to debug. This is particularly true, when developing complex control systems involving multiproducts and parallel tasks which interact periodically. The ladder logic programming language offers little in the way of structural constructs to deal with the problem. However, this problem has been recognised, and Grafcet, a structured approach to the design of sequential control systems, which makes use of interpreted Petri nets, has emerged [1]. Grafcet is a graphical programming language, which is growing in popularity. The technique facilitates the design of concurrent interacting tasks and has become an international standard. Simple systems in which only one token can exist at a step can be described by using Grafcet. Therefore, Grafcet techniques are powerful, but they do not contain all the power and flexibility of the originating Petri nets. Moreover, many industrial users of PLCs still prefer to program PLCs in ladder diagrams using heuristic approaches [2]. For simple systems, it is easy to write down PLC programs by heuristic methods. However, as systems become more complex it becomes very difficult to handle the problem effectively. The difficult)' is compounded when multiproduct systems are considered. In fact, it is almost impossible to write down ladder logic programs for multiproduct systems (coloured systems) by using heuristic approaches. The complexity problem of heuristic ladder logic has long been recognised [3]. The most successful solutions to the problem have involved the use of Petri nets for the conceptual design. Because of the success of Petri net designs there have been some attempts to produce methods to convert Petri nets into ladder logic [4-9]. However, none of these methods have produced a technique that is general, in the sense that it can deal with timers, counters, coloured Petri nets and timed Petri nets. This has resulted in the exclusion of Petri net design methods from industrial practice. As manufacturing systems become more complex, the need for an effective automation tool to produce high-level discrete event control systems (DECS) becomes increasingly more important. Petri nets have appeared as the most promising tool to facilitate such design work. In this paper, automation Petri nets (APN) are proposed as a new method for the design and implementation of DECSs. Since ordinary Petri nets do not deal with sensors and actuators, the Petri net concepts are Discrete Event Control System Design extended, by including actions and sensor readings as formal structures within the APN. These extensions involve extending the Petri nets to accommodate impulse and level actions at places, and leading-edge, falling-edge, and level signals of sensors at transitions. Moreover, enabling and inhibitor arcs, which can enable and disable transitions through the use of leading-edge, falling-edge and level-off markings, are also introduced. For real-time implementation of the APNs the recently introduced token passing logic (TPL) concept [10] is used. The TPL methodology bridges the gap between APNs and their real-time implementations. The technique is powerful and yet simple to both understand and implement. Moreover, the technique has also been extended to deal with P-timed Petri nets [10,11], T-timed Petri nets [12], and coloured Petri nets [13-15]. The TPL methodology has also been developed to embrace statement lists [16,17]. An attempt to introduce a Petri net based formal controller is made in [18]. This is followed by [19], in which the IECl131-3 standard is considered for possible implementations of APNs using instruction list (IL) code. In this paper, the TPL methodology is extended to embrace the I E C l l 3 1 - 3 ladder diagram (LD) standard. The programming standard is part 3 of the IEC Standard 1131 for Programmable Controllers [20]. It reached the status of an International Standard in August 1992 [21]. The textual and graphical languages defined in the standard are a strong basis for powerful PLC programming environments. In order to make the standard suitable for a wide range of applications, five languages have been defined in total. IEC 1131-3 describes the following programming languages [22]. Graphical Languages 1. Sequential function chart (SFC). 2. Ladder diagram (LD). 3. Function block diagram (FBD). Textual languages 1. Instruction list (IL). 2. Structured text (ST). 717 the addition of sensor readings as firing conditions at transitions, and both the impulse and level control of actuators. In addition, it is also explained how to implement the resulting controller in the IEC1131-3 ladder diagram (LD) code. Finally, an illustrative example is used to show how APNs can be applied for the control of DESs, by considering a discrete event manufacturing system. 2. Automation Petri Nets A typical discrete event control system (DECS) is shown in Figure l(a). It consists of a discrete event system (DES), to be controlled and a discrete event controller (DEC). Sensor readings are regarded as inputs from the DES to the DEC, and control actions are considered as outputs from the DEC to the DES. The main function of the DEC is to supervise the desired DES operation and to avoid forbidden operations. To do this, the DEC processes the sensor readings, and then it forces the DES to conform to the desired specifications through control actions. Nowadays, PLCs are the most popular implementation tools for this type of DECs. Petri nets can be used to design such DECs. However, ordinary Petfi nets do not deal with actuators or sensors. Because of this, it is necessary to define a Petri net-based controller (automation Petri net, APN) which can embrace both actuators and sensors within an extended Petri net framework. An APN is shown in Fig. l(b). In the APN, sensor readings can be used as firing conditions at transitions. The presence or absence of sensor readings can be used in conjunction with the extended Petri net preconditions to fire transitions. In the APN, two types of actuation can be considered, namely impulse actions and level actions. Actions are associated with places. With these additional features, it is possible to design discrete event control systems. Figure l(c) shows how an APN can be used as a DEC in a DECS. Formally, an APN can be defined as follows: APN = (P, T, Pre, Post, In, En, X, Q, Mo) (1) Where, Because ordinary Petri nets have not been proposed for the design and implementation of DECSs, the purpose of this paper is to establish a set of additional features for ordinary Petri nets which facilitate their application to DECS through P 3 ' (a) T = {tl, t2, ..., tin} is a finite, non-empty set of transitions, P U T ~ O a n d P f) T = O . P3 .f "©:"Q1 P6 ~,,...~ A(yp~ml I 8Ctior~ ' P = {P~, Pz, ..., Pn} is a finite, non-empty set of places. " P6 ~,,, (b) 1 actions ~[ System (DES) (c) I Fig. 1. (a) A typical discrete event control system. (b) Automation Petri net (APN). (c) APN as a controller in a DECS. 718 M. Uzam and A. H. Jones Pre: ( P x 7) ---, N is an input function that defines directed ordinary arcs from places to transitions, where N is a set of non-negative integers. Post: (T× P) ~ N is an output function that defines directed ordinary arcs from transitions to places. In: (P x T) ---, N is an inhibitor input function that defines inhibitor arcs from places to transitions. En: (P x 7) --~ N is an enabling input function that defines enabling arcs from places to transitions. × = {x~, x2, ..., xm} is a finite, non-empty set of firing conditions associated with the transitions. Q = (q~, q2, -..... , %} is a finite set of actions that might be assigned to the places. Mo: P --' N is the initial marking. The APN consists of two types of nodes called places, represented by circles ((3), and transitions, represented by bars ( ). There are three types of arcs used in the APN, namely, ordinary arcs, represented by a directed arrow ( 4 ) , inhibitor arcs, represented by an arrow, whose end is a circle (--e), and finally enabling arcs, represented by a directed arrow, whose end is empty ( - - ~ ) . Weighted and directed ordinary arcs connect places to transitions and vice versa, whereas weighted enabling arcs and inhibitor arcs connect only places to transitions. Places represent the status of the system and transitions represent events. Each transition has a set of input and output places, which represent the precondition and postcondition of the transition. The actions (Q), assigned to the places, can be either impulse actions or level actions. Impulse actions are enabled at the instant when a token is deposited into the place, and level actions are enabled when there is a token(s) at the place. More than one action may be assigned to a place. Firing conditions in the APN are recognised as external events such as sensor readings. A firing condition, X, associated with a transition t, is a Boolean variable that can be 0, in which case related transition t is not allowed to fire, or it can be 1, in which case related transition t is allowed to fire if it is enabled. The marking of the APN is represented by the number of tokens in each place. Tokens are represented by black dots (*). Movement of tokens between places describes the evolution of the APN and is accomplished by the firing of the enabled transitions. The following rules are used to govern the flow of tokens: Enabling Rules: In the APN, there are five main rules which define whether a transition is enabled to fire. 1. If the input place of a transition t is connected to the transition with a directed ordinary arc, then transition t is said to be enabled when the input place p contains at least the number of tokens equal to the weight of the directed ordinary arc connecting p to t. This is shown in Fig. 2(a), where transition tl is enabled if there are two or more tokens in place p~. Therefore, transition t~ is enabled as the input place p~ contains three tokens and Pre(p~,h) = 2. 2. If the input place of a transition t is connected to the transition with an enabling arc, then transition t is said to be enabled when the input place p contains at least the number of tokens equal to the weight of the enabling arc connecting p to t. This is shown in Fig. 2(b), where transition h is enabled if there are two or more tokens in place Pl- Therefore, transition tl is enabled as the input place Pl contains three tokens and En(p~,t0 = 2. 3. If the input place p of a transition t is connected to the transition with a leading-edge (LE) enabling arc, then transition t is said to be enabled at the instant (T) when the number of tokens at the place becomes at least equal to the weight of the arc, provided that place p previously had fewer tokens than the weight of the arc. This is shown in Fig. 2(c), where, at the beginning, transition tl is not enabled; despite the fact that M(pl) = 3 and En(p~,fi) = ~2. Therefore, in order for the transition tl to be enabled, first the number of tokens at place p~ must be less than 2 (M(P0 < 2). Then, transition t~ is enabled at the instant (]) when the number of tokens at the place p~ becomes at least equal to2. 4. If the input place of a transition t is connected to the transition with an inhibitor arc, then transition t is said to be enabled when the input place p contains fewer tokens than the weight of the inhibitor arc connecting p to t. This is shown in Fig. 2(d), where transition h is enabled if there are fewer than 3 tokens in place p~. Therefore, transition t~ is enabled as the input place p~ contains 2 tokens and In(pt,t0 = 3. 5. If the input place p of a transition t is connected to the transition with a falling-edge (FE) inhibitor arc, then transition t is said to be enabled at the instant (1) when the number of tokens at the place becomes less than the weight of the arc, provided that place p previously had tokens at least equal to the weight of the arc. This is shown in Fig. 2(e), where, at the beginning, transition t~ is not enabled, despite the fact that M(P0 = 2 and Pre(p~,h) = 13. Therefore, in order for the transition t~ to be enabled, first the number of tokens at place pj must be equal to or more than 3 (M(p0 ~> 3). Then transition t~ is enabled at the instant (1) when the number of tokens at the place p~ becomes less than 3. In the case where a transition may have the mixture of these input arcs, the enabling rule for the transition must be analysed accordingly. Firing Rules: In the APN, an enabled transition t can or cannot fire depending on the external firing condition X of t. These firing conditions can be leading edge ('[), falling edge (1), positive level or zero level, of a sensor reading. Broadly speaking, a firing condition × may include more than one sensor reading with "AND", "OR" and "NOT" logical operators. When dealing with more than one sensor reading as firing conditions, the notions given in [23], related to conditions and events, can be applied, to deal with the logical operators of firing conditions. In the special case, where X = 1, transition t is always allowed to fire when it is enabled. When an enabled transition t fires, it removes from each input place p the number of tokens equal to the weight of the directed ordinary arc connecting p to t. It deposits, at the same time, in each output place p, the number of tokens equal to the weight of the directed arc connecting t to p. It should be noted that, the Discrete Event Control System Design (a) (b) 719 (e) p, Pl 3 2 tl ~ tl 21 tl °43 ~1 tl ,2() ) Fig. 2. Illustration of enabling rules in the APN. firing of an enabled transition t does not change the marking of the input places, which are connected to the transition t only by enabling or inhibitor arcs. APNs have a simpler way of dealing with timing requirements than the conventional P-timed and T-timed ordinary Petri net extensions. This is because the concept of token unavailability is not used within the APN paradigm. 3. Token Passing Logic In order to facilitate the conversion of an APN into an LD program, conforming to IECl131-3, the token passing logic (TPL) concept can be used. The prime feature of the TPL technique is that it facilitates the direct conversion of an APN into a generic form of control logic, which may be implemented with low-level languages such as ST, IL or LD, or with highlevel languages such as C or C++ [24]. This is achieved by adopting the Petri net concept of using tokens as the main mechanism for controlling the flow of the control logic. Hence, each place within the APN corresponds to a place within the TPL. The simulated movement of tokens is achieved by deploying memory words (16 bits) at each place in the TPL, whose capacity is equal to or greater than 1. The numbers stored at these memory words represent the number of tokens that might be at the place. These memory words are then increased and decreased to simulate token flow. Thus, each place within the APN has at least an associated memory word in TPL. The assignment of a memory word to an APN place is shown in Fig. 3(a). Finally, to complete the Petri net synergy, if the value stored in a memory word, associated with a place in the TPL, is non-zero and the firing condition of a (a) APN TPL P1 Place in APN with a capacity>= l () memory word1 (or counter1) place in TPL "v" with a capacity>= 1 )., PI ~ ) Pl memory bitl T Placein APN witha capacity= 1 Petri net-like transition associated with that place becomes true, then the memory word at the input place is decreased, and the memory word at the output place is increased. Note that it is also possible to use counters instead of memory words. In the case of single capacity places, the memory words can be replaced by memory bits. The assignment of a memory bit to an APN place is also shown in Fig. 3(b). The memory bits and words are used to make the enhanced TPL methodology compatible with the IEC 1131-3. In addition to counters and memory words, memory bits are used in the enhanced TPL methodology instead of flags. Moreover, enabling and inhibitor arcs, which can enable or disable transitions through the use of leading-edge (LE), falling-edge (FE) and level-off markings, are also introduced. An on delay timer can be readily used to model timed APNs. In essence, the APN places are represented by places in TPL, and the APN tokens are represented by the numbers in separate memory words (or counters) at each logic place. Moreover, the flow of Petri net tokens is simulated by decreasing and increasing the memory words or similarly by setting and resetting the appropriate memory bits at the appropriate places. In APNs, actions are assigned to places, called action places. Transition firing conditions in APNs are logical functions of sensor states. In theory, the TPL methodology can cope with any number of tokens at an APN place. TPL provides a visual description of the control program. Furthermore, coloured automation Petri nets (CAPNs) can also be converted into generic control logic using this methodology, simply by assigning more than one memory word or memory bit to each place. It is believed that this technique provides a tool which is a simple, but sophisticated way of developing complex discrete event control systems. place in TPL w~h a capacity= 1 Fig. 3. APN places and equivalent TPL places. 4. Conversion of APNS to Ladder Diagrams via TPL In this section, an example of how APNs can be converted to LD for real-time implementation, is explained. The implementation is carried out by using a SIEMENS $7-200 PLC, which complies with IECl131-3. In this case, it is helpful to note that a memory word is represented by VW (variable memory word, read/write), a counter is represented by C, and a memory bit is represented by M (internal memory bit, read/write) [25]. To illustrate how APNs can be coded on a SIEMENS $7-200 PLC a "standard transition with an enabling arc" is considered. 720 M. Uzam and A. H. Jones A standard transition (tt) with an enabling arc in APN is shown in Fig. 4(a), where transition t, has two input places, Pl with M(p,) = 3 and Pre(p,,t,) = 1, and P3 with M(p3) -- 3 and En(p3,h) = 2 and has one output place, P2 with M(p2) = 0 and Post(h,p2) = 2. The firing condition of transition tl is X~ = ec This means that initially transition t, is enabled as M(p0 > 1 and M(p3) /> 2 and when the firing condition X~ is satisfied, transition t. fires by removing one token from place p~ and by depositing two tokens in place P2. Transition t2 has an output place, P3 with M(p3) = 3 and Post(t2,P3) = 1 and transition t3 has an input place, P3 with Pre(p3,t3) = 1. The firing condition of transition t2 is X2 = Y[3 and the firing condition of transition t3 is X3 = 1~. Because t2 has no input place, it is considered to be already enabled. When t2 fires, with a leading edge (1") of the sensor reading [3, it deposits pz 'coO k_J 5. APN Control of a Discrete Manufacturing System _t ovw / (c) init. . . . . ]/[ K3-tiN OUT ~C49 t.OVWl K3 IN o rl-OSl M0.0 ~--( 2 I0.0 C49 one token into place P3 and when t3 fires, with a falling edge (1) of the sensor reading 7 it removes one token from place P3The TPL, given in Fig. 4(b), is obtained by applying the TPL methodology to the APN. In this case, counters C49, C50 and C51 are assigned to places Pl, P2 and P3, respectively, to represent the tokens at the places. Sensor reading ~ is realised by input register I0.0, [3 is realised by I0.1 and -/ is realised by I0.2. In order to convert the TPL into LD code for implementation, a direct mapping is used from TPL to LD code by maintaining the enabling and firing rules. The resulting LD code, which complies with IECl131-3, is shown in Fig. 4(c). In rung 1, the initial marking of p,, M(p0=3, is deposited in C49 and M(p2)=3, is deposited in C51. Rung 2 represents the enabling and firing rules of transition fi, i.e. when M(p0 /> and M(p3) >-~ 2 and firing condition X~ = c~ is satisfied for fi, the count value of C49 is decreased by one and the value of 2 is added in counter C50. Rung 3 represents the enabling and firing rules of transition t2, when the firing condition X: is satisfied for t2, the count value of C51 is increased by one. Similarly, rung 4 represents the enabling and firing rules of transition t3, i.e. when the firing condition X3 is satisfied for t3, the count value of C51 is decreased by one. K1 C51 K2 / K1 S ) DEC w l - - ] [---1 > = I I---I > = I I - - f 4 ~ 9 EN IN OUT C49 To illustrate how APNs can be used for the design and implementation of a DEC for a DES in ladder diagrams, a discrete event manufacturing system is considered. In this case, the industrial control trainer (ICT), produced by Bytronics Associates, has been used. To achieve these goals the following steps are undertaken: The discrete manufacturing system is described together with the specifications. An APN model is designed for the manufacturing system, so that the specifications are met. The APN model is converted into a token passing logic (TPL). The IEC1131-3 ladder diagram (LD) for implementation on a PLC is obtained by using a direct mapping from the TPL into LD. 5.1 ra t-IN1 3,0.1 - - ] [ .... I P I 410 ---] [---I N I c501IN2 oUTt- c,0 [ ENINC-W / c51-~ IN o u T [ - c 5 1 / E~Ec- C51-t IN OUT ~- C51 Fig. 4. (a) Standard transition with enabling arc in APN. (b) Its TPL equivalent. (c) IEC 1131-3 LD for the TPL. Discrete Manufacturing System / The discrete manufacturing system, shown in Fig. 5 represents a component sorting, assembly and inspection processes that can be controlled by virtually any PLC. The upper conveyor and the lower conveyor are driven by the upper conveyor motor (actuator 1) and the lower conveyor motor (actuator 2), respectively. A random selection of metallic pegs and plastic rings are placed on the upper conveyor. The rings and pegs need to be identified and separated. This is done by two sensors, a proximity sensor (sensor 1) and an infra-red reflective sensor (sensor 2). By using these two sensors a distinction can be made between the peg and the ring. By means of the sort solenoid (actuato r 3), plastic rings can be ejected down the assembly chute, which can accommodate five rings at most. Discrete Event Control System Design 721 " Bytronie Associates Industrial Control Trainer OCT) Siemens PLC ( S7-200 ) Personal Computer Fig. 5. Discrete manufacturing system, Metallic pegs, meanwhile, continue on the upper conveyor and are deflected down the feeder chute. The feeder chute automatically feeds pegs onto the lower conveyor. An infrared emitter/detector (sensor 3) is used to determine whether or not the assembly area is empty. If it is empty, the assembly solenoid (actuator 4) is used to dispense a ring from the assembly chute into the assembly area. The assembly area is positioned just above the lower conveyor and, when a metallic peg passes, the peg engages with the hole in the ring and the two components are assembled. The lower conveyor is used to carry pegs and assembled components into the inspection area. At the beginning of the inspection area there are two sensors, sensor 4 and sensor 5, which are used to distinguish between the pegs and assembled components. At the end of the inspection area, sensor 6 detects the presence of any component (peg or assembled component), and there is a reject solenoid (actuator 4) which is used to eject the pegs into the scrap bin for pegs. Meanwhile, assembled components are carried into the collection tray by the lower conveyor belt. A Siemens PLC ($7 - 200) is used to control the process, and a PC-based package is used to program the PLC in LD code, which conforms to IEC 1131-3 [25]. PLC input~s and outputs are given in Tables 1 and 2. The specifications are listed as follows: Spec. 1. If the system is switched on, then run the upper conveyor. Spec. 2. If there is capacity in the assembly chute, then put rings into the assembly chute. Table 1. PLC Inputs Sensor number Definition IO.O 1 IO,1 I0.2 I0.5 2 3 4 I0.6 5 I0.7 6 Detects a ring or a peg at sort area Detects a peg at sort area Detects a ring in assembly area Detects an assembly in inspection area Detects a ring or an assembly in inspection area Detects a ring or an assembly in front of reject solenoid 722 M. Uzam and A. H. Jones Table 2. PLC outputs Actuatornumber Definition Q0.0 Q0.1 Q0.2 Q0.3 Q0.4 1 2 3 4 5 Upper conveyor motor Lower conveyor motor Sort solenoid Assembly solenoid Reject solenoid Spec. 3. If there is a ring(s) in the assembly chute and the assembly area is empty, then put a ring into the assembly area. Spec. 4. /f there is an unassembled peg on the lower conveyor, then put it into the scrap bin. If" there is one or more pegs on the lower conveyor, then operate the lower conveyor. Spec. 6. If the assembly chute is full, then let the rings on Spec. 5. the upper conveyor go to scrap bin. Spec. Z Record the number of rings and pegs in the scrap bins as well as number of complete assemblies in the collection tray. 5.2 The APN Model for the Control of the Manufacturing System The APN model, designed for the control of the discrete manufacturing system, is shown in Fig. 6. In the APN model, there are 26 places (Pso, Pso2, P~il, P~,2, Psi3, Psi4, Pl, P2, ---, P2o) and there are 24 transitions (tl, t2, ..., t24). The model is split up into seven modules: module 1 - upper conveyor motor; module 2 - sort solenoid; module 3 - assembly solenoid; module 4 - reject solenoid; module 5 - lower conveyor motor; module 6 - assembly process; and module 7 - inspection process. Initially, the conveyor motors and the solenoids are off, and the assembly chute and the assembly area are empty. At the beginning of the design process, the modules do not have any enabling or inhibitor arcs in or between modules. These arcs are added in the design process by considering the specifications and converting these specifications into the appropriate enabling or inhibitor arcs. Modules 1 to 5 represent actuators with on/off states. In module 6, the places are described as tbllows. Place p~ represents the assembly chute, which can contain up to five tokens, i.e. CAP(p~0 = 5. Place P~2 is used to represent the assembly area and place P13 stands for a time delay of 1.5 s, which is required for the assembly operation. Place P~o~ denotes rings and pegs on the upper conveyor coming towards the sort area, while place p~, represents the scrap bin for the rings. Place P~,a denotes assembled components on the lower conveyor. Place P14 represents a time delay of 5 s, which is required for a peg to travel from the upper conveyor to the lower conveyor. The transitions are described as follows: if there is a ring at the sort area, then it may be put either into the scrap bin (riO, or in the assembly chute (tla). If there is a ring(s) in the assembly chute, then it may be put into the assembly area (t13). If there is a ring in the assembly area then it may be used for the assembly operation through transition tl4 (with X~4 = J~I0.2). The assembly operation takes 1.5 s to complete. When this time has elapsed, the peg and the ring are assembled (tls). If the presence of a peg is detected at the sort area through transition fi6 (with X~6 = TIO.O and I0.1), it takes 5 s for the peg to travel down the lower conveyor. After this time has elapsed the peg is on the lower conveyor (tl7). In module 7, the places are described as follows: places P~6, P~7 and P~i3 represent pegs, and places P~s, Pl9, P2o and Psi4 represent complete assemblies. Place P~5 denotes the nmnber of pegs on the lower conveyor. Place Pso2 is used to represent the components on the lower conveyor, coming towards the inspection area. A peg at the inspection area is shown by place P16, while a peg in front of the reject solenoid is represented by place PI7. Psi3 is used to represent the scrap bin for pegs. An assembly at the inspection area is shown by place P~s, while an assembly in front of the reject solenoid is represented by place Pig. The time taken for assemblies to be conveyed from the inspection area into the collection tray is denoted by place P2o, which has a time delay of 2 s. Finally, place P~4 represents the collection tray for assembled components. The transitions are described as follows: if the presence of a peg is detected at the beginning of the inspection area through transition t~s (with X18 = I0.5 and TI0.6), then the peg is at the inspection area. The presence of a peg in front of the reject solenoid, detected through transition t19 (with X~9 = lI0.7), indicates the peg has moved from the inspection area to in fi'ont of the reject solenoid. When there is a peg in front of the reject solenoid, it may be put into the scrap bin (t2o) by the reject solenoid. If the presence of an assembly is detected at the beginning of the inspection area through transition t21 (with Xz~ = I0.5 and TI0.6), then the assembly is at the inspection area. The presence of an assembly in fl'ont of the reject solenoid is detected through transition t2~ (with Xzz = TI0.7), which indicates the assembly has moved from the inspection area to in front of the reject solenoid. When there is an assembly in front of the reject solenoid, it may be conveyed into the collection tray through transition t23 (with X23 = ~I0.7). It takes 2 s for an assembly to move into the collection tray. After this time has elapsed, the assembly is in the collection tray (t24). With this modular structure, the design process of the APN model is facilitated by taking the specifications and enforcing the specifications through either enabling or inhibitor arcs between appropriate modules. In the proceeding paragraphs, each specification is considered separately, and a description of how appropriate enabling or inhibitor arcs are added to the APN model is described. Specification 1. To let the upper conveyor run involves energising the upper conveyor motor in module 1. Place Pl and P2 represent the off and on states of the upper conveyor motor, respectively. When the manufacturing system is switched on, a token is put in place P2 and so the upper conveyor (level action, Q0.0) is enabled and vice versa. Specification 2. To put tings into the assembly chute involves energising the sort solenoid in module 2, where place P3 represents the off state and place P4 represents the on state of the sort solenoid. The sort solenoid is switched on through Discrete Event Control System Design Sinki Ipm Z-= ~IO.O&I-~.l / ~ Solirce, p,o, I X. ./ L-d__ . . . . . . . Ser4bin t,, 5 ~ .L / t16 , = D:. . . . a . . - - i i on upper conveyor coming towards the sort area i ! _ / Lra \ _ ~ ~ vower It" xrower i i i 2 2 ~ tl t2 - ~ F F : : ON ~ " /..~ - / 0 , -k: o.o On Upper conveyor motor .................................................................. 4,1 Asseml chute ~ I 0 . 0 &10.1 PiS • ~t, i p~ /'_'k i tl3 .... ~ t4 ~ &10.1 Assembly r Time delayfor 5see. area V~apeg totravd j / f r o m upper conveyor /hi ~.~ ~, ti4 0.5 see. On Sort solenoid ~--:27:22-22222222::221 ~,, @ 10.2 to lower conveyor Time delay ~ for assembly operation tit 1 tl~ Sink2 N.._ ! Assembled components On o n l o w e r oonveyor ..................... ~ m b ! ~ _ s . o J . ~ ! . d Module 7 insp~ ~ i area ~ ~ t2i " t23 0 _ .,L bl ~ ee. 2 "" anasse~ly in front of rejectsolenoid i / .............. .................................................................. P7 ..~/ ' -.' N Module 4 i i . .__ in collectiontray tz2 Module 3 u ~ ._ 1 on lower conveyor coming towards the inspection .~crapom ~. Sink3 , ' aarea rea/"~'~--~ i / a peg at a peg "~ for p e g s / ~ i / inspection area in front of t20"~ - silt . ] Source2 ~'~ 1 / . / / / ~ / Off , Na.s =~ I0.e 2:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: _ ~i ~Collectiontray i i " ]for assembled i ! /components i! ii Module 5 ./ un \ tg~-I tl0~'~ 1 [ Ni/.--~/ \ / P ~ Qo.1 ) pl5 i Fig. 6. The APN model designed for the control of the discrete manufacturing system. ! i i i i 723 724 M. Uzam and A, H. Jones transition t3, and occurs when a ring is detected at the sort area, i.e. TIO.O and IO. 1 and if there is enough space in the assembly chute , i.e. M(p~O < 5. This is realised by placing the ring detection as a firing condition to transition t3, i.e. X3 = TIO.O and IO.1 and by adding an inhibitor arc with weight 5 from place pt~ to transition t3, {In(plm,t3) -- 5}. The sort solenoid operation, carried out with a token in place P4, is realised by a timed level action (Q0.2) with a time delay of 0.5 s. Finally, switching off the sort solenoid forces a ring to be put into the assembly chute in module 6. This is achieved Module 6 Sink1 t16 Z,, = ~ lO.O&I'~.l ,, = .0 Sourcel . pl w ~ w ..............U!~Pg.~ .on_vex'ormopr ............... MO.2~'-~Off tl3 ~ 1 Module 1 ~i~'~ ~ Module 2 5 M1.3 M0.3"~ s sec. m ~ Z,, =q/lO.2 On Q0.2 T 3 7 : 0 , 5 sec. "N~..~P5 Module 3 ) MI.4 ( o~3 ~ T 3 8 : 1 . 5 sec. • M0.4 { _ ~ i , ~ i 0 . 2 ~ t17 1 t15 ~ Sink2 On ........ Sink3 M Fig. 7, The TPL for the control of the discrete manufacturing system. ~ Module 4 Discrete Event Control System Design by a leading edge e n a b l i n g arc f r o m place P3 to transition tl2, {En(p3,t,2) = T1 }. Specification 3. To p u t rings into the a s s e m b l y area i n v o l v e s e n e r g i s i n g the a s s e m b l y s o l e n o i d in m o d u l e 3, w h e r e place P5 represents the o f f state a n d place p6 represents the on state o f the a s s e m b l y solenoid. T h e a s s e m b l y solenoid is s w i t c h e d on t h r o u g h transition ts, and occurs w h e n there is a ring(s) in the a s s e m b l y chute, i.e. M ( p , 0 > 1, and if the a s s e m b l y area is e m p t y , i.e. M(p~2 ) = 0 a n d if there is n o a s s e m b l y o p e r a t i o n initialisafion 1 M0.0 M0.1 ---1/[. --.--( .... K1 S ) M0.2 KI -( S ) M0A K1 --( S ) M0.6 Kt S ) M1.0 K1 in progress, i.e. M(p,_0 = 0. This is realised by a d d i n g an e n a b l i n g are f r o m place p ~ to transition t> {En(,p~,ts) = 1 }, an inhibitor arc f r o m place P12 to transition ts, {In(p~>ts) = 1} and an i n h i b i t o r arc f r o m place P~3 to transition ts, {In(p~3,ts) = 1 }. T h e a s s e m b l y solenoid operation is carried out with a t o k e n in place P6, and is realised b y a level action (Q0.3). T h e a s s e m b l y solenoid is s w i t c h e d o f f t h r o u g h transition t6, and occurs w h e n the p r e s e n c e o f a ring in the a s s e m b l y area is detected, i.e. TI0.2. T h i s is realised by p l a c i n g the ring p~0 module 1 [2 M0.I QO.O p2 [----][. . . . . . . . . . . . . . . . . . . . . . . . . . . . . -( ) module 2 310,0 I0.1M0.2 VW202 K4 M0.2 KI t3 . . .-ll. I P I---l/[-~] [. . . . . I < = I I--F---..( R ) | M0.3 4 M0.3 p4 - - I [" Q0,1 "( ) MI.1 Kl VW203 K0 t,o [---][. . . . I = = I I' r'----( / | t__..( S ) , tt2 16 M0.2 t [-----1 P I" VW202 17 M0.4 t,3 ----][---]PI-----[ i:o 1 - VW202 VW202KI MI.3 KI > = I [...... [--- . . . . . . . --( S ) K1 S ) Q0.2 '~--~7 VW202L~ 5-1 5 M0.3 T37 h ...... ] [ - - ] [ ' - - _ I [ oo d ( s ) module 5 12 M1.0 VW203 K1 I> = I I MI.0 K1 R ) V~M1,1 K1 t____...( S ) VW202 M1.3 K1 r"-'--( R ) .4 K1 S ) T38 M0.3 KI 1"---"( R ) l M 0 .2 KI t____--{ s ) module 3 6 M0.4 M1.3 M1.4 VW202 K1 M0.4 K1 t, ----] [--l/I---l/I-. I > = I I'-'-g---'-( R ) [M0.5 K1 L---__( S) Qo.3 7 M0.5 ( ) p~ ~ 1 [. M0,5 KI 8 I0.2 MO,5 ---(R) t6 - - I l---I P t---1 [M0,4 K1 ------( S ) module 4 M0.6 K1 9 M0.6 M1.6 -----(R) t7 ----1 [. . . . 1[. M0.7 K1 ----(S) Q0A 10 M0.7 ( ) p~ ~ l [ - - - M0.7 K1 11 I0.7 M0.7 t8 - - 1 [ - - I N I---1 [, f ) 1 I vw2ol]~ o~t-vw2ol 18 I0.2 M1.3 h4 ---] [---J N I - - I [- t9 I - - - - l [ . . . . . . R M1.0 K1 module6 15 I0.0 I0A VW202 K5 tll---] [---I P [---]1[. . . . I==I[-----tEN M0,0 K1 ( s ) L------.( ~3. ~ l . t ..... ]14 MI.1 s ) -----..( 725 K151PT I 20 MI.4 T38 t. M1A K1 ..... ] [ - - - I [. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ( 21 I0.0 I0.1 t,~ . . . . 1 I----IP I - - I [" R ) M1.2 K1 ( S ) T39 22 M1.2 p14 " - - 1 1 K50 23 MI.2 T39 tit - - ] [ . . . . . ][ . . . . . . . . . . . . ]--~-( vw2o, module 7 24 I0.6 10.5 tl8 ]---[[7--IP I---1/[ [25 Io,/ M1.5 .o [-1 H Pl---It................ Fig. 8. Siemens $7-200 LD code obtained, which complies with IEC 1131-3, M1.2 K1 R ) 1 o L,,w2o3 M1.5 KI .( S ) Mt.5 K1 6 s d) 726 M. Uzam and A. H. Jones MI.6 KI 26 M0.6 M1.6 VW203 K1 t20 - - 1 [--1P 1--I[ - ~ 1 >= I I- . . . . . . -(R) achieved by a leading edge enabling arc from place P7 to transition t20, {En(pT,t2o) = I1}. Specification 5. To operate the lower conveyor involves VW204 ~ VW204 VW203 VW203 M1,7 K1 27 i0,6 I0.5 t21 ----I [--I P I---1 [ 28 I0,7 M1.7 t22 ---I [---I P [--] [ ~ s) M1.7 K1 ------( R ) M2.0 K1 -----(s) 29 I0,7 t23 M2.0 K1 M2.0 - - 1 [---I N I--I [' (s) 2"40 30 M2.1 P~ - - 1 [. M2A K1 3l M2.1 T40 VW203 K1 t~4 ......] [----1 [ - - - I >=I l - - . . . . VW20: ~ (R) VW205 •EN VW203 2 0 b V f l VW203 energising the lower conveyor motor in module 5, where place P9 represents the off state and place P~o represents the on state of the lower conveyor motor. The lower conveyor motor is switched on through transition t9, and occurs when there is a peg(s) on the lower conveyor, i.e. M(p~5) i> 1. This is realised by adding an enabling arc from place P~5 to transition tg, {En(p~5,tg) = t }. The lower conveyor operation is carried out with a token in place P~0, and is realised by a level action (Q0.1). The lower conveyor motor is switched off through transition t~o, and occurs when there are no components on the lower conveyor, i.e. M(p~5) = 0. This is realised by adding an inhibitor arc from place Pw5 to transition tio, {In(p~5,tto) = 1 }. Specification 6. On the upper conveyor, to let the rings go into the scrap bin involves enabling transition t~ when the assembly chute is full. In other words, if the assembly chute is full, i.e. M(p~) = 5, and there is a ring present at the sort area, i.e. TI0.0 and I0.1, then the ring must be put into the scrap bin. This is realised by placing the ring detection as a firing condition to transition tl~, i.e. X~ = TI0.0 and I0.1 and by adding an enabling arc with weight 5 from place PJz to transition hi, {En(pll,tll) = 5}. Specification 7. For the purpose of recording the number of rings and pegs in the scrap bins as welt as the number of complete assemblies in the collection tray, places Ps,, P~3 and Psi4 are used, respectively.'With the firing of related transitions the number of tokens in these places is increased. As a result, the number of tokens in these places represent the number of rings, pegs and complete assemblies in the manufacturing system, respectively. ~ MrrND) Fig. 8. Continued. detection in the assembly area as a firing condition to transition t6, i.e. X6 = ]70.2. Finally, switching off the assembly solenoid forces a ring from the assembly chute into the assembly area in module 6. This is achieved by a leading edge (LE) enabling arc fi'om place P5 to transition t13, {En(ps,t13) = T1 }. 5~ecification 4. To eject unassembled pegs from the lower conveyor into the scrap bin involves energising the reject solenoid in module 4, where place P7 represents the off state and place P8 represents the on state of the reject solenoid. The reject solenoid is switched on through transition t7, and occurs when there is an unassembled peg in front of the reject solenoid, i.e. M(Pl7 ) = 1. This is realised by adding an enabling arc from place P~7 to transition tT, {En(p~7,t7) = 1 }. The reject solenoid operation is carried out with a token in place Ps, and is realised by a level action (Q0.4). The reject solenoid is switched off through transition ts, and occurs when the absence of an unassembled peg in front of the reject solenoid is detected, i.e. 110.7. This is realised by placing the absence of the peg as a firing condition to transition ts, i.e. Xa = 110.7. Finally, switching off the reject solenoid forces a ring from the lower conveyor into the scrap bin in module 7. This is 5.3 Token Passing Logic for the APN Model The TPL, given in Fig. 7, for the control of discrete manufacturing system, is obtained by applying the TPL concept to the APN model. In this case, memory words (VWxxx) are assigned to the places, whose capacity is bigger than 1, and memory bits (Mx.x) are assigned to the places, whose capacity is 1. An on delay timer is associated with timed places, to represent the time delays. Also output bits, Q0.0, Q0. I, Q0.2, Q0,3 and Q0.4, are assigned to the control places to represent actions at places. Sensor readings are realised by input registers, I0.0, I0.1, I0.2, I0.5, I0.6, and I0.7. 5.4 Ladder Diagram for the TPL In order to convert the TPL into LD code for implementation, a direct mapping is used from the TPL to LD code. The resulting LD code, which complies with I E C l l 3 1 - 3 , is shown in Fig. 8. This code is written for a Siemens $7-200 PLC. The ladder logic symbols for the Siemens $7-200 PLC are defined in Table 3. The LD code has been structured in such a way that rung 1 initialises the system, module 1 of the TPL is converted into LD at rung 2. Module 2, consisting of I3, P4 and t4 is converted Discrete Event Control System Design 727 Table 3. SIEMENS $7-200 PLC instructions. LAD element Symbol Description Operands (as used in this paper) Contact (normally open) Contact (normally closed) Contact (negative transition) Contact (positive transition) Contact (compare) /2 ---] [--n ---]/[-----[ N ]--- Normally open contact is closed (on) when n = I Normally closed contact is closed (on) when n = 0 Negative transition n (bit): I (input), Q (output), M (memory), T (timer) n (bit): I, Q, M, T ---[ P I'-- Positive transition None nt n2 ---[ = = II--- Compare contact I: Integer n~, n~ (word): I, Q, M, T, constant Output coil n (bit): I, Q, M, T Reset coil S BIT (bit): I, Q, M, T N(byte): constant (K) S BIT (bit); I, Q, M, T N(byte): constant (K) nl None n2 ---I> = II--- n~ /22 ---t < -- II--- Coil n Coil reset S BIT N ---( R ) ~_BIT N ---( s ) ---(MEND) ---( Coil set Memory end DEC W ) DEC_._W ] -- tfN I INC W Set coil End of program None Decrement word IN (word): VW (variable memory word) OUT (word): VW Increment word IN (word): VW OUTI-- INC W --- EN __ OUT (word): VW _.i IN MOV W OUT [ MOV W ---[EN - -- IN Move word OUT (word): VW, C (counter) OUT Add integer ADD_._! --- EN Txxx TON IN1 (word): constant IN2 (word): VW, C OUT (word): VW, C (counter) --[IN2 TON IN (word): VW, constant ON-delay timer --- IN -- PT into LD at rungs 3, 4 and 5. Module 3, consisting of ts, P6 and to is converted into LD at rungs 6, 7 and 8. Module 4, consisting of t7, P8 and t8 is converted into L D at rungs 9, 10 and 11. Module 5, consisting of t9, Plo and tio is converted into LD at rungs 12, 13 and 14. Module 6, consisting of tH, Txxx (word): 32-63 "timer timer resolution 32 : lms 33-36: 10ms 37-63: lOOms" PT (word): constant t12, t13, t14, /)13, t15, t~6, P14 and t17 is converted into LD at rungs 15, 16, 17, 18, 19, 20, 21, 22, and 23, respectively. Module 7, consisting of t~8, hg, t2o, t2~, t22, t23, P2o and t24 is converted into L D at rungs 24, 25, 26, 27, 28, 29, 30 and 31, respectively. By adopting this concept, further clarity can be 728 M. Uzam and A. H. Jones added to the system documentation and it is very easy to understand and modify the LD code. 6. Conclusions In this paper, automation Petri nets (APN) have been introduced as a new method for the design and implementation of discrete event control systems (DECS). The APN is particularly well suited to multiproduct systems and provides a more effective solution than Grafcet in this context. Since ordinary Petri nets do not deal with sensors and actuators of DECSs, the Petri net concepts have been extended, by including actions and sensor readings as formal structures within the APN. Enabling and inhibitor arcs, which can enable or disable transitions through the use of leading-edge, falling-edge and level-off markings, have also been introduced. Moreover, the methodology has been described in detail by considering a discrete event manufacturing problem. To do this, first, an APN model has been designed for the manufacturing system, so that the specifications were met. Then, the APN model has been converted into a token passing logic (TPL). Finally, the IEC11313 ladder diagram (LD) for implementation on a PLC has been obtained by using a direct mapping from the TPL into LD. Although this paper has explained how to convert a set of specifications into an APN model for a DES, it does not address the issues of verification. This important issue has already been addressed by the authors and will be the topic of forthcoming publications. References l. R. David and H. Alla, Petri Nets and Grafcet, Tools for Modelling Discrete Event Systems. Prentice Hall, Englewood Cliffs, NJ, USA, 1992. 2. J. R. Potland, "Ladder Iogic remains the PLC language of choice", Control Engineering, pp. 77-79, April 1994. 3. K. Venkatesh, M. Zhou, R. J. Cauditl, "Comparing ladder logic diagrams and Petri nets for sequence controller design through a discrete manufacturing system". IEEE Transactions on Industrial Electronics, 41(6), pp 611-619, December 1994. 4. M. A. Jafari and T. O. Boucher, "A rule-based system for generating a ladder logic control program from a high level system model", Journal of Intelligent Manufacturing, 5 pp. 103-120, 1994. 5. T. Satoh, H. Oshima, K. Nose and S. Kumagai, "Automatic generation system of ladder list program by Petri net", Proceedings, IEEE International Workshop on Emerging Technologies on Factory Automation (ETFA '92), pp. 128-133, 1992. 6. S. Rattigan, "Using Petri nets to develop programs for PLC systems", Lecture Notes in Computer Science 616: Application and Theory of Petri Nets, pp. 368-372, 1992. 7. A. Taholakian and W. M. M. Hales, "The design and modelling of PLC programs using Petri nets", Proceedings of the International Conference on Planned Maintenance, Reliability and Quality Assurance, Cambridge, UK, pp. t94-199, 6-7 April 1995. 8. J. Greene, "Petn net design methodology for sequential control", Measurement and Control, 22, pp. 288-291, December/January 1989/1990. 9. Gary L. Burns and Bopaya Bidanda, "The use of hierarchical Petri nets for the automatic generation of ladder logic programs", Proc. of ESD IPC-'94 Conference & Exposition, Detroit, Michigan, pp. 169-179, 11-14 April 1994. 10. A. H. Jones, M. Uzam, A. H. Khan, D. Karimzadgan, S. B. Kenway, "A general methodology for converting Petri nets into ladder logic: the TPLL methodology", Proceedings, CIMAT "96, Grenoble, France, pp. 357-362, 29-31 May 1996. tl. M. Uzam and A. H. Jones, "Design of a discrete event control system for a manufacturing system using token passing ladder logic", Proceedings of IMACS Multiconference, Symposium on Discrete Events and Manufacturing Systems (CESA '96), Lille, France, pp. 513-518, 9-12 July 1996. 12. A. If. Jones, M. Uzam and N. Ajlouni, "Design of discrete event control systems for programmable logic controllers using T-timed Petri nets", Proceedings of IEEE International Symposium on Computer Aided Control System Design (CACSD '96), Michigan, USA, pp. 2t2-217, 15-17 September 1996. 13. A. H. Jones and M. Uzam, "Towards a unified methodology for converting coloured Petri net controllers into ladder logic using TPLL: Part II - An application", Proceedings of the International Workshop on Discrete Event Systems (WODES '96), Edinburgh, UK, pp. 314-319, 19-21 August 1996. 14. M. Uzam and A. H. Jones, "Design of ladder logic for an agile manufacturing system using TPLL", Proceedings of the First Turkish Symposium on Intelligent Manufacturing Systems (IMS '96), Sakarya, Turkey, pp. 55-74, 30-31 May 1996. 15. M. Uzam and A. H. Jones, "Towards a unified methodology for converting coloured Petri net controllers into ladder logic using TPLL: Part I - Methodology", Proceedings of International Workshop on Discrete Event Systems (WODES '96), Edinburgh, UK; pp. 178-183, 19-21 August 1996. 16. A. H. Jones and M. Uzam, "Design of sequential control systems in statement lists using TPL: Part I - Token passing statement list", Proceedings of the Second Portuguese Control Conference (Controlo 96), Porto, Portugal, pp. 341-346, 11-13 September 1996. 17. M. Uzam and A. H. Jones, "Design of sequential control systems in statement lists using TPL: Part II - An application", Proceedings of the Second Portuguese Control Conference (Controlo 96), Porto, Portugal, pp. 771-775, 11-13 September 1996. 18. M. Uzam and A. H. Jones, "Conversion of Petri net controllers of manufacturing systems into ladder logic diagrams", Proceedings of the Fifth IEEE International Conference on Emerging Technologies and Factor?, Automation (ETFA '96), Hawaii, USA, pp. 649-655, 18-2I November 1996. 19. M. Uzam and A. H. Jones, "Real-time implementation of automation Petri net controllers using programmable logic controllers", Proceedings of the Fourth IFAC Workshop on Algorithms and Architectures for Real-Time Control (AARTC '97), Vlaimoura, Algarve, Portugal, pp. 421-426, 9-11 April 1997. 20. Lewis, R. W., Programming Industrial Control Systems Using IEC 1131-3, IEE, London, UK, 1995. 21. International Electrotechnical Commission, Programmable Controllers Part 1, General Information, IEC 1131-1, IEC Geneva, 1992. 22. International Electrotechnical Commission, Programmable Controllers Part 3, Programming Languages, IEC 1131-3, IEC Geneva, 1993. 23. R. David, "Grafcet: A powerful tool for specification of logic controllers", IEEE Transactions on Control Systems Technology, vol. 3(3), pp. 253-268, September 1995. 24. M. Uzam, "Petri-Net-Based Supervisory Control of Discrete Event Systems and their Ladder Logic Diagram Implementations", PhD Thesis, The University of Satford, Satford,UK, March 1998. 25. Siemens, SIMATIC Software, $7-200 Statement List and Ladder Logic Programming Reference Manual, Siemens AG, Germany, 1996.