Chapter 6 PLC Basics
Chapter 6 PLC Basics
Programmable Logic
Controller
6.1 Introduction to Programmable Logic
Controllers
6.2 PLC Hardware
6.3 Fundamentals of PLC Programming
6.4 PLC Wiring Diagrams and Ladder Logic
Programs
6.5 Timers
6.6 Counters
SIMATIC STEP 7 Safety Advanced V15.1 –
TRIAL - ID: 109759618 - Industry Support
Siemens
6.1 Introduction to Programmable Logic Controllers
1. What is a PLC?
The term PLC stands for what?
2. Draw a block diagram showing in very
general terms the main parts in a PLC and
explain the main function of each part.
3. List six distinct advantages that PLCs
offer over conventional relay-based
control systems.
4.Answer the following with reference to the process control relay
ladder diagram of Figure :
a. When do the pressure switch contacts close?
b. When do the temperature switch contacts close?
c. How are the pressure and temperature switches connected with
respect to each other?
d. Describe the two conditions under which the motor starter coil
will become energized.
5. Answer the following with reference to the process control PLC ladder
logic diagram of Figure :
a. What field device is the number I/2 identified with?
c. What two conditions will provide a continuous path from left to right
across the rung?
d. Describe the sequence of operation of the controller for one scan of the
program.
6. Given two single-pole switches, write a
program that will turn on an output when
both switch A and switch B are closed.
7. Given two single-pole switches, write a
program that will turn on an output when
either switch A or switch B is closed.
8. Given four NO (Normally Open)
pushbuttons (A-B-C-D), write a program
that will turn a lamp on if pushbuttons A
and B or C and D are closed.
9. Write a program for the relay ladder diagram shown in the
Figure.
Homework
PLC Hardware
Objectives
• • List and describe the function of the hardware
components used in PLC systems
• • Describe the basic circuitry and applications for
discrete and analog I/O modules
• • Explain I/O addressing
• • Describe the general classes and types of PLC
memory devices
• • List and describe the different types of PLC
peripheral support devices available
6.2.1 The I/O Section
The input/output (I/O) section of a PLC
is the section to which all field devices
are connected and provides the
interface between them and the CPU.
6.2.2 Discrete I/O Modules
The user memory of a PLC includes space for the user program
as well as addressable memory locations for storage of data.
I0.0
Q0.1
I0.1
Q0.2
I0.2
Q0.0
I0.0
I0.1 Q0.1
I0.2
Q0.2
I0.0
Q0.0
Q0.0
I0.1
I0.2
Timers
The most commonly used PLC instruction, after coils and contacts,
is the timer.
This chapter deals with how timers time intervals and the way
in which they can control outputs.
We discuss the basic PLC on-delay timer function, as well as
other timing functions derived from it,
and typical industrial timing tasks.
6.5.1 Timer Instructions
TON (Timer On Delay)—Counts time-based intervals when the
instruction is true.
I0.0 Q0.0
2. When the lights are turned off in a building, an exit door light is
to remain on for an additional 2 min, and the parking lot lights are
to remain on for an additional 3 min after the door light goes out.
Write a program to implement this process.
6.6
Counters
All PLCs include both up-counters and down-counters. Counter
instructions and their function in ladder logic are explained in
this chapter. Typical examples of PLC counters include the
following: straight counting in a process, two counters used to
give the sum of two counts.
6.6.1 Counter Instructions
Mechanical counter
Every time the actuating lever is moved over, the
counter adds one number; the actuating lever then
returns automatically to its original position. Resetting
to zero is done with a pushbutton located on the side
of the unit.
Electronic counters
Q0.1
I0.0
Q0.0
I0.1
Red PL
Green PL
PB2
C20
Red PL
Green PL
PB2
C20
Red PL
Green PL
PB2
C20
• Pulsing the reset input (PB3) at any time will reset the
accumulated count to 0 and turn the output light off.
Generic up/down-counter program.
Parking garage counter.
• As a car enters, the enter
switch triggers the up input of
the counter and increments the
accumulated count by 1.
Control Purpose:
Control Purpose:
This program is used for monitoring the
product amount in the warehouse by
photoelectric sensors at both entry and exit.
When the amount reaches 30,000, the alarm will
Control Program:
Program Description:
Control Purpose:
Once the photoelectric sensor detects 10
products, the robotic arm will begin to pack up.
When the action is completed, the robotic arm
and the counter will be reset.
Control Program:
Program Description: