PLC Programming Strategy: Presented By: Engr. Ojay DL. Santos, M.Eng
PLC Programming Strategy: Presented By: Engr. Ojay DL. Santos, M.Eng
Presented by:
1
Sum-of-products method
RULES:
Pick out all the rows that contain a logic 1 in the
output column.
For each row that has an output equal to logic 1,
logically AND the corresponding inputs together
using a negation whenever an input is zero.
Take all the row products and OR them together.
Sum-of-products method
EXAMPLE: Draw the ladder diagram of the given truth table.
A B C f
0 0 0 0
0 0 1 1
0 1 0 0
0 1 1 0
1 0 0 0
1 0 1 1
1 1 0 0
1 1 1 1
2
f A B C AB C ABC
Sum-of-products method
EXAMPLE: Draw the ladder diagram of the given truth table.
A B C f
0 0 0 0 Solution:
0 0 1 1
Using the laws of Boolean
0 1 0 0
algebra or Karnaugh
0 1 1 0 mapping, the output can be
1 0 0 0 minimized to
1 0 1 1
1 1 0 0
1 1 1 1
Product-of-sums method
RULES:
Pick out all the rows that contain a logic 0 in the
output column.
For each row that has an output equal to logic 0,
3
Product-of-sums method
EXAMPLE: Draw the ladder diagram of the given truth table.
A B C f
0 0 0 0
0 0 1 1
0 1 0 0
0 1 1 0
1 0 0 0
1 0 1 1
1 1 0 0
1 1 1 1
f A B C AB C ABC
Product-of-sums method
EXAMPLE: Draw the ladder diagram of the given truth table.
A B C f
0 0 0 0 Solution:
0 0 1 1
Using the laws of Boolean
0 1 0 0
algebra or Karnaugh
0 1 1 0 mapping, the output can be
1 0 0 0 minimized to
1 0 1 1
1 1 0 0
1 1 1 1
4
Application Problems
1. The figure shows the sketch of a
drilling process that requires the drill
press to turn on only if there is a part
present and the operator has one hand
on each of the start switches. This
precaution will ensure that the
operator’s hands are not in the way of
the drill. The sequence of operation
requires that switches 1 and 2 and the
part sensor all be activated to make the
drill motor operate. Write a PLC
program that will implement this.
Application Problems
2. It is desired to implement a switch system (using
SPST) similar to a three-way switch in house
wiring; that is, a light may be turned on or off from
either of two switches at doors on opposite ends of
the room. If the light is turned on at one switch, it
may be turned off at the other switch and vice
versa. Design and simulate a PLC program that will
provide this.
5
Application Problems
3. Design and simulate a PLC program for a lighting
control system controlled by four switches – S1, S2,
S3, and S4. The lighting will be ON when only two
switches are closed.