Design and Implementation of PLC-Based Monitoring and Sequence Controller System
Design and Implementation of PLC-Based Monitoring and Sequence Controller System
Design and Implementation of PLC-Based Monitoring and Sequence Controller System
Abstract– Programmable Logic Controller (PLC) is an electronic digital device. PLC has a programmable memory
that is used for storing codes and implement functions like timing, logic, counting, sequencing and arithmetic. These
instructions are used for controlling machines and processes. The aim of this paper is to design and implement a
monitoring and control prototype of products transfer system from one point to another point based on PLC
technology using CIMON-BP32 and describing the method for development the program of the PLC. During
normal operation and under dishonest conditions, the parameters control correlation by the user is required where
the correlation is done by the PLC. The implementation of the hardware and software for control system is
provided. Thus, PLC proves as a versatile and wide effective tool in industrial control of electric drives.
Keyward: PLC, automatic control, Ladder diagram, Sequence controllers
1. Introduction
Programmable Logic Controller (PLC) is an electronic digital device. PLC has a programmable memory that
is used for storing codes and implement functions like timing, logic, counting, sequencing and arithmetic. The
logical operations are primarily used concerned with switching operations. The PLC connects the input (e.g.
Switches) to the output (e.g. Motors) and they are controlled by the controller according the stored program is the
PLC [1, 2]. PLC is widely used in many industry aspects to expand and enhance the production. The PLCs
functionality has been evolving over the last few years, replacing typical relay controls [3, 4]. One PLC can replace
hundreds or thousands of relays that were used in older automated systems [5]. Now, PLC’s covering sophisticated
motion control, distributive control systems, process control and complex networking [6]. Therefore, PLCs have
many advantages over conventional relays including more flexibility, increased reliability, convenience to
troubleshoot, lower cost, faster response time and communication capability [1]. PLC’s greatest advantage is that it
has the possibility of modifying a control system without needs to rewrite the inputs and output devices connections.
The only requirement is an operator that has a key with a different set of instructions.
Originally, PLCs was designed for replacing logic timer control systems and hard-wired relay. The result of using
PLCs is a flexible system which can be used to control systems with a wide variety in their nature and complexity
[2]. The PLC advantages can be summarized as high reliability, smaller space, computing capabilities, reduced
costs, ability to withstand harsh environments, expandability, high power handling and reduce Human Efforts. The
PLC works by scanning the program continues. The scanning procedure is consisting three steps as shown in Fig.1.
Typically, there are more than three steps, but these steps are the most important steps and the rest are sub steps such
as checking the system, updating the current internal counter and timer values [7].
For the last two decades, PLCs has been used in industry. The PLC is designed to replace the traditional control
panels that are depending on timers and hard-wired relays. Based on logic instructions programming and executing,
PLC can provide ease and flexible control. Even with using the smallest PLC, the Internal functions like shift
registers, counters and timers are making the sophisticated control possible.
The PLC structure is divided into four parts. These parts are input/output modules, central processing unit (CPU),
memory and programming terminal. Fig. 2 shows the PLC general structure.
The state of the input signal to the plant from the sensors is:
X0: The starting point of the line which is a manual signal to switch the system ON / OFF.
X1: Box at the first conveyor and travels towards a position on the disk.
X2: Box in position where the electrical contact signal of the platform sensor is on.
X3: End of the CCW rotation.
X4: Box out of the position on the disk.
X5: End of the CW rotation.
The output signals describe the line operation, and it can be used by a controller to yield control signals:
Y1: Moving the first conveyor Motor 1.
Y2: Rotating the disk Motor 2.
Y3: Pushing the arm of pusher Motor 3.
Y4: Start the second conveyer Motor 4.
Y5: Reverse Relay to change the direction of Motor 2 and Motor 3.
Fig. 6 shows the rotating disk where it is showing the DC motor for the pusher, the entrance of the box to the rotary
disk and the sensor of the box exit.
2284
*Corresponding Author: Mohammed S. Saleh,Email id : [email protected]
Article History: Received: Aug 15, 2018, Revised: Sep 10, 2018, Accepted: Oct 04, 2018
Fig. 7 PLC and interface circuit
3. System Specification
Based on the fact of the PLC memory is organized into three subsections: discreet input (I), output relay (O) and
internal memory (M), the method of the direct representation for data associated with the I/O and M is implemented.
The memory location is directly referenced using I, O, and M [3].
The plant control behavior can be described in terms of states and transitions between states. The system transition
from one state to another is caused by the occurrence of an input signal, or a combination of input signals where it
can change the value of an output signal, or a set of output signals. The first step of the analysis is defining the states
of the system.
Stopped: the line switched off (it can be started by the signal S0).
Moving: the box is transported by the conveyor, and is expected on the scale platform.
Loading: the box is positioned on the scale platform.
CCW: the disk rotates CCW direction.
Push: the jack pushes the box outside the scale platform.
Return: the disk rotates CW, the push arm is returned to the first position, and the second conveyor is
transported the box.
Fig. 8 show all possible states and transition between them in order to transit from one state to another, it is required
an input signal and the output signal.
Table 1 determines the setting and resetting the code bits (M1, M2 and M3). A bit is set by a transition if it was not
set in the source state of this transition, and set in the target state of this transition. Similarly, a bit is reset by a
transition if it was set in the source state and not set in the target state of this transition. The first code bit (M1) is set
in two transits, when the transit from Stopping state (S0) to Moving state (S1), the second transit is from push state
(S4) to return state (S5). The same code bit will reset at two transits, first one when the transit from Loading state
(S2) to CCW state (S3), the second one when the transit from Return state (S5) to Stopping state (S0). The
expressions to describe that are:
Set M1 if S0. M1. M2. M3 + S4. M1. M2. M3 (1)
Reset M1 if S2. M1. M2. M3 + S0. S5. M1. M2. M3 (2)
For the second code bit (M2) will be set at the transition from Moving state (S1) to Loading state (S2), and M2 will
reset when the transit from Return state (S5) to Stopping state (S0). As in the expression bellow:
Set M2 if S1. M1. M2. M3 (3)
Reset M2 if S0. S5. M1. M2. M3 (4)
The last code bit (M3) will be set when the transit from CCW state (S3) to Push state (S4) and reset when the transit
from Return state (S5) to Stopping state (S0). As shown in the expression bellow:
Set M3 if S3. M1. M2. M3 (5)
Reset M3 if S0. S5. M1. M2. M3 (6)
The finite state machine model is the transitions atomic where all bits will change their state during a transition
simultaneously. The PLC executes a program sequentially function by function. When a function is computed, the
respective bit is set or reset immediately. This will produce an error of transitions. For example, the functions for
resetting bits M2 and M3 both functions including the sub-expression (5) and (6). Each of these functions is correct
where describes the action which should be done if signal S0 and S5 occurs in last state. However, the functions are
executed sequentially, and when the function Reset M2 (4) has been executed, bit M2 will reset. Function Reset M3
(6) is then false, and bit M3 will remain unchanged. In order to solve this issue, it is necessary to prevent any
changes of state, until the computation of the entire sequence of functions has been finished. This can be
implemented by means of secondary bits, assigned as the one-to-one basis to the primary bits, i.e. To the used bits
that is used for encoding the system’s states. The next state of the system will be stored in an auxiliary flip flops will
where it is calculated by the computation of transition functions, until the entire computation finished. The system’s
next state is converting the current state by copying the state of secondary bits to the primary bits. There are three
primary bits: M11, M22, and M33 in the system. Denote the secondary bits by respectively. The Modified sequence
of functions can now be written as follows:
2286
*Corresponding Author: Mohammed S. Saleh,Email id : [email protected]
Article History: Received: Aug 15, 2018, Revised: Sep 10, 2018, Accepted: Oct 04, 2018
Set M11 if S0. M1. M2. M3 + S4. M1. M2. M3 (7)
Reset M11 if S2. M1. M2. M3 + S0. S5. M1. M2. M3 (8)
Set M22 if S1. M1. M2. M3 (9)
Reset M22 if S0. S5. M1. M2. M3 (10)
Set M33 ifS3. M1. M2. M3 (11)
Reset M33 if S0. S5. M1. M2. M3 (12)
Then exchange of the primary bits with the secondary bits as follows:
M1 = M11 (13)
M2 = M22 (14)
M3 = M33 (15)
5. The Output Functions
The Output functions are defining the relation of output signals values to the state of the automaton and the values of
input signals. These functions can be derived directly from the state transition. The output signals can change their
values during the transitions only. The new value is given by the action defined by the label of the transition.
In the system, the values of output signals depend on states only where signal Y1 is true in state (Start of the first
conveyor), signal Y2 is true in state (Rotating the disk CCW), signal Y3 is true in states (Pushing the box by jack),
signal Y4 is true in states (Start the second conveyer) and signal Y5 is true in states (Reverse relay ON). This
behavior is described by the following three functions:
Y1 = M1. M2. M3 (16)
Y2 = M1. M2. M3 + Y4 (17)
Y3 = M1. M2. M3 + Y4 (18)
Y4 = M1. M2. M3 (19)
Y5 = Y4 (20)
Output functions must be computed before copying the secondary bits state to the primary flip flops to keep the
outputs with current state of the system consistent. However, output functions do not need any transition functions,
but can be placed anywhere within the sequence.
6. Simplified Functions
In the first step we can take advantage of the incompleteness coding where not all combinations of states of bits are
used. When M2 is reset M3 is reset as well. Similarly, if M3 is set, then M2 is set as well. Using such dependencies,
the transition functions can be reduced to the form:
Set M11 if S0. M1. M2 + S4. M1. M3 (21)
Reset M11 if S2. M1. M2. M3 + S0. S5. M1. M3 (22)
Set M22 if S1. M1. M2 (23)
Reset M22 if S0. S5. M1. M3 (24)
Set M33 ifS3. M1. M2. M3 (25)
Reset M33 if S0. S5. M1. M3 (26)
Then the functions can be subject to factoring as follow:
Set M11 if M1. (S0. M2 + S4. M3) (27)
Reset M11 if M1. (S2. M2. M3 + S0. S5. M3) (28)
The error state in the system is important to study because of this state may be cause significant losses or endanger
the environment or even human’s life. By correcting the sequence, it can be used as a basis for designing a program
for PLC. However, PLC controllers are used in many application areas in which a malfunction of the system. It is
Jour of Adv Research in Dynamical & Control Systems, Vol. 10, 02-Special Issue, 2018
still required for the dependability of control programs in such areas such as air and railway transport, process
control and medical devices. To fulfill these requirements, it is necessary to plan a reaction to an error which can
arise during the computation. One of the most important sources of errors is the incomplete use of the space, created
by all possible states of bits used to encode the states of the system. For example, consider the coding of the states
defined in Table 1. Only 6 of 8 possible states of three bits are used in the system. The behavior in each of these 6
states is defined by the sequence of transition and output functions. But what happens if for any reason one of the
other two undefined states, e.g. M1=1, M2=0, M3 = 1, M1 = 0, M2 = 0 and M3 = 1 as shown in table 2 occurs. The
behavior of the system in such an invalid state has not been defined.
Table 2 Undefine States
36
M3 37
M2 38
M1 39
Line State 40
State
41
1 42
0 43
1 44
Undefine 45
Error
46
1 47
0 48
0 49
Undefine 50
Error
The state recovery policy returns the system to a valid and safety state must be exist. In many cases the most
obvious choice of such a recovery state is stopped. To implement this fail, stop policy, it needs an auxiliary bit,
which is set if an erroneous in next state was observed. The primary bits are reset to stop, instead of being set by the
erroneous next state, if the new bit has been set. In the system this protective action can be described by the
functions:
M4 = M1. M2. M3 + M1. M2. M3 (29)
M4 = M2. M3 (30)
M1 = M11. M4 (31)
M2 = M22. M4 (32)
M3 = M33. M4 (33)
7. Ladder Programming
A sequence of Boolean functions can be written in a ladder diagram form directly. Each function is converted into a
single line code. Parallel branches within the one line represents the disjunction. Serial elements within a given
branch represents a conjunction [11]. A normal closed contact is used to implement the negation of a system
controller, which implements the functions (21) – (33) is shown in Fig. 9.
References
[1] Petruzella, F. D., “Programmable Logic Controllers”, McGraw Hill, 2005.
[2] Johnson, C. D., “Process Control Instrumentation Technology”, Prentice Hall, 2006.
[3] Hassapis, G., “An interactive electronic book approach for teaching computer implementation of industrial
control systems”, IEEE Transaction on Education, Vol. 46, pp. 177 – 184, Feb. 2003.
[4] Kamen, E. W., Gazarik, M. J., “A course in industrial controls and manufacturing for EE students and other
engineering majors”, Proceeding of the 1997 American Control Conference, Vol. 5, pp. 3160 – 3165, June
1997.
[5] Anderson, J. C., “Design a flexible industrial controls lab module”, 32nd Annual Frontiers in Education, Vol.
1, pp. 17 – 22, Nov. 2002.
[6] Osama Mahfooz, MujtabaMemon and AsimIftikhar, “Project Review on Water Level Sensing Using PLC”, Pak.
j. eng. technol. sci. Vol. 2, No 2, 2012.
[7] Komal Gupta and Kirti Mourya, “Initial Face of Automation Programable Logic Controller”, International
Journal of Advance Research in Science and Engineering IJARSE, Vol. No.2, Issue No. 2, 2013.
[8] Saurabh Sharma, T. Y. Ladakhi, A. P. Tiwary, B. B. Pradhan and R. Phipon, “Application of PLC for Elevator
Control System”, International Journal of Computer Applications (IJCA), 2011.
[9] Programmable Controllers. Part 2: Equipment Requirements and Tests, 1994.
[10] M. Tawadros, J. Rizk, and M. Nagrial, “Brushless DC motor control using PLC”.
[11] Mohamed Endi, Y. Z. Elhalwagy and Attalla hashad, “Three - Layer PLC/SCADA System Architecture in
Process Automation and Data Monitoring”, 978-1-4244-5586-7/10/C 2010 IEEE.
[12] Liping Guo, “Design Projects in a Programmable Logic Controller (PLC) Course in Electrical Engineering
technology”, The Technology Interface Journal, Vol. 10, No 1, 2009.
[13] G.Madhan, G. R. Kandhasamy and S. Muruganand, “Design and Implementation of PLC based Computerized
Monitoring in Dip Coating System”, International Journal of Computer Applications, Vol. 57, No 16, 2012.