Anda di halaman 1dari 12

Industrial Electronics

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

Input
Devices

Figure 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).

1
Industrial Electronics

Delta PLC Training Workbench

Analog Outputs Digital Outputs

Delta PLC

Analog Inputs
Digital Inputs

Figure 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-13
X1 DI-2 X25 DI-14 Y1 DO-2 Y27 DO-14
X2 DI-3 X26 DI-15 Y2 DO-3 Y30 DO-15
X3 DI-4 X27 DI-16 Y3 DO-4 Y31 DO-16
X4 DI-5 X30 DI-17 Y4 DO-5 Y32 DO-17
X5 DI-6 X31 DI-18 Y5 DO-6 Y33 DO-18
X6 DI-7 X32 DI-19 Y20 DO-7 Y34 DO-19
X7 DI-8 X33 DI-20 Y21 DO-8 Y35 DO-20
X20 DI-9 X34 DI-21 Y22 DO-9 Y36 DO-21
X21 DI-10 X35 DI-22 Y23 DO-10 Y37 DO-22
X22 DI-11 X36 DI-23 Y24 DO-11
X23 DI-12 X37 DI-24 Y25 DO-12
Analog Input Need to Read control register using “ From” instruction
Analog Output Need to write control register using “ To” instruction

2
Industrial Electronics

Delta PLC Training Workbench consists of following 5 modules:

Sr # Name Remarks
Power Supply Module

1. DVP-PS01

CPU with 8 External inputs and 6 External


outputs

2. DVP-14SS

Extension Module with 8 External Inputs and 8


External Outputs

3. DVP-SP16 x 2

3
Industrial Electronics

 Analog - 4 input points


 Analog input : ±10V or ± 20 mA
 Resolution 14bit Voltage Input, 13bit
Current Input
 Analog – 2 output points
 Analog output: ±10V or ± 20 mA
4. DVP-06XA
 Resolution output 12bit

DVP-14SS PLC controller Memory Structure:


Memory Structure of the PLC is shown in Table 3-4, which have some specified area for I/Os relays,
Internal Relays, Data memory, Timer and Counter Area, and Error Area. These areas are pre-defined by
manufactures. Basic introduction to some internal memory areas:
 Input Relay: Input relay is the basic storage unit of the memory that corresponds to the external
input. Input signal from outside will decide the logic “0” or “1”. The status of Input and Output
relays in the memory couldn’t be changed by program design or via 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.

4
Industrial Electronics

DEVICE DESCRIPTION USAGE RANGE TOTAL

X External Input Relays X0-X177 128 Points


For External Input Devices (Octal
i.e. Switches, Buttons, Number
Sensors etc. System)
Y External Output Relays Y0 128 Points
For External Output Devices Y1 (Octal
i.e. Motors, Valves, Lights & Y2 Number
Lamps etc. - System)
-
Y7
Y10
-
-
Y17
M Internal/Auxiliary Relays M0~M511, 744 Points
General M768~M999

Latched M512~M767 256 Points

Special M1000~M1279 280 Points

T Timer Area T0~T63 64 Points


100ms
10ms T64~T126 63 Points
If M1028=ON it is 10ms
If M1028=OFF it is 100ms
1ms T127 1 Point
C Counter C0~C111 112 Points
16 Bit UP Counter General
16 Bit UP Counter Latched C112~C127 16 Points
32 Bit High Speed Latched C234~C254 Points
Counter

Table 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.
 Data Register: PLC needs to handle data and operation when controlling each order, timer value
and counter value etc. The data register is used to store data or parameters. It stores 16-bits data as a
word and 32-bits data as a double word. There are some latched data areas, which store data

5
Industrial Electronics

permanently i.e. it, retains data if the power is failed and some unlatched area, which lose data on
power failure. The data area is given in the PLC datasheet. The data register is represented by “Dn”
where “D” is the data area and “n” shows its location. For example, D0, D1, D2, D100, D500 etc.
Some special data registers are:
 D1000 is watchdog timer value. Watchdog timer is used if the scan time of your ladder
program increases from the value set in this data register.
 D1001 shows the PLC model number and memory capacity.
 D1004 shows the error flag number.
 D1010 shows the current scan time.
 D1061 shows the detailed error codes.
Some of the special data registers are Read only, which cannot be changed, and some special register can
be changed according to your requirements.

Introduction to Ladder Logic

Ladder logic uses graphic symbols similar to relay schematic circuit diagrams. The structure behind
ladder logic is based on the electrical ladder diagrams that were used with relay logic. These diagrams
documented how connections between devices were made on relay panels; they are called “ladder”
diagrams because they are constructed in a way that resembles a ladder with two vertical rails and rungs
between them. The positive power rail (on the left) flows to the negative power rail (on the right) through
the physical devices connected on the rung. The example below shows a ladder diagram with
pushbuttons (PB), control relays (CR), a motor (M) and a light (L).

Figure 3 Relay Logic Diagram

Similarities with Ladder Logic Diagram

Ladder logic was designed to have the same look and feel as relay logic diagrams, but with ladder logic,
the physical contacts and coils are replaced with memory bits. Let’s take a look at figure 8.

6
Industrial Electronics

Figure 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.

7
Industrial Electronics

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.

8
Industrial Electronics

Figure 5: WPL Software window

Launching a New Project:

 Then create a New Project as <File>--<New> or Click on the New icon.

Then the “Machine type setting” window will appear as show in fig 6.

Figure 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

9
Industrial Electronics

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 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 8: Icons

10
Industrial Electronics

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 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”.

Figure 10: The “Device Command” Window for Input Command

This is a Normally Close (NC) contact or LDI command and having the same “Device Command”
window given. But this window will give explanation about the “Close Contact”. The shortcut for
this command is “F2’.

11
Industrial Electronics

This is a Rising Edge Input contact or LDP command. The shortcut for this command is “F3”.

This is a Falling Edge Input Contact or LDF command. The shortcut for this command is “F4”.

This command is used for the Step Command. Step instruction is a special programming command
used for the ladder programming working in steps. The shortcut is “F5”.

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”

12

Anda mungkin juga menyukai