You are on page 1of 7

ME 401 : Mechatronics

Laboratory Eight

Programmable Logic Controllers

Required Materials
Hardware
Direct Logic 05 PLC
P.C.
Project boxes with LEDs and Switches

Software
DirectSoft 5

Study Material
Course Text

Purpose

The purpose of this lab is to understand and implement the ladder logic to program a PLC.

Introduction
Overview
A programmable logic controller, also called a “PLC” or “programmable controller”, is a computer –
type device often used to control equipment in an industrial facility. The kinds of equipment that PLCs
can control are numerous. Conveyor systems, food processing machinery, and auto assembly lines are
all controlled by PLCs.

In a traditional industrial control system, all control devices are wired directly to each other according to
how the system is supposed to operate. In a PLC system, however, the PLC replaces the wiring between
the devices. Instead of being wired directly to each other, all equipment is wired to the PLC. A computer
program inside the PLC, called the control program, provides the connection between the devices. This
is called softwiring.

1
The softwiring ability of a PLC is its biggest benefit. Softwiring makes changes in the control system
easy and cheap. If you want a device to behave differently, or to control a different process element, all
you have to do is change the program. In a traditional system, this type of change would require rewiring
the system. In addition to being flexible, PLCs are reliable, require small investments of space, can
withstand harsh environments, and are expandable.

How They Work


A PLC consists of two basic elements; a central processing unit (CPU) and an input/output (I/O)
system.

The CPU is the brains of the PLC. A processor inside the CPU retrieves, decodes and processes
information. The memory system stores both the control program and data from any equipment
connected to the PLC. The voltage and current necessary to operate are provided by the power supply.

The I/O is the section of a PLC to which all of the field devices are connected. This is the part that
actually carries out the control commands from the PLC‟s program. Inputs supply a signal/data to the
PLC. Examples are switches and measurement devices. Outputs are signals from the PLC to outlying
devices to perform specific functions. Horns, lights, motors and valves are examples of output devices.

All PLCs function the same way, regardless of the types or number or “bells and whistles” attached. A
PLC examines the state of each input, executes its control program and updates its output devices
accordingly.

Two Basic instructions

Instructions Symbol Operation


XIC (Examine ON) Go look for 1. If it finds 1, then this instruction is True. This
is an input instruction.

XIO (Examine OFF) Go look for 0. If it finds 0, then this instruction is True. This
is also an input instruction.

OTE (Output Energize) Go write 1. If this instruction is True based on the input
instructions, then it will write 1, otherwise it will write 0 on
the output address.

2
Lab Procedure
Part 1
Purpose

In this lab you will use Directsoft 5.0 to program a PLC for the following application:

Program an off/on toggle switch to control a LED.

Procedure:

Use the following I/O Chart

Field device Symbolic address Field device Symbolic address

Toggle Switch X1 LED Y1

Let‟s develop our program using Directsoft 5 software.

1. Click on the DSLaunch5 icon located on your desktop screen to open the DSLaunch window. The
following DSLAUNCH window will appear.

2. Double-click on DirectSOFT 5 Programming under Applications on the menu tree


and then Click on Run DirectSOFT100.
3. Name the new project as Lab8_part1, select PLC family Direct Logic 0/1/2/4/350 and CPU type
DL 05 and click OK.

4. Click on EDIT Mode button; to activate the Ladder Palette.


5. Enter an Input Element: Click on the Normally Open Contact (F2) symbol on the palette.
6. Enter X1 over C0. Then, either click on the check mark (√) or press the Enter key.

3
7. Enter an Output Element: Now, moves the cursor to the end of the rung, positioned over the NOP.
Click on the Browse Coils button on the Ladder Palette. The Instruction Browser will appear with
the Standard Coil selected Out. Click OK.

8. Enter Y1 over C0. Then, either click on the check mark (√) or press the Enter key.

9. Enter the End Rung: To program this rung, position the cursor so it is over the NOP at the end of
Rung 2, and click on the Browse Coils button. Select Program Control located in the Coil Class
selection window. Next, select END located in the Coils selection window. Click on OK, and then
Enter.

10. Click Accept button to compile the program. Once the rungs are accepted with no errors, the
yellow bar will change to green. To save the program to disk, click on the Write button.

11. Connect the PC to the PLC: Connect the programming cable from the serial port of the PC to the
serial port of the PLC. Turn on your PLC and be sure that the
RUN\TERM\STOP switch on the PLC is in the TERM position. Now, click on PLC on the Menu
Bar, then select Connect from the dropdown menu and click on select. An Online/Offline
Differences dialog box will appear. Then select the Use Disk button.
12. At this point the program has not been written to the PLC. To write the program to the PLC, select
WriteP. Then Click on the Mode button on the online toolbar. This will bring the PLC Modes
dialog window into view. Click on Run, then OK.
13. Nice job! You are done with program the PLC. Now disconnect PLC from PC and by pushing X1
button you will observe the Y1 LED enlighten.

Part 2
Purpose: Program PLC using Directsoft 5.0 software that accomplishes the following:

1. A push button provides master power by activating an internal relay and the relay stays active
after the button is released.
2. A second push button can be activated to turn off the internal relay
3. The motor is ON when the master power is ON and the motor is OFF when the system is not
powered.

Procedure:

Use the following I/O Chart

Field device Symbolic address Field device Symbolic address

Master On X4 Motor (symbolized Y2


(Normally open with Red LED)
momentary push button)
Master Off X3
(Normally closed
momentary push button)

4
Shown below is the DSLaunch5 program that should execute the given instructions. Recreate this
program and make sure you understand all comments. You may include your own comments by clicking
on Tools on the menu toolbar and selecting Comment Editor. This will allow you to write comments
for the rung that you have selected. The rows 1, 2, 3, 4, 5, etc… as shown are called rungs.

Tips: Use Ctrl+Arrows to draw the branches of a rung.

Once your program is complete, you must click on the “Accept Changes” icon that appears next to the
“Edit Mode On” icon. Then, click on the “Write P” icon to write the program into the PLC. Click on the
“Mode” icon and select run mode, and then click on the “Status” icon to see the way your program
operates. You are now able to execute your program.

Disconnect the PLC from PC and perform the master off and on operation.

5
Part 3

A continuous filling operation requires boxes moving on a conveyor to be automatically positioned and
filled

Sequence of operations

1. Start conveyer when the START button is


momentarily pressed.
2. Stop the Conveyer when the STOP button is
momentarily pressed.
3. Energize the RUN status light when the
process is operating.
4. Stop the conveyor and energize the
SOLENOID light when the right edge of the
box is first sensed by the photo sensor
5. With the box position and conveyor stopped,
open the solenoid valve and allow the box to
fill. Filling should stop when the LEVEL
sensor goes true.
6. Energize the FULL light when the box is full.
The FULL light should remain energized until
Use the following I/O Chart the box is moved clear of the photo sensor

Field device Symbolic Field device Symbolic


address address

START button X4 MOTOR Y3


(symbolized with a Red LED)
STOP button X3 SOLENOID Y4
(symbolized with a Green LED)
PHOTO sensor X0 RUN LED Y2
(symbolized with a Toggle Switch)
LEVEL sensor X1 FULL LED Y0
(symbolized with a Toggle Switch)
STANDBY LED Y1

6
Ladder logic of the process should similar as following (use the assigned logic address for the Field
devices shown)

In the green symbol around an instruction indicates that it is active for the state of process
(STANDBY mode) shown in the figure. After writing the ladder logic, upload the program in PLC,
disconnect it from the PC and perform the following operations

1. Push the START button (black, normally open, momentary push button on your switch
board). Write down, what have you observed in output devices? (Make it sure that at
the beginning of the process both toggle switches representing PHOTO sensor and
LEVEL sensor will be at OFF state)
2. Turn ON the PHOTO sensor. Write down, what have you observed in output devices?
3. Turn ON the LEVEL sensor. Write down, what have you observed in output devices?
4. Push the STOP button (Red, normally closed, momentary push button on your switch
board). Write down, what have you observed in output devices?

Your report should follow the format described below:


1. Lab title
2. Hardware and Software
3. Objective
4. Descriptions of the problems you have experienced and how you solved them
5. Include the ladder logic that you have generated, add brief explanations or descriptions „how the
logic is working‟ after each plot.
6. Summary or conclusion

You might also like