328
◾
Introduction to Industrial Automation
MAIN PROGRAM
Operation of
conveyor Μ1
Operation of
conveyor Μ2
Operation of
conveyor Μ3
Operation of
conveyor Μ4
Operation of
process machine W1
Operation of
process machine W
2
Operation of
process machine W
3
F Β 1 CONVEYORS
VARIABLE DECLARATION
NAME
TYPE
DECLARATION
COMMENT
PROGRAM
F Β 1 CONVEYORS
VARIABLE DECLARATION
NAME
TYPE
DECLARATION
COMMENT
PROGRAM
FC1 PROCESS MACHINES
VARIABLE DECLARATION
PROGRAM
FC1 PROCESS MACHINES
VARIABLE DECLARATION
PROGRAM
FC1 PROCESS MACHINES
VARIABLE DECLARATION
PROGRAM
DΒ 1
Data
of
Conveyor M1
DΒ 1
Data
of
Conveyor M1
D Β2
Data
of
Conveyor M2
D Β2
Data
of
Conveyor M2
D Β3
Data
of
Conveyor M3
D Β3
Data
of
Conveyor M3
D Β4
Data
of
Conveyor M4
D Β4
Data
of
Conveyor M4
Complemental
operations of process
system automation
Automation
of final-processing
station (S)
NAME
TYPE
DECLARATION
Main Program
Operation of
conveyor Μ
1
Operation of
conveyor Μ
2
Operation of
conveyor Μ
3
Operation of
conveyor Μ
4
Operation of
process machine W
1
Operation of
process machine W
2
Operation of
process machine W
3
FΒ1 Conveyers
Variable declaration
NAME
TYPE
DECLARATION
COMMENT
Program
FC1 Process machines
Variable declaration
Program
DΒ1
Data
of
conveyor M
1
DΒ2
Data
of
conveyor M
2
DΒ3
Data
of
conveyor M
3
DΒ4
Data
of
conveyor M
4
Complemental
operations of process
system automation
Automation
of final-processing
station (S)
NAME
TYPE
DECLARATION
COMMENT
1st ca
ll
2nd call
3rd call
4th call
Figure 7.59 Modular programming of industrial process shown in Figure 7.58 and the calling
sequence of program blocks.
ΧΧΧ
MW1
MW1-35
35
YYY
ΧΧΧ
MW1
MW1
MW1-35
MW1
MW1-35
Accumulator 1
Accumulator 2
Program
L MW1
L 35
–I
T MW100
MW100:
Figure 7.60 Contents of the accumulators during execution of integer subtraction.
Basic Programming Principles of PLCs
◾
329
all the large PLCs dedicated for industrial applications have a large set of algebraic, arithmetic, and
trigonometric operations available, and their utilization is performed in a similar way.
7.5.6 Applications of PLC Programming
In this section, some practical automation layouts are presented, which are useful both for acquir-
ing more experience in programmable automation and for their application to similar electrome-
chanical automation projects. At this stage, it is assumed that the reader has understood the basic
programming principles of PLCs and has acquired enough experience in programming the logic
of simple automation layouts, thus there will not be a detailed description of how each application
is programmed. Instead, the problem is briefly described, clearly listing the operating specifica-
tions, and giving the automation program directly.
Reversing Motor Operation. The reversing motor, which is controlled by two power relays, can
be rotated in both directions, as shown in Figure 7.61a. When the motor is mechanically com-
bined with a lead screw, the rotary motion is converted to a linear one, such as the one moving
left or right on the worktable in the layout. The desired direction of rotation is selected via the two
START buttons, respectively. The limit switches LS
1
and LS
2
, located at the two extreme motion
limits, ensure that if we forget to stop the movement of the worktable, then it will stop automati-
cally, and the mechanism of the layout will not be destroyed. Figure 7.61b shows the classic circuit
of automation and the operation of the two relays with a self-latch logic, while there is also the
electrical latch of one branch from the other. Figure 7.61c shows the I/O devices and the way of
connecting them to the PLC, which will implement the programmed automation. The only issue
Outputs
PLC
Inputs
0 V
+24 V DC
0 V
+24 V DC
I1.0
I1.4
C
1
Q0.
4
I1.
2
I2.0
I2.4
I2.
2
START
Right
STOP
I2.6
C
2
Q0.
1
Left
rotation
START
Left
LS
1
LS
2
C
1
C
2
Right
rotation
STOP
+24V DC
0 V
C
1
C
1
C
1
C
2
C
2
LS
1
LS
2
C
2
START
Right
START
Left
Motor
Limit
switch
LS
2
(a)
(b)
(c)
LS
1
Worktable
Worm screw
Figure 7.61 Linear movement of a worktable (a), conventional circuit for automatic stopping at
the left and right limits of motion (b), and the connection status of I/O devices for implementa-
tion in a PLC (c).
330
◾
Introduction to Industrial Automation
that requires an explanation is the fact that there are two switching contacts of the relays C
1
and
C
2
, connected as inputs in the PLC, a need that does not arise from the classic automation circuit.
Their usefulness will be explained after the presentation of the corresponding automation pro-
grammed in Boolean language that follows:
A
I1.4
A(
O
I1.0
O
I2.4
)
A
I2.0
AN I2.6
=
Q0.1
A
I1.4
A(
O
I1.2
O
I2.6
)
A
I2.2
AN I2.4
=
Q0.4
BE
O
Q0.1
AN Q0.4
O
Q0.4
AN Q0.1
Alternative
instructions
The role of the C
1
and C
2
switching contacts, which are digital inputs of the PLC, is to provide
additional information if the C
1
and
C
2
relays are really energized. If the inputs I2.4 and I2.6 are
not available, then instead of the corresponding instructions in the program, we would have the
alternative instructions shown (in a box) next to the first ones and refer to the output variables
Q0.4 and Q0.1. These variables, however, are internal elements of the PLC and, in particular,
memory locations that have the information whether these outputs of the PLC are activated or
not. However, this information (which is output activated) does not ensure that the relay is really
energized (e.g., the relay coil was burned). Therefore, in cases where it is important to know that a
relay has been activated, then a relay’s switching contact should be an input to the PLC and thus
be a kind of relay state sensor.
Taking one step further, the activation of a power relay does not ensure that the machine is
working properly (e.g., the power cable between the power relay and the motor was cut off). If it
is just important to know that the motor operates normally, then some kind of sensor should be
used to detect the motor rotation and the motor’s normal operation. The sensor output switching
contact will be a digital input to the PLC and will transfer this required information.
Star-delta automation. Each star-delta motor starts with its windings connected in a star con-
figuration (Y) and, after a short period of time through a change in the wirings caused by the auto-
mation circuit, operates with its windings connected in triangle configuration (
Δ
). Because these
topics are generally well-known and have also been described in Section 4.3.2, the description will
be limited to a brief mention of the functional requirements. The automation program should, after
pressing the START button momentarily, activate the relay C
3
(see Figure 7.62a) that performs the
star node. Then, if the relay C
3
(precondition) is activated, the relay C
1
is also activated. After the
elapse of time T, the relay C
3
switches off and, without deactivating C
1
, the relay C
2
is activated
to perform the triangle connection of windings. This operation is accomplished with the classic
automation circuit shown in Figure 7.62b. The switching contact C
1
with time delay is a contact of
Basic Programming Principles of PLCs
◾
331
an ON-delay pneumatic timer that is mechanically coupled on the relay C
1
. For the connections
of the I/O devices shown in Figure 7.62c, the required Boolean automation program is as follows:
A
I0.3
A
I0.0
O
A
I0.3
A
Q2.0
A
Q2.6
=
M30.0
A
I0.3
A
Q2.0
O
A
M30.0
A
Q2.6
=
M40.0
A
M30.0
AN T7
AN Q2.3
=
Q2.6
A
M40.0
L
‘8 sec’
SD
T7
=
Q2.0
A
M40.0
AN Q2.6
=
Q2.3
BE
The thermal overload switch of the motor has been omitted from the I/O connection diagram
and from the automation program because its handling is standard and straightforward. Also, the
switching contacts C
2
and C
3
, which constitute the digital inputs I0.5 and I0.7 (to be used in the next
example of parking fullness check), have not been taken into account in the automation program. Both
the classic automation circuit and the above automation program function without any problem and
M
3~
R,S,T
e
(a)
C
1
C
2
C
3
(Y)
(Δ)
+24 V DC
STOP
START
C
1
C
3
C
3
C
1
C
2
C
3
C
1
C
2
e
0 V
(b)
PLC
Inputs
Outputs
0 V
(c)
+24 V DC
0 V
+24 V DC
I0.0
Q2.0
I0.3
I0.5
Q2.3
Q2.6
STOP
START
C
1
C
2
C
3
C
2
C
3
I0.7
Do'stlaringiz bilan baham: