FACULTI OF ELECTRICAL AND ELECTRONIC ENGINEERING
LAB 4 REPORT (PLC Command Function Using ADD, SUB, MOV and CMP)
ENGINEERING PRACTICES
BEE 10501
NAME MATRIC NUMBER
Discipline Attendance
Report @ Assessment
Total Lab Result
Participation @ Discussion @
Conclusion @ Analysis
5 % 5 % 50 % 40 % 100 %
1)
2)
3)
GROUP MEMBER
LAB INSTRUCTOR
1)
2)
Engineering Practise (BEE10501)
Exp. No.4: PLC Command Function Using ADD, SUB, MOV and CMP ii
FKEE, Sem 02 Session 2015/16
Table of Content
Table of Content ii
Instruction 1
1.0 Title 2
2.0 Outcomes 2
3.0 Overview 2
4.0 List of Equipments 2
5.0 Experiment Procedures 2
6.0 Results and Analysis 7
7.0 Questions 7
8.0 Answers 7
9.0 Discussions 12
10.0 Conclusions 13
Fakulti/Pusat Pengajian (Faculty/Centre) :
Faculty of Electrical and Electronic Engineering
Mukasurat (Page):
1
Kod Kursus (Course Code):
BEE 10501
Nama Kursus (Name of Course) :
Engineering Practise
Kursus Pra Syarat (Prerequisite Courses) :
None
Kredit
(Credit):
1
Kuliah
(Lecture):
0
Tutorial :
0
Amali
(Practical):
3
Edisi (Edition) : 2 Tarikh Keluaran (Published date) : January 2016
FKEE, Sem 02 Session 2015/16
Instruction
1. Grouping: Lab group is not predetermined and consists of _ members (maximum).
2. Pre-Lab Assignment: Must be submitted to the instructor at the beginning of lab sessions.
Verified by the instructor and returned to the students at the end of lab session. The verified
pre-lab must be attached with the final report for submission.
3. Lab Activities: All laboratory activities must be carried out in this laboratory and to be
completed within the given times.
4. Demonstration: Student must demonstrate the experiment to the respective instructor.
5. Report Submission: Report must be submitted to the respective instructor upon
COMPLETION of lab session.
Fakulti/Pusat Pengajian (Faculty/Centre) :
Faculty of Electrical and Electronic Engineering
Mukasurat (Page):
2
Kod Kursus (Course Code):
BEE 10501
Nama Kursus (Name of Course) :
Engineering Practise
Kursus Pra Syarat (Prerequisite Courses) :
None
Kredit
(Credit):
1
Kuliah
(Lecture):
0
Tutorial :
0
Amali
(Practical):
3
Edisi (Edition) : 2 Tarikh Keluaran (Published date) : January 2016
FKEE, Sem 02 Session 2015/16
1.0 Title PLC Command Function Using ADD, SUB, MOV and CMP
2.0 Outcomes After completing this laboratory, student should be able to:
2.1 Familiar the techniques to programs PLC Omron using CX-Programmer (ladder
diagram).
2.2 Familiar the PLC command function using ADD, SUB, MOV and CMP
2.3 Build up simple programs, run and troubleshooting.
3.0 Overview There are several ways to program PLC and among them are using mnemonics instructions or
ladder diagrams. The results for both are the same even though the techniques are different
4.0 List of Equipments 4.1 Omron PLC
4.2 PLC Programming Console
4.3 Laptop with CX Programmer (optional)
5.0 Experiment Procedures
5.1 Introduction
There are functions instructions that are available in PLC such as ADD, SUB, MOV,CMP to replace function of CNT and CNTR to do function of comparing, counting up and counting down. This is to make ladder logic more presentable and variety of function to solve a problem.
5.2 ADD ADD totals the data in two different channels or one channel and a constant and then outputs the sum to a third channel. Therefore three data must be specified: an augends, an addend and a result channel.
Fakulti/Pusat Pengajian (Faculty/Centre) :
Faculty of Electrical and Electronic Engineering
Mukasurat (Page):
3
Kod Kursus (Course Code):
BEE 10501
Nama Kursus (Name of Course) :
Engineering Practise
Kursus Pra Syarat (Prerequisite Courses) :
None
Kredit
(Credit):
1
Kuliah
(Lecture):
0
Tutorial :
0
Amali
(Practical):
3
Edisi (Edition) : 2 Tarikh Keluaran (Published date) : January 2016
FKEE, Sem 02 Session 2015/16
Ladder Symbols
ADD (30)
Au
Ad
R
Operand Data Areas
Mi: Minuend channel
IR, SR, AR, DM, HR, TC, LR,#
Su: Subtrahend channel
IR, SR, AR, DM, HR, TC, LR,#
R: Result channel
IR, AR, DM,HR,LR
Example circuit Ladder diagram
ADDR OP CODE DATA 0000 LD 00000 0001 CLC(41) 0002 ADD(30)
040 #1234 100
0004 END(01)
5.3 SUB SUB finds the difference between the data in one channel and the data in another channel or a constant, and then outputs the result to a third channel. Therefore, three data must be specified: an minuend, an subtrahend and a result channel.
Ladder Symbols
SUB (31)
Mi
Su
R
Operand Data Areas
Mi: Minuend channel
IR, SR, AR, DM, HR, TC, LR,#
Su: Subtrahend channel
IR, SR, AR, DM, HR, TC, LR,#
R: Result channel
IR, AR, DM,HR,LR
CLC (41)
#1234
040
ADD (30)
100
Addend
Augend
100
Fakulti/Pusat Pengajian (Faculty/Centre) :
Faculty of Electrical and Electronic Engineering
Mukasurat (Page):
4
Kod Kursus (Course Code):
BEE 10501
Nama Kursus (Name of Course) :
Engineering Practise
Kursus Pra Syarat (Prerequisite Courses) :
None
Kredit
(Credit):
1
Kuliah
(Lecture):
0
Tutorial :
0
Amali
(Practical):
3
Edisi (Edition) : 2 Tarikh Keluaran (Published date) : January 2016
FKEE, Sem 02 Session 2015/16
Example circuit Ladder diagram
ADDR OP CODE DATA 0000 LD 00000 0001 CLC(41) 0002 SUB(31)
040 #1234 100
0004 END(01)
5.4 MOV MOV transfer source data (either the data is a specified channel or a four digit hexadecimal constant) to a destination channel. Therefore, MOV require two data to be specified: the source channel or constant and the destination channel.
Ladder Symbols
MOV (21)
S
D
Operand Data Areas
S: Source Channel
IR, SR, AR, DM, HR, TC, LR,#
D: Destination Channel
IR, AR, DM,HR,LR
Example circuit Ladder diagram
ADDR OP CODE DATA 0000 LD 25313 0001 MOV (21) 000 100 0003 END(01)
CLC (41)
#1234
040
SUB (31)
100
Subtrahen
d
Minuend
Result
Destinati
on
Source
#1234
040
MOV(30)
Fakulti/Pusat Pengajian (Faculty/Centre) :
Faculty of Electrical and Electronic Engineering
Mukasurat (Page):
5
Kod Kursus (Course Code):
BEE 10501
Nama Kursus (Name of Course) :
Engineering Practise
Kursus Pra Syarat (Prerequisite Courses) :
None
Kredit
(Credit):
1
Kuliah
(Lecture):
0
Tutorial :
0
Amali
(Practical):
3
Edisi (Edition) : 2 Tarikh Keluaran (Published date) : January 2016
FKEE, Sem 02 Session 2015/16
5.5 CMP Compare (CMP) is used to compare the data in a specific channel, with the data in another channel, or a four-digit, hexadecimal constant. Therefore, two data must be specified immediately after the CMP instruction. One of the data must be a channel.
Ladder Symbols
CMP (20)
Cp 1
Cp 2
Operand Data Areas
Cp 1: First Compare word
IR, SR, AR, DM, HR, TC, LR,#
Cp 2: First Compare word
IR, AR, DM,HR,LR
Example circuit Ladder diagram
ADDR OP CODE DATA 0000 LD 25313 0001 OUT TR 0 0002 CMP (20) - #01F0 000 0003 25505 0004 10000 0005 TR 0 0006 25506 0007 10001 0008 TR 0 0009 25507 0010 10002
CMP(20)
#01F0
000
10000
10001
10002
25505
(>)
25506
(=)
25507
TR
0
25313
Fakulti/Pusat Pengajian (Faculty/Centre) :
Faculty of Electrical and Electronic Engineering
Mukasurat (Page):
6
Kod Kursus (Course Code):
BEE 10501
Nama Kursus (Name of Course) :
Engineering Practise
Kursus Pra Syarat (Prerequisite Courses) :
None
Kredit
(Credit):
1
Kuliah
(Lecture):
0
Tutorial :
0
Amali
(Practical):
3
Edisi (Edition) : 2 Tarikh Keluaran (Published date) : January 2016
FKEE, Sem 02 Session 2015/16
5.6 PROCEDURES
5.6.1 CX-Programmer
5.6.1.1 Get the laptop with preloaded CX-Programmer inside.
5.6.1.2 To Change the PLC type, CPU and the bus according to PLC used.
5.6.1.3 For OMRON CQM1H, the CPU is CPU21 and the bus is SYSMACWAY while for OMRON CJ1M, the CPU is CPU11 and the bus is SYSMACWAY
5.6.1.4 The address according type of PLC used.
5.7 QUESTION/PROBLEMS:
Solve this problems by using ADD, SUB, MOV and CMP
5.7.1 A simple car park control system allows only a maximum of 30 cars parking spaces. Every time a car comes in, an incoming sensor will add 1 and any car that goes out an outgoing sensor will deduct 1. If the car park is occupied with 30 cars at one time, a full sign will be lighted up to inform there is no vacancy. Replace command function CNTR (from previous experiment) with ADD and SUB.
5.7.2 In a factory, two conveyors were used for apple packaging. When start button is pressed, “box conveyor” start to move. The empty box on the “box conveyor” will move simultaneously until
sensor 2(SE2) detect the presence of empty box. SE2 will cause “box conveyor” to stop. After 1
second the “apple conveyor” will start to move.” Apple conveyor” consisting of row of apple which
is arrange accordingly .Sensor1 (SE1) will detect the presence of apple. The apple will fall into the
box one by one. After 12 apples have been counted by SE1, “apple conveyor” will stop and it is
ready to be picked up by the operator.
Fakulti/Pusat Pengajian (Faculty/Centre) :
Faculty of Electrical and Electronic Engineering
Mukasurat (Page):
7
Kod Kursus (Course Code):
BEE 10501
Nama Kursus (Name of Course) :
Engineering Practise
Kursus Pra Syarat (Prerequisite Courses) :
None
Kredit
(Credit):
1
Kuliah
(Lecture):
0
Tutorial :
0
Amali
(Practical):
3
Edisi (Edition) : 2 Tarikh Keluaran (Published date) : January 2016
FKEE, Sem 02 Session 2015/16
6.0 Results and Analysis
6.1 Print/write down the ladder logic program, mnemonic of each problem.
6.2 Discuss your observation of each problem given.
7.0 Questions
7.1 In Question 5.7.2, what will happen if sensor SE1 fails to detect the presence of apple.
7.2 Create a new ladder diagram from Question 5.7.2 by using Counter instead of using ADD
and SUB.
Fakulti/Pusat Pengajian (Faculty/Centre) :
Faculty of Electrical and Electronic Engineering
Mukasurat (Page):
8
Kod Kursus (Course Code):
BEE 10501
Nama Kursus (Name of Course) :
Engineering Practise
Kursus Pra Syarat (Prerequisite Courses) :
None
Kredit
(Credit):
1
Kuliah
(Lecture):
0
Tutorial :
0
Amali
(Practical):
3
Edisi (Edition) : 2 Tarikh Keluaran (Published date) : January 2016
FKEE, Sem 02 Session 2015/16
8.0 Answers
Fakulti/Pusat Pengajian (Faculty/Centre) :
Faculty of Electrical and Electronic Engineering
Mukasurat (Page):
9
Kod Kursus (Course Code):
BEE 10501
Nama Kursus (Name of Course) :
Engineering Practise
Kursus Pra Syarat (Prerequisite Courses) :
None
Kredit
(Credit):
1
Kuliah
(Lecture):
0
Tutorial :
0
Amali
(Practical):
3
Edisi (Edition) : 2 Tarikh Keluaran (Published date) : January 2016
FKEE, Sem 02 Session 2015/16
Fakulti/Pusat Pengajian (Faculty/Centre) :
Faculty of Electrical and Electronic Engineering
Mukasurat (Page):
10
Kod Kursus (Course Code):
BEE 10501
Nama Kursus (Name of Course) :
Engineering Practise
Kursus Pra Syarat (Prerequisite Courses) :
None
Kredit
(Credit):
1
Kuliah
(Lecture):
0
Tutorial :
0
Amali
(Practical):
3
Edisi (Edition) : 2 Tarikh Keluaran (Published date) : January 2016
FKEE, Sem 02 Session 2015/16
Fakulti/Pusat Pengajian (Faculty/Centre) :
Faculty of Electrical and Electronic Engineering
Mukasurat (Page):
11
Kod Kursus (Course Code):
BEE 10501
Nama Kursus (Name of Course) :
Engineering Practise
Kursus Pra Syarat (Prerequisite Courses) :
None
Kredit
(Credit):
1
Kuliah
(Lecture):
0
Tutorial :
0
Amali
(Practical):
3
Edisi (Edition) : 2 Tarikh Keluaran (Published date) : January 2016
FKEE, Sem 02 Session 2015/16
Fakulti/Pusat Pengajian (Faculty/Centre) :
Faculty of Electrical and Electronic Engineering
Mukasurat (Page):
12
Kod Kursus (Course Code):
BEE 10501
Nama Kursus (Name of Course) :
Engineering Practise
Kursus Pra Syarat (Prerequisite Courses) :
None
Kredit
(Credit):
1
Kuliah
(Lecture):
0
Tutorial :
0
Amali
(Practical):
3
Edisi (Edition) : 2 Tarikh Keluaran (Published date) : January 2016
FKEE, Sem 02 Session 2015/16
9.0 Discussion
Fakulti/Pusat Pengajian (Faculty/Centre) :
Faculty of Electrical and Electronic Engineering
Mukasurat (Page):
13
Kod Kursus (Course Code):
BEE 10501
Nama Kursus (Name of Course) :
Engineering Practise
Kursus Pra Syarat (Prerequisite Courses) :
None
Kredit
(Credit):
1
Kuliah
(Lecture):
0
Tutorial :
0
Amali
(Practical):
3
Edisi (Edition) : 2 Tarikh Keluaran (Published date) : January 2016
FKEE, Sem 02 Session 2015/16
10.0 Conclusions
___________________________________________________________________________________
___________________________________________________________________________________
___________________________________________________________________________________
___________________________________________________________________________________
___________________________________________________________________________________
___________________________________________________________________________________
___________________________________________________________________________________
___________________________________________________________________________________
___________________________________________________________________________________
___________________________________________________________________________________
___________________________________________________________________________________
___________________________________________________________________________________
___________________________________________________________________________________
___________________________________________________________________________________
___________________________________________________________________________________
___________________________________________________________________________________
___________________________________________________________________________________
___________________________________________________________________________________
___________________________________________________________________________________
___________________________________________________________________________________
___________________________________________________________________________________
Disediakan oleh (Prepared by):
Tandatangan (Signature):
Nama (Name): Rafidah bte Ngadengon
Jawatan (Post): Pensyarah
Tarikh (Date): January 2016
Disemak oleh (Checked by) :
Tandatangan (Signature):
Nama (Name): PM. Ir. Dr. Babul Salam Bin KSM
Kader Ibrahim
Jawatan (Post): Head of Department
Tarikh (Date): January 2016
Top Related