Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

Ladder logic program

Internal
Inputs Start Stop relay Output
L1 I:3/0 I:3/1 B3:1/0 L2
Jog

I:3/2 B3:1/0
Start OL
O:2/2 M
I:3/0 Jog Stop M
I:3/2 I:3/1 O:2/2
Stop
I:3/1
B3:1/0

Figure 6-69 PLC program equivalent of the hardwired relay jog circuit.

6.12 Writing a Ladder Logic Program • List the sequence of operational steps in as much
detail as possible.
Directly from a Narrative Description
• Write the ladder logic program to be used as a basis
In most cases, it is possible to prepare a ladder logic program for the PLC program.
directly from the narrative description of a control process. • Consider different scenarios where the process se-
Some of the steps in planning a program are as follows: quence may go astray and make adjustments as needed.
• Define the process to be controlled. • Consider the safety of operating personnel and
• Draw a sketch of the process, including all sensors make adjustments as needed.
and manual controls needed to carry out the control The following are examples of ladder logic programs
sequence. derived from narrative descriptions of control processes.

EXAMPLE 6-1

Figure 6-70 shows the sketch of a drilling process that PB1 PB2
requires the drill press to turn on only if there is a part Drill
motor
present and the operator has one hand on each of the
start switches. This precaution will ensure that the opera- Switches
tor’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. Figure 6-71 shows the ladder logic
program required for the process implemented using an
SLC 500 controller.

Part sensor

Figure 6-70 Sketch of the drilling process.


Inputs Ladder logic program Output
L1 L2
PB1 Motor
PB1 PB2 Sensor contactor Motor
I:3/4 I:3/5 I:3/6 O:4/0 contactor
I:3/4
O:4/0 M
PB2

I:3/5
Sensor

I:3/6

Figure 6-71 Drilling process PLC program.

124 Chapter 6 Developing Fundamental PLC Wiring Diagrams and Ladder Logic Programs

plc4me.com
EXAMPLE 6-2

A motorized overhead garage door is to be operated au- • Green door open light to signal when the door is fully
tomatically to preset open and closed positions. The field open.
devices include one of each of the following: • Yellow door closed light to signal when the door is fully
closed.
• Reversing motor contactor for the up and down
directions. The sequence of operation requires that:
• Normally open down limit switch to sense when the • When the up button is pushed, the up motor contac-
door is fully closed. tor energizes and the door travels upward until the up
• Normally open-held closed up limit switch to sense limit switch is actuated.
when the door is fully opened. • When the down button is pushed, the down motor
• Normally open door up button for the up direction. contactor energizes and the door travels down until
• Normally open door down button for the down the down limit switch is actuated.
direction. • When the stop button is pushed, the motor stops.
• Normally closed door stop button for stopping the The motor must be stopped before it can change
door. direction.
• Red door ajar light to signal when the door is partially Figure 6-72 shows the ladder logic program required for
open. the operation implemented using an SLC 500 controller.

Input devices Program Output devices


(shown in unactuated
condition) L2
L1
Down Door ajar
Up limit Stop Up Down Intrlock Up limit Motor up
I:3/0 I:3/7 I:3/4 I:3/5 O:4/4 I:3/0 O:4/3 O:4/0 R

Motor up
Down limit O:4/3
I:3/1
Up
Door open
Stop Down Up intrlock Down limit Motor down
I:3/7 I:3/5 I:3/4 O:4/3 I:3/1 O:4/4 O:4/1 G
Door up

I:3/4
Motor down Door
O:4/4
closed

Door down O:4/2 Y


Up limit Down limit Door ajar
I:3/5 I:3/0 I:3/1 O:4/0

Motor
contactor
Stop door
I:3/7 Up limit O:4/3 UP
Door open
I:3/0 O:4/1

Down limit Door closed


Motor
I:3/1 O:4/2 contactor
O:4/4 DN

Figure 6-72 Motorized overhead garage door PLC program.

Developing Fundamental PLC Wiring Diagrams and Ladder Logic Programs Chapter 6 125

plc4me.com
EXAMPLE 6-3

Figure 6-73 shows the sketch of a continuous filling opera- Hopper


tion. This process requires that boxes moving on a con- PL Run
veyor be automatically positioned and filled.
The sequence of operation for the continuous filling
operation is as follows: PL Standby

• Start the conveyor when the start button is momen-


tarily pressed. Solenoid
PL Full
Level
• Stop the conveyor when the stop button is momen-
switch
tarily pressed.
• Energize the run status light when the process is
operating.
• Energize the standby status light when the process is
stopped.
• Stop the conveyor when the right edge of the box is Photo
first sensed by the photosensor. switch
• With the box in position and the conveyor stopped, Motor
open the solenoid valve and allow the box to fill. Filling
should stop when the level sensor goes true.
Start
• Energize the full light when the box is full. The full light Stop
should remain energized until the box is moved clear
of the photosensor. Figure 6-73 Sketch of the continuous filling operation.
Figure 6-74 shows the ladder logic program required for
the operation.

Inputs Ladder logic program Outputs


Stop Start Run
L1 L2
Stop Motor
Run

Start Run Solenoid


Standby

Photo Level Photo Full Run

Full Standby

Level
Photo Run Motor
Full

Full

Run Level Full Photo Solenoid

Figure 6-74 Continuous filling operation PLC program.

126 Chapter 6 Developing Fundamental PLC Wiring Diagrams and Ladder Logic Programs

plc4me.com

You might also like