290
◾
Introduction to Industrial Automation
7.4.4 Complementary Instructions
Load (L) and transfer (T) instructions. With the L and T instructions, we can move various mem-
ory data of the PLC massively from one location to another. The data may be related to inputs,
outputs, auxiliary bits, or other accessible memory locations. The density of the data movement
can be a byte, a word, or a double word. The L and T instructions do not depend on the RLO,
and thus they are executed continuously in each scan cycle. The instruction L can also refer to
a constant numeric value while it transfers its defined content always to accumulator 1. From
the other side, the T instruction always transfers the contents of accumulator 1 to the specified
variable-memory location. The usefulness and utilization of these instructions will be illustrated
in corresponding examples.
Counting instructions. The CU and CD counting instructions only concern the operation of
the counters. When executing the CU and CD instructions, the content of the counter is increased
or decreased by one, only if the RLO pulse rises. Increasing or decreasing the content of a counter
is associated with the RLO pulse rise for a very simple reason, which will be considered in the
following example. Let us assume that a conveyor belt transports bottles in a production process,
while a photocell is placed on the conveyor belt for counting the bottles. The photocell is a digital
input to the PLC, while there is a running program whose CU instruction refers to the input of
the photocell. Whenever a bottle is passed in front of the photocell, the content of the counter is
increased by one. Suppose now that for some reason the conveyor belt stops temporarily, and there
is a bottle in front of the photocell that keeps it activated. For as long as the bottle remains in front
of the photocell, the program will be executed many times. If there was no pulse raise condition
in the CU instruction, then the PLC would list a lot of virtual bottles from the encountered stop
situation, while in reality, there is only one (stopped) bottle in front of the photocell. Instead, with
the RLO pulse raise condition, the stopped bottle should continue its movement for some time,
turn off the photocell, and then be switched on again by the next bottle, to count another passing
bottle.
In Table 7.1, the counting instruction symbols CU or CD, in the case of FBD and LAD
programming languages, are simplified. Figure 7.11 presents the actual graphical form of the
CU symbol or block in the LAD language (Step7—Siemens), where it accepts six logical con-
nections or definitions. The input to the CU point of the block is the counting input. This input
can be either connected or denoted to the counter C
xx
where xx is the number of the counter.
In the inputs of S and R, proper input signals will be declared or connected for performing the
counter’s set and reset instructions. However, as mentioned above with the set instruction, the
counter is placed at a specific numerical value, and the latter should be declared somewhere in
the program or in a memory position. This operation can be achieved with the proper connec-
tion to the PV input. To the CV output, the current value of the counter is provided by the
CU
S
PV
C
xx
R
CU
Q
CV
CU
S
PV
R
CU
Q
CV
CV = current value of counter
Q = counter output (0 or 1)
CU = counting input
S = setting counter to an arithmetic value
PV = arithmetic value used by set instruction
R = resetting counter to zero value
xx = number of counter
CU
S
PV
R
CU
Q
CV
Do'stlaringiz bilan baham: |