Basic Programming Principles of PLCs
◾
339
(h) is activated. The cylinders C
A
and C
B
are of double action at this point, and the automation
will not deal with the logic of the pneumatic circuit. Thus, it will simply be considered that when,
for example, the C
B
relay is activated then the corresponding cylinder is extracted, the C
B
is deacti-
vated and the cylinder is retracted. According to the I/O connections in the PLC and the addresses
listed, the required Boolean language program is as follows:
A
I0.1
AN M11.1
=
M11.0
A
M11.0
S
M11.1
AN I0.0
R
M11.1
A
M11.0
R
C1
R
T1
A
I0.1
S
Q2.0
S
Q2.2
S
Q2.4
A
M11.0
L
‘10 min’
SS T1
A
I0.4
SS T1
R
Q3.2
S
Q3.0
CU C1
A
I0.3
AN I0.4
SS T1
R
Q3.0
R
Q3.2
CU C1
L
C1
L
‘1000’
≥
S
Q3.0
S
Q3.2
R
Q2.2
R
Q2.4
A
T1
=
Q3.4
AN I0.1
R
Q2.0
R
Q2.2
R
Q2.4
R
Q3.0
R
Q3.2
R
T1
BE
The program originally creates an impulse with duration of a scan cycle because the switch RS
causes the input I0.1 to remain continuously active. Therefore, the resetting of C1 and T1 could
not depend on the input I0.1. With impulse of M11.0, the resetting is done once.
Assembly station. A composite assembly machine consisting of a rotating table T and the two
conveyor belts M
1
and M
2
is controlled by a PLC, as shown in Figure 7.71. The conveyor belts M
1
A
B
A
B
A
A
A
M
1
M
3
M
2
1
2
3
4
5
6
7
8
B
T
PC
1
PC
2
PLC
Inputs
Outputs
0 V
+24 V DC
0 V
+24 V DC
Q2.0
I0.0
Q2.2 Q2.4
Μ
1
Μ
2
Μ
3
I0.1
h
PC
2
PC
1
START
Q2.6
I0.2
Figure 7.71 Assembly station of devices ABA, each consisting of two objects A and one object
B, controlled by a PLC.
340
◾
Introduction to Industrial Automation
and M
2
feed the assembly table with type A and B components, respectively. The assembly table
has eight work positions, while each assembled device in each work position consists of a type B
component and two components of type A. The operation of the assembly station should follow
the following specifications:
1. The table rotates stepwise and takes in a series of eight components A, eight components B,
and then eight components A again.
2. The stepwise rotation of the table is realized by a mechanism (it does not matter how) that
rotates the table one position at each rising pulse received by the motor M
3
, which is the
respective relay for the power supply (output Q2.4).
3. The assembly-collection procedure starts with an instantaneous START signal and finishes
after the complete assembly of eight devices that make up one “assembly cycle”.
4. After the START signal, the conveyor belts M
1
and M
2
start to operate in the order defined
by the specification 1. Any conveyor belt that does not feed the table with accessories remains
stationary.
5. When the machine assembles 400 devices, the light indicator h should be activated, an act
that means that an “assembly series” has been completed.
6. Objects are conveyed randomly onto the conveyor belts and are detected by the corre-
sponding photocells. The time from activating a photocell until the component is placed at
the corresponding table position is considered negligible, and the method of placement is
mechanically automatic.
Before proceeding with the automation programming, it is necessary to predefine certain
parameters and features of the program logic, which facilitates programming tasks and prevents
errors. The larger and more complex the application, the more necessary this step is. For this appli-
cation, the following remarks should be highlighted:
◾
There is no need to use a timer.
◾
There are three kinds of counting, namely objects A, objects B, and assembly cycles.
◾
The C1 counter will count the objects A.
◾
The C2 counter will count the objects B.
◾
The C3 counter will measure assembly cycles. For the completion of an assembly series (400
devices), C3 should be set to measure 50 assembly cycles.
◾
In each assembly cycle, the C1 and C2 counters should be automatically reset.
◾
In each assembly series, the C3 counter will be reset with the next pressing of the
START button, in order to keep the indication light on until that moment, which
would not be the case if the zeroing was done automatically at the end of an assembly
series completion.
◾
The C1 counter will count in two phases, the first eight objects A in the first phase, and the
next 8 (9–16) objects A in the second phase.
Basic Programming Principles of PLCs
◾
341
After taking these remarks into account, the required Boolean language program is the following:
A
I0.0
S
M0.0
A
I0.1
CU
C1
A
I0.2
CU
C2
L
C1
L
‘8’
<
=
M1.1
=!
=
M8.1
L
C1
L
‘16’
=!
=
M16.1
L
C2
L
‘8’
<
=
M1.2
=!
=
M8.2
A
M0.0
A
M1.1
=
Q2.0
A
M0.0
AN
M1.1
A
M1.2
=
Q2.2
Start of assembly cycle
A
M0.0
A
M8.2
AN
M1.1
AN
M16.1
=
Q2.0
A
Q2.0
A
I0.1
O
A
Q2.2
A
I0.2
=
Q2.4
A
M16.1
CU
C3
A
M16.1
R
C1
R
C2
R
M0.0
L
C3
L
‘50’
=!
=
Q2.6
A
I0.0
A
Q2.6
R
C3
BE
Counting of objects ‘A’
Counting of objects ‘B’
A<8
A=8
A=16
B<8
B=8
If “assembly cycle is ON”
AND if A≥8 AND B<8,
then conveyor M
2
operates
If “assembly cycle is
ON” AND if A<8 then
conveyor M
2
operates
If “assembly cycle is ON”
AND if B=8 AND A≥ 8
AND A≠16, then
conveyor M
1
operates
If M
1
operates and an
object A arrives
OR
If M
2
operates and an
object B arrives,
then motor M
3
operates
Counting of
assembly cycles
Resetting for starting
a new assembly cycle
If an assembly series is
complete, then h=ON
Resetting for starting a
new assembly series
Some of the “logical latches” in the operation of the conveyors may be redundant and not the
least possible, but this is something that should not be considered as problematic. In an automa-
tion program, and especially in those of large applications, in addition to the logic extraction and
writing of the corresponding instructions, tests of the system operation should be carried out and
in extended operation time. For example, in the above program, it has not been considered how
342
◾
Introduction to Industrial Automation
the layout will behave if an operator presses the START button continuously for both cases where
objects are coming on two conveyor belts. At the very least, thorough testing should be performed
in an automation program simulation environment. However, these issues are more concerned
with the implementation of automation projects, and the acquisition of relevant experience and is
beyond the scope of this book.
Swimming pool control. The initial filling of the swimming pool shown in Figure 7.72 starts by
switching on the ON-OFF rotary switch and then the following procedure takes place:
◾
From the zero level to the S
1
level, only the water pump operates.
◾
From the S
1
level to the S
2
level, both the water pump and the chlorine pump operate.
◾
From the S
2
level to the S
3
level, only the water pump operates again.
A chlorine meter measures the residual chlorine in the tank and its analog output (0–10 V) is
applied to an analog input (Ch. 1) of the PLC. Lets suppose that the numerical value of the analog
input is stored in the MW100 memory word and expresses ml of chlorine per cubic meter of water
(ml/m
3
). After the initial filling of the pool, the water pump operates whenever it is necessary to
keep the level at S
3
, and the chlorine pump whenever it is required to keep the measurement of
residual chlorine between 0.5 and 1.5 ml/m
3
. The light indicator h shows all the possible logical
errors of the S
1
, S
2
, and S
3
level sensors that are likely to occur.
H
2
O
H
2
O
H
2
O+Cl
S
1
S
2
S
3
Meter
Cl
H
2
O
Cl
PLC
Digital
inputs
Digital
outputs
0 V
+24 V DC
0 V
+24 V DC
C
Cl
I1.0
Ch.1
Ch.2
Q0.2
Analog
Inputs
Analog
Outputs
Ch.1
Ch.2
Shielded cable
Meter
Cl
h
ON-OFF
switch
S
1
S
2
S
3
I1.1
I1.2
I1.3
Q0.0
Q0.4
C
H
2
O
0–10 V
8>8>8>
Do'stlaringiz bilan baham: