Anda di halaman 1dari 10

School of Mechanical Engineering

Universiti Sains Malaysia


EMC 311/3 Mechatronics
Additional PLC Functions

Lecture 6
Assoc. Prof. Dr. Zahurin Samad
Tel.: 04-5995739/5996312
Hp: 019-4220332
Fax: 04-5941025
Email: zahurin@eng.usm.my
mezahurin@usm.my
http://elearning.usm.my/

EMC 311/3 Mechatronics

Introduction

Lecture 7/2

Explain additional functions including timer,


internal relay & counter and shift register
Students will learn

Programmable logic controller (PLC)

Additional functions
Timer (Chapter 21.8.1 pg 455-456)
Internal Relay (Chapter 21.6.1 pg 453)
Counter (Chapter 21.8.2 pg 456-458)

Shift register (Chapter 21.9 pg 458-459)

Knowledge and experience on computer


help understanding.

EMC 311/3 Mechatronics

Additional functions

Lecture 7/3

Logic functions only sometimes are not


enough for performing task, especially the
task that involved time delay & even
counting
Thus, all PLCs provide timer, internal relay &
counter that can be controlled by using logic
functions & can be drawn in ladder diagram
Numbering System for the functions differs
according to PLC manufacturer

EMC 311/3 Mechatronics

Lecture 7/4

Timer (TIM)

Operand Data Areas:

N: T/C Number 000 - 511


SV: Set value (word, BCD)
IO, AR, DM, HR, #

Purpose:

A timer is activated when its


execution condition goes ON
and is reset (to SV) when the
execution condition goes OFF.
Once activated, TIM measures
in units of 0.1 second from the
SV.
If the execution condition
remains ON long enough for
TIM to time down to zero, the
Completion Flag for the TC
number used will turn ON and
will remain ON until TIM is reset
(that is, until its execution
condition goes OFF).

ON: timer will start


decreasing 0.1s from 5s.
OFF: timer reset to 5s.

Timer reaches zero,


the status of the timer
will change to ON

Timer
address

Delay
time
( 0.1
second)

Output
controlled
by timer

EMC 311/3 Mechatronics

Internal Relay (Marker)

Lecture 7/5

Memory address 200.00-231.15


It is not connected to external device.

Marker

EMC 311/3 Mechatronics

Lecture 7/6

Counter (CNT)

Operand Data Areas:

N: T/C Number 000 - 511


SV: Set value (word, BCD)

Purpose:

IO, AR, DM, HR, #

CNT is used to count down from SV when


the execution condition on the count
pulse, CP, goes from OFF to ON, that is,
the present value (PV) will be
decremented by one whenever CNT is
executed with an ON execution condition
for CP and the execution condition was
OFF for the last execution.
If the execution condition has not
changed or has changed from ON to OFF,
the PV of CNT will not be changed.
The Completion Flag for a counter is
turned ON when the PV reaches zero and
will remain ON until the counter is reset.
CNT is reset with a reset input, R. When
R goes from OFF to ON, the PV is reset to
SV. The PV will not be decremented while
R is ON.
Counting down from SV will begin again
when R goes OFF. The PV for CNT will
not be reset in interlocked program
sections or by power interruptions.

OFFON:
Counter value is
decreased by 1

Counter
address
ON: Counter value
is set to 200
When counter value
reaches 0, the
counter will ON

Counter
starting
value

Output
controlled by
counter

EMC 311/3 Mechatronics

Lecture 7/7

Shift Register

Register is formed by a group of


marker
Shift can be performed on register
content
Register can provide storage space
for a series of sequences

I=1
St

10

11

12

13

14

15

200

201

202

10

11

12

13

14

15

P=1
St

200

201

202

EMC 311/3 Mechatronics

Summary

Lecture 7/8

Students have learned


Timer is used for delaying even
Internal relay is used for simplifying rung
Counter is used for counting even
Shift register can be used for controlling
sequences

Foundation for using PLC

EMC 311/3 Mechatronics

References

Lecture 7/9

Omron, A beginners guide to PLC


Webb, John W., Programmable logic controllers
Swainston, Fred, A systems approach to programmable controllers
Parr, E. A. & E. Andrew, Programmable controllers: an engineer's

guide

Warnock, Ian G., Programmable controllers: operation and

application

Den, Otter J., Programmable logic controllers


Bolton, Martin, Digital systems design with programmable logic
Kissell, Thomas E., Understanding and using programmable

controllers

Treseler, Michael, Designing state machine controllers using

programmable logic
Stenerson, Jon, Fundamentals of programmable logic controllers,
sensors, and communications
Knapp, William, Introduction to programmable logic controllers
(videorecording)

EMC 311/3 Mechatronics

Exercise Questions
1.

2.
3.

4.

Draw a ladder diagram for activating a


motor after 10 seconds pressing a switch
using timer.
Simplify the ladder diagram shown using
marker.
Draw a ladder diagram for activating a
solenoid valve after an optical sensor
detecting 15 products on a conveyor line.
Based on the ladder diagram shown,
explain what will happen if switch 000.00
is pressed once and then switch 000.01 is
pressed and released 3 times.

Lecture 7/10

Anda mungkin juga menyukai