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

Jabatan Kejuruteraan Elektrik & Elektronik

EEE 3905: Control Engineering Laboratory 1


HARDWARE

LAB 6
PROGRAMMABLE LOGIC CONTROLLER (PLC)

Objective:

1. To able to describe the operation of PLC.


2. To able to convert ladder diagrams to their equivalent mnemonics codes.

Equipment:

CPM1A CPUs Unit


Programming Console PRO27
Lab manual

Theory

A PLC consists of a Central Processing Unit (CPU) containing an application


program and Input and Output interface modules, which is directly connected to
the field I/O devices. The program controls the PLC so that when an input signal
from an input device turns ON, the appropriate response is made. The response
normally involves turning ON an output signal to some sort of output devices.

Figure 12.1: Block diagram of PLC

1
Jabatan Kejuruteraan Elektrik & Elektronik
EEE 3905: Control Engineering Laboratory 1
HARDWARE
Central Processing Unit

The Central Processing Unit (CPU) is a microprocessor that coordinates the


activities of the PLC system. It executes the program, processes I/O signals and
communicates with external devices.

Memory

There are various types of memory unit. It is the area that hold the operating
system and user memory. The operating system is actually a system software
that coordinates the PLC. Ladder program, Timer and Counter Values are stored
in the user memory. Depending on user’s need, various types of memory are
available for choice:

(a) Read-Only Memory (ROM)

ROM is a non-volatile memory that can be programmed only once. It is


therefore unsuitable. It is least popular as compared with others memory
type.

(b) Random Access Memory (RAM)

RAM is commonly used memory type for storing the user program and
data. The data in the volatile RAM would normally be lost if the power
source is removed. However, this problem is solved by backing up the
RAM with a battery.

(c) Erasable Programmable Read-Only Memory (EPROM)

EPROM holds data permanently just like ROM. It does require battery
backup. However, its content can be erased by exposing it to ultraviolet
light. A prom writer is required to reprogram the memory.

(d) Electrically Erasable Programmable Read-Only Memory (EEPROM)

EEPROM combines the access flexibility of RAM and the non-volatility of


EPROM in one. Its contents can be erased and reprogrammed electrically,
however, to a limited number of times.

2
Jabatan Kejuruteraan Elektrik & Elektronik
EEE 3905: Control Engineering Laboratory 1
HARDWARE
System Configuration

(a) Training Kit

In Figure 12.2, we can see the overall outlook of the CPM1A training kit. It
consists of : 12 Input switches connected to the input terminals of the CPM1A
CPU.

On the top surface of the CPM1A, we could find the peripheral port, 4 LED
indicators and the expansion port. The peripheral port is meant for the
programming console or the RS232C peripheral interface. The four LED
indicators are RUN, POWER, ERROR and Communication.

Figure 12.2: The CPM1A Training Kit

The L and N terminals is connected to power source to supply power to the


CPM1A.

In the CPM1A, channel 0 is assigned as input and channel 10 is assigned as


output. Each channel consists of 16 bits starting from bit 00 to bit 15.

3
Jabatan Kejuruteraan Elektrik & Elektronik
EEE 3905: Control Engineering Laboratory 1
HARDWARE

Figure 12.3: The input and output channel

(b) Programming Console

Before we start to program the PLC, lets familiarize ourselves with the
essential operations of the keyboard and initial settings required.

Figure 12.4 : Programming Console

4
Jabatan Kejuruteraan Elektrik & Elektronik
EEE 3905: Control Engineering Laboratory 1
HARDWARE

The Programming Console may be set to either PROGRAM, MONITOR or


RUN modes.

PROGRAM mode is used for preparing programs or for making modifications


or corrections to existing programs.

MONITOR mode is used when changing the contents of memory areas while
the PLC is actually in operation.

RUN mode is used to execute the program that has been entered into
the PLC. No changes can be made to the internal data in the run
mode.

Figure 12.5: The command keys

The command keys

FUN
Numerous special application commands called FUNctions
may be input using this key

LD LoaDs points into the program, and provides a means of


branching points.

AND
LD AND allows points to be connected together, to form a series
circuit
5
Jabatan Kejuruteraan Elektrik & Elektronik
EEE 3905: Control Engineering Laboratory 1
HARDWARE

OR OR allows points to be connected together, to form parallel


circuit

OUT The OUTput commands.

TIM
The TIMers are controlled using this command.

CNT The COUNTers are controlled using this command.

Used with LD, AND, and OR command keys to designate NC


NOT (normally close) points.

Designates Holding Relay


HR

Designates Temporary Relays.


TR

Displays the operations of the SHIFT register


SFT

SHIFT
SHIFT is used to obtain the alternate function of the four keys
with more than one use, labeled, CHannel, and CONTact.

6
Jabatan Kejuruteraan Elektrik & Elektronik
EEE 3905: Control Engineering Laboratory 1
HARDWARE
A
0

Use to input decimal or hexadecimal numbers when


programming
9

Important Note: All instruction will only be stored in the PLC memory after
the WRITE key is pressed and every program must have an END (FUN 01)
instruction.

Experiment

A. Application Examples of Basic Commands

Ladder Diagram Mnemonic Codes

00000 00001 Address Instruction Data


0000 LD 00000
01000
0001 OR 00002
00002 0002 AND NOT 00001
0003 OUT 01000
0004 END(01)
END

Program Entry Procedure

1. Set the MODE SELECTOR switch to PROGRAM mode. Press CLR, if


necessary, until 0000 appears on the display

2.
LD A
CLR 0 WRITE

7
Jabatan Kejuruteraan Elektrik & Elektronik
EEE 3905: Control Engineering Laboratory 1
HARDWARE
3.
OR C
2 WRITE

4.
AND B
NOT 1 WRITE

5.
OUT B A A A
1 0 0 0 WRITE

6.
A B
FUN 0 1 WRITE

B. Conversion of Ladder diagram to Mnemonic Codes:

1. Connects two blocks in series to obtain AND LD.

Ladder diagram Mnemonic codes

Address Instruction Data


00002 00004 00000 LD 00002
01000 00001 OR 00003
00002 LD 00004
00003 OR-NOT 00005
00003 00005
00004 AND-LD
00005 OUT 01000
00006 END(01)

8
Jabatan Kejuruteraan Elektrik & Elektronik
EEE 3905: Control Engineering Laboratory 1
HARDWARE
2. Connects two blocks in parallel to obtain OR LD.

Ladder diagram Mnemonic codes

Address Instruction Data


00000 LD 00002
00001 AND-NOT 00003
00002 00003 00002 LD 00004
01001 00003 AND 00005
00004 OR-LD
00005 OUT 01001
00004 00005 0006 END(01)

3. Convert the ladder diagrams given below to its equivalent mnemonic codes.
From the Mnemonic Codes converted in Exercise 3, run the program using the
programming console.

(i)

00000 00001 00002 00003 00004 00005


01000

00007 00008 00006

00009

END

9
Jabatan Kejuruteraan Elektrik & Elektronik
EEE 3905: Control Engineering Laboratory 1
HARDWARE
(ii)

00000 00001
01000
00002 00003

00004 00005

00006 00007

END

(iii)

00001 00002 00003


01000

00004
01001
00005

00006

END

10
Jabatan Kejuruteraan Elektrik & Elektronik
EEE 3905: Control Engineering Laboratory 1
HARDWARE
(iv)

0001 0003
01003
0002

0004
01004
0005
01005
0006
01006
0007

END

4. Convert the mnemonic codes to its equivalent ladder diagrams.


(i)
Address Instruction Data
0000 LD 00000
0001 AND 00001
0002 LD 00002
0003 AND NOT 00003
0004 OR LD
0005 AND 00004
0006 AND NOT 00005
0007 AND 00006
0008 OUT 01000
0009 END(01)

11
Jabatan Kejuruteraan Elektrik & Elektronik
EEE 3905: Control Engineering Laboratory 1
HARDWARE
(ii)
Address Instruction Data
0000 LD 00000
0001 OR 00001
0002 LD 00002
0003 OR 00003
0004 OR 00004
0005 AND LD
0006 LD 00006
0007 OR 00005
0008 AND LD
0009 OUT 01000
0010 OUT 01002
0011 END(01)

(iii)
Address Instruction Data
0000 LD 00001
0001 AND 00003
0002 OR 00004
0003 AND NOT 00002
0004 OUT 01004
0005 OUT 01005
0006 NOT LD 00005
0007 AND NOT 00006
0008 OR NOT 00007
0009 OUT 01006
0010 OUT 01007
0011 OUT 01008
0012 END(01)

12

You might also like