Docsity

Introduction to Programmable Logic Controllers (PLCs): A Practical Guide with Exercises, Exercises of Engineering

Toggle sidebar
bg1
Experiment # 01
Objective
Introduction to Programmable Logic Controller
A PROGRAMMABLE LOGIC CONTROLLER (PLC) is an industrial computer control system that
continuously monitors the state of input devices and makes decisions based upon a custom program, to
control the state of devices connected as outputs
Basic Parts of PLC
A PLC consists of following basic parts.
• Central Processing Unit
• Programming Device
• Input/ Output Module
Figure SEQ Figure \* ARABIC 1: Block Diagram of PLC
CPU
The principle operation of CPU is to accept (reads) input data from sensing devices, executes the user
program from memory and sends appropriate commands to control devices.
Programming Device
The Programming device is used to enter the required program into the memory of the processor. The
program is developed in the device and then transferred to the memory unit of the PLC.
Input/Output Modules
Input/output modules are where the CPU receives information from external devices and communicates
information to external devices. Input devices are (e.g. start and stop pushbuttons, sensors, limit switch,
selector switch) and output devices are (e.g. lights, solenoid valve, relays, buzzer, fan).
Industrial Electronics
1
Input
Devices
pf3
pf4
pf5
pf8
pf9
pfa
pfd

Partial preview of the text

Download Introduction to Programmable Logic Controllers (PLCs): A Practical Guide with Exercises and more Exercises Engineering in PDF only on Docsity!

Experiment # 01

Objective

Introduction to Programmable Logic Controller

A PROGRAMMABLE LOGIC CONTROLLER (PLC) is an industrial computer control system that continuously monitors the state of input devices and makes decisions based upon a custom program, to control the state of devices connected as outputs

Basic Parts of PLC

A PLC consists of following basic parts.

  • Central Processing Unit
  • Programming Device
  • Input/ Output Module

Figure SEQ Figure * ARABIC 1: Block Diagram of PLC

CPU

The principle operation of CPU is to accept (reads) input data from sensing devices, executes the user

program from memory and sends appropriate commands to control devices.

Programming Device

The Programming device is used to enter the required program into the memory of the processor. The

program is developed in the device and then transferred to the memory unit of the PLC.

Input/Output Modules

Input/output modules are where the CPU receives information from external devices and communicates

information to external devices. Input devices are (e.g. start and stop pushbuttons, sensors, limit switch,

selector switch) and output devices are (e.g. lights, solenoid valve, relays, buzzer, fan).

Input Devices

Delta PLC Training Workbench

Figure SEQ Figure * ARABIC 2: I/O’s of Delta PLC Training Workbench

Addressing of Delta PLC Training Workbench

Digital Inputs Digital Outputs Push Button Toggle Switch Light Emitting Diode Adress Adress Adress Adress X0 DI-1 X24 DI-13 Y0 DO-1 Y26 DO- X1 DI-2 X25 DI-14 Y1 DO-2 Y27 DO- X2 DI-3 X26 DI-15 Y2 DO-3 Y30 DO- X3 DI-4 X27 DI-16 Y3 DO-4 Y31 DO- X4 DI-5 X30 DI-17 Y4 DO-5 Y32 DO- X5 DI-6 X31 DI-18 Y5 DO-6 Y33 DO- X6 DI-7 X32 DI-19 Y20 DO-7 Y34 DO- X7 DI-8 X33 DI-20 Y21 DO-8 Y35 DO- X20 DI-9 X34 DI-21 Y22 DO-9 Y36 DO- X21 DI-10 X35 DI-22 Y23 DO-10 Y37 DO- X22 DI-11 X36 DI-23 Y24 DO-

Analog InputsAnalog OutputsDelta PLCDigital InputsDigital Outputs

HPP (Handheld Programmer). X0, X1, X7, X10, X15, and X20 etc represent the input relays. The “X” represents the input and the decimal number shows their position or Input number. The contacts of any input can be used unlimitedly in the ladder program.

  • Output Relay: Output relay is the basic storage unit of the memory that corresponds to external output. Y0, Y1, Y7, Y10, and Y20 etc represent output relays. The “Y” represents output and the decimal number shows the output relay number.
  • Internal Relay: The internal relays are not connected directly to the external outputs. These are the auxiliary relays in the PLC. Its function is the same as the auxiliary points in the control circuits i.e. to monitor some conditions. The representation of internal relays is “Mn” where “M” represents the internal relay and “n” shows its number i.e. M0, M5, M10, M25 etc. Total number of the internal relays present in the Memory can be found in the datasheet of the PLC controller in Index A. There are some special auxiliary relays, which are predefined and given in the datasheet. These auxiliary relays have special functions for example,

■ M1000 is Normally-ON contact means that it is always ON.

■ M1001 is Normally-OFF contact means that it is always OFF.

■ M1002 is On only for one scan after Run.

■ M1004 is On when error occurs.

■ M1009 is On when power supply (24VDC) is low.

■ M1011 is 10msec clock

■ M1012 is 100msec clock

■ M1013 is 1sec clock

These are some important internal relays, which can be used freely in the ladder diagram. Some special

internal relays are Read Only, which cannot be changed, and some special relays can be changed

according to your requirements.

DEVICE DESCRIPTION USAGE RANGE TOTAL

X External Input Relays For External Input Devices i.e. Switches, Buttons, Sensors etc.

X0-X177 128 Points (Octal Number System) Y External Output Relays For External Output Devices i.e. Motors, Valves, Lights & Lamps etc.

Y Y Y

**-

Y Y

Y**

128 Points (Octal Number System)

M Internal/Auxiliary Relays General

M0~M511, M768~M

744 Points

Latched M512~M767 256 Points

Special M1000~M1279 280 Points

T Timer Area 100ms

T0~T63 64 Points

10ms T64~T If M1028=ON it is 10ms If M1028=OFF it is 100ms

63 Points

1ms T127 1 Point C Counter 16 Bit UP Counter General

C0~C111 112 Points

16 Bit UP Counter Latched C112~C127 16 Points 32 Bit High Speed Latched Counter

C234~C254 Points

Table SEQ Table * ARABIC 1 Memory Structure of 14SS

  • Timer Area: Timer is used to control a time period. There are coil, contact and timer storage unit in instruction of timer. When a time delay is required then a timer coil is activated and the time set value is entered. When the desired time is achieved then the contacts are activated. Each timer has its base timing period, which is shown in datasheet. Timers have base time 100ms, 10ms, and 1ms. There are 128 timer from T0~T127. Timer is represented by “Tn” where “T” represent timer and “n” shows the timer number.
  • Counter Area: Counter is used for count. The counter instruction contains coil, contact and counter storage unit. Before using a counter it is set by an instruction in ladder program. There are 16-bit, 32-bit, and high-speed counter. The counter is represents by “Cn” where “C” is counter and “n” is counter number. There are 128-counters from C0~C128 and high speed counter C234~C254.

Figure SEQ Figure * ARABIC 4: Ladder Logic Diagram

For this program, the relay logic’s ladder diagram is duplicated with ladder logic; no more hard-wired

logic, but memory locations instead. Some of these memory locations are used internally and others are

used with external inputs and outputs. To monitor and control real world devices, they will need to be

wired to I/O modules.

For this particular Delta PLC Trainer, these inputs and outputs are assigned to X and Y memory addresses

like the X0 seen with PB1. This normally open contact’s state is read from the input on the I/O module

where the physical pushbutton is connected. On the other hand, each Y bit will have an output device

wired to it as seen with the light controlled by Y1. All of the other locations are assigned to internal bits

that we can use as needed.

Execution of Ladder Logic

Before starting to execute the logic, the CPU reads the physical inputs tied to the I/O modules to update their status in the CPU’s memory table. Then, starting at the top left of the program, the CPU works its way down the rail executing each rung or sub rung from left to right. So if PB1 is pressed, the CPU will turn ON CR1. Since CR1 has changed states, in rung 3 the CPU will activate CR3. CR3’s normally- closed state is used in rung 4, so the CPU will then turn OFF L1.

Even though we still refer to coils and contacts in ladder logic, remember that they are memory representations, not actual devices. Once the CPU reaches the last rung it will update the real world

outputs, then loop back and run it all again. This process will continue as long as the CPU is powered and in the RUN mode.

Basic Ladder Logic Symbols

Normally Open Contact

Passes power (ON) if coil driving the contact is ON (closed) Normally Closed Contact

Passes power (ON) if coil driving the contact is off (open)

Output Coil

If any left-to-right path of inputs passes power, output energized.

Ladder Logic Diagram Instructions

  • Power flows from left to right.
  • Output appears on extreme right hand side of rung always.
  • Each rung contains one output at least.
  • Input any instruction that can replace a contact.
  • A particular input and output can appear in more than one rung of a ladder.
  • The inputs and outputs are all identified by their addresses, the notation used depending on the PLC manufacturer.

Programming Software WPL for Delta PLC Trainer

WPLSoft is a program editor of Delta DVP series PLC for WINDOWS computers. In addition to general PLC programming and WINDOWS editing functions (e.g. Cut, paste, copy, multi-window display, etc.), WPLSoft also provides various comment editing as well as other special functions (e.g. register editing and settings, file accessing and saving, contacts monitoring and setting, etc.).

Program Execution When installation is completed, Double click WPLSoft icon to execute the program. The WPL editor window will pop up, as shown below. There are only File, View, Communication, Options and Help in

the toolbar when executing WPLSoft for the first time.

Figure SEQ Figure * ARABIC 6: Creating a New project

In this window you will have to give the “Title” of your program, PLC controller “Model or Machine

type”, and give a name to your file in “File Name”. Let’s give our program a Title i.e. say “Test”, PLC

model is “SS-series” and File name is “Dvp1”. Then click “ok” will open two windows on your screen

one for “Ladder diagram mode” and the second for “Instruction mode” as shown in the fig. 7. The “Title”

and “File Name” will also appear on the top of title bar of your screen.

Figure SEQ Figure * ARABIC 7: Ladder and Instruction Mode Window

The PLC status bar shown on the bottom of the window, indicates PLC series, steps used in ladder & the total steps capacity and the instruction used location in the Window i.e. Row & Column.

  • Ladder Mode: PLC controllers are mostly programmed in Ladder programming language, because it is easy to use and their familiarity to technical personals. In this manual, we will also use ladder mode as a programming language. So maximizing the “Ladder Diagram Mode” will use for ladder diagram and title bar will also show the “Ladder Diagram Mode”.
  • Instruction Mode: But some people, who are familiar to C-language or BASIC programming language or have use Assembly Language for programming, can also use “Instruction Mode” for PLC programming.

Some Important Ladder Software Tools and Shortcuts Bars:

Fig.8 shows some icons which can be freely used for the creating ladder, communication (PC to PLC) and monitoring (Online or Offline) etc. These icons can be accessed from the Main Menu bar.

Figure SEQ Figure * ARABIC 8: Icons

Important Ladder Programming Tools and their Functions:

Now let’s discuss the some important symbols used in the Ladder programming. The Fig. 9 shows some important ladder symbols.

Figure SEQ Figure * ARABIC 9

This is a Normally Open (NO) contact or LD command. By clicking this icon a small window will

appear as shown in the fig. 9. The window gives some explanation about the “Input Command” such as

that it is an “Open Contact” and “Input Relay” if “X” is selected. The Device Name such as “X”, “Y”,

“T” and “C” etc. and Device Number mean it’s Address i.e. “X0”, “Y0” and “T0” etc. will be given. The

selected device possible range will be shown on the window such as X0~X177. The comments about the

device can be given such as for “X0” write “Start Button” mean that it is a start button. The shortcut for

this command is “F1”.

This is used for giving the Application Command such as Input & Output, Timer & Counter, Shift and Compare commands. The window shown in the fig. 4-13 will appear used for the application command. The “Function List” will give the list of command. Let us select an “Output Command” then the window will extended. Select “PLF” from the “Command” then the “API Number” will show “89”. There will be also “Instruction Hint” which shows the about the instruction. The Device and its Number to which this command is applicable can be selected from “OPI” and “Device Number”. On the bottom of the small window a small line shows the detail of devices to which this command is applicable are represented by a “*” symbol. The shortcut for Application Command is “F6”