Chapter 3 - Fundamental PLC Programming Chapter 3 Review Questions and Problems
Chapter 3 - Fundamental PLC Programming Chapter 3 Review Questions and Problems
Is a normally closed contact closed or open when the relay coil is energized?
2.
3.
4.
If a particular coil is to be an output of the PLC, when is the state of the coil
transferred to the outside world?
5.
Draw the ladder logic rung for a normally open IN1 AND'ed with a normally
closed IN2 driving a coil CR1.
6.
7.
What physical changes would be required to system wiring if the PLC system
of problem 5 had to be modified to operate as problem 6?
8.
Draw the ladder logic rung for a circuit in which IN1, IN2 and IN3 all have to
be ON OR IN1, IN2 and IN3 all have to be OFF in order for OUT1 to
energize.
9.
10.
Draw the ladder logic rung for an oscillator which will operate only when IN3
and IN5 are both ON or both OFF.
3-20
Objectives
Introduction
In addition to the standard logical operations that a PLC can perform, seasoned PLC
programmers are aware that, by taking advantages of some of the unique features and
characteristics of a PLC, some very powerful operations can be performed. Some of these
are operations that would be very difficult to realize in hardwired relay logic, but are
relatively simple in PLC ladder programs. Many of the program segments in this chapter
are rather cookbook by nature. The student should not concentrate on memorizing these
programs, but instead, learn how they work and how they can be best applied to solve
programming problems.
4-3.
Many persons new to PLC ladder logic programming may tend to think that, because
a PLC executes its program synchronously (i.e., from left to right, top to bottom), instead
of asynchronously (i.e., each relay operates whenever it receives a signal) it is a hindrance
to the programming task. However, after gaining some experience with programming
PLCs, the programmer begins to learn how to use this to their advantage. We will see
several useful program segments in this chapter that do this. Keep in mind that the order
of the rungs in these programs is critical. If the rungs are rearranged in another order, it
is likely that these programs will not operate properly.
4-1
Flip Flops
As we will see in the following several sections, a few of the circuits you
learned to use in digital electronics can be developed for use in a ladder diagram. The
ones we will study are the R-S, D, T and J-K Flip Flops and the One Shot. The One Shot
will supply the clock pulse for the D, T and J-K Flip Flops. These are functions that can be
very useful in a control system and tend to be more familiar to the student since they have
been studied in previous courses.
4-5.
RS Flip Flop
The R-S Flip Flop is the most basic of the various types. It has two inputs, an R
(reset) and an S (set). Turning on the R input resets the flip flop and turning on the S input
sets the flip flop. As you may recall from the study of this type of flip flop, the condition
where R and S are both on is an undefined state. The truth table for an R-S Flip Flop is
shown in Table 4-1.
R
Q'
Q'
For the purpose of our discussion, a 1 in the table indicates an energized condition
for a coil or contact (if energized, a normally closed contact will be open). An X in the table
indicates a don't care condition. The ladder diagram for such a circuit is shown in
Figure 4-1.
4-2
One Shot
As with the oscillator covered in a previous chapter, the one shot has its own
definition in the world of ladder logic. In digital electronics a one shot is a monostable
multivibrator that has an output that is on for a predetermined length of time. This time is
adjusted by selecting the proper timing components. A one shot in ladder logic is a coil that
is on for one scan and one scan only each time it is triggered. The length of time the one
shot coil is on depends on the scan time of the PLC. The one shot can be triggered by an
outside input to the controller or from a contact associated with another coil in the ladder
diagram. It can also be a coil that energizes for one scan automatically at startup. It is this
type we will study first, then the externally triggered type.
A one shot that comes on for one scan at program startup is shown in Figure 4-2.
4-3
4-5
D Flip Flop
4-6