PLC NOTES COMPLETE 2 Edit 2013 (Penting) PDF
PLC NOTES COMPLETE 2 Edit 2013 (Penting) PDF
PLC NOTES COMPLETE 2 Edit 2013 (Penting) PDF
CONTROLLERS
SARIATI DALIB
[email protected]
CHAPTER 1
UNIT 1: INTRODUCTION TO AUTOMATION SYSTEM
Objectives
1. Understand and learn about automation control systems and types of automation control
systems.
2. Learn about the types of control system pneumatic control systems, hydraulic control systems
and electrical control system.
1.0
Introduction:
In todays fast-moving, highly competitive industrial world, a company must be flexible, cost
effective and efficient if it wishes to survive. In the process and manufacturing industries, this
has resulted in a great demand for industrial control systems/ automation in order to streamline
operations in terms of speed, reliablity and product output. Automation plays an increasingly
important role in the world economy and in daily experience.
Automation is the use of control systems and information technologies to reduce the need for
human work in the production of goods and services. In the scope of industrialization,
automation is a step beyond mechanization. Whereas mechanization provided human
operators with machinery to assist them with the muscular requirements of work, automation
greatly decreases the need for human sensory and mental requirements as well.
What is Automation Control System?
Automation Control System - system that is able to control a process with minimal human
assistance or without manual and have the ability to initiate , adjust, acting show or measures
the variables in the process and stop the process in order to obtain the desired output.
SARIATI
Page 1
b)
FLEXIBLE
AUTOMATION
Purpose
Specific
Variety
Difficult
Easy
Hard
Easy
Depends on
manufacturing and design
Very high
Slow
Fast
Suitable for
all types of systems
Maintenance
Capability
Speed
Economy efficiency
SARIATI
Page 2
S1
S2
mentol
VB
bB
Programmed Automation:
S1
S2
0000
0
0000
1
ATURCARA
1000
0
LD
00000
AND
00001
OUT
10000
END (01)
PLC
I
N
P
U
T
O
U
T
P
U
T
mentol
S1
S2
COM
COM
VB
VB
SARIATI
Page 3
SARIATI
Page 4
SARIATI
Page 5
Lampu
VB
Suis
Lamp
u
PLC
VB
VB
SARIATI
a.
b.
c.
Page 6
Unemployment rate increases due to machines replacing humans and putting those
humans out of their jobs.
Technical Limitation: Current technology is unable to automate all the desired tasks.
Security Threats/Vulnerability: An automated system may have limited level of
intelligence, hence it is most likely susceptible to commit error.
Unpredictable development costs: The research and development cost of automating a
process may exceed the cost saved by the automation itself.
High initial cost: The automation of a new product or plant requires a huge initial
investment in comparison with the unit cost of the product, although the cost of
automation is spread in many product batches of things
TUTORIAL QUESTION:
Give definition of Automation Control System? [3m]
Make a comparison between Fixed Automation and Flexible Automation Control
System.[12m]
State three (3) types of control system which based on supply source and states the
differences between them.[12m]
Sketch an automatic control system diagram for:
a) Hydraulic Control System
b) Electric Control System
c) Pneumatic Control System
SARIATI
Page 7
Relays allow one circuit to switch a second circuit which can be completely separate from
the first. For example a low voltage battery circuit can use a relay to switch a 230V AC mains
circuit. There is no electrical connection inside the relay between the two circuits, the link is
magnetic and mechanical.
Relays are usuallly SPDT or DPDT but they can have many more sets of switch contacts,
for example relays with 4 sets of changeover contacts are readily available.
The relay's switch connections are usually labelled COM, NC and NO:
COM = Common, always connect to this, it is the moving part of the switch.
NC = Normally Closed, COM is connected to this when the relay coil is off.
NO = Normally Open, COM is connected to this when the relay coil is on.
Connect to COM and NO if you want the switched circuit to be on when the relay coil is
on.
Connect to COM and NC if you want the switched circuit to be on when the relay coil is
off.
SARIATI
Page 8
Relays
The relay in the picture also has a wire connecting the armature to the yoke. This ensures
continuity of the circuit between the moving contacts on the armature, and the circuit track on
the printed circuit board (PCB) via the yoke, which is soldered to the PCB.
When an electric current is passed through the coil it generates a magnetic field that
activates the armature, and the consequent movement of the movable contact(s) either makes
or breaks (depending upon construction) a connection with a fixed contact.
If the set of contacts was closed when the relay was de-energized, then the movement
opens the contacts and breaks the connection, and vice versa if the contacts were open.
When the current to the coil is switched off, the armature is returned by a force,
approximately half as strong as the magnetic force, to its relaxed position. Usually this force is
provided by a spring, but gravity is also used commonly in industrial motor starters. Most relays
are manufactured to operate quickly. In a low-voltage application this reduces noise; in a high
voltage or current application it reduces arcing.
SARIATI
Page 9
Contactor
A basic contactor will have a coil input (which may be driven by either an AC or DC supply
depending on the contactor design). The coil may be energized at the same voltage as the
motor, or may be separately controlled with a lower coil voltage better suited to control by
programmable controllers and lower-voltage pilot devices.
SARIATI
Page 10
Page 11
Conclusion
NOTES:
It should be noted that when installing contactors or relays that you always check the coil
ratings. They often have not got a default rating of 230volts, and only go bang once if they are
connected to the wrong voltage!
SARIATI
Page 12
UNIT 2 : TERMINOLOGY
Objectives:
1. Define some terminology in the control system.
2. Describe the open-loop control system, closed-loop control systems and computerized
control systems
SPECIFIC OBJECTIVES
1. Define the terminology of control systems, reference input, control variables,
disturbances and feedback elements
2. Explain the open-loop control system, closed-loop control and computerized controls.
3. Comparing between the open-loop control system with closed-loop control system.
2.0
INTRODUCTION
Planning, design and start-up of process control systems require clear and unambiguous
communication between all parts involved. To ensure this, we need a clear definition of the
terms used and standardized graphical symbols. These symbols help us represent control
systems or measurement and control tasks as well as their device-related solution in a simple
and clear manner.
2.1
CONTROL SYSTEM
SARIATI
i.
ii.
elements of measurement
iii.
comparator
iv.
controller
v.
Actuator.
Page 13
Reference Input
Reference signal input is provided at the input of a system such as temperature, pressure,
level, etc. Its value is fixed
2.3
Control Variables
Controlled variables are controlled signals or variables in the output such as temperature,
pressure, level and so on. The value can be changed.
2.4
Disturbances
Disturbances is a disturbing element in the control signals of a control system.
Disturbances can result either from within or outside the system itself.
2.5
Feedback
Feedback element is a function to send output signals to be compared with the input
signal by the element Comparator / summer in a closed system
2.6
Open Loop Control System is a type of control system where the output does not affect
the action of the system control functions.
This system can be represented by the block diagram in Figure 2.6 below.
Reference
Input
controller
Actuator
The
Controlle
d system
Output
signal
OR
Open loop systems are systems in which the output of a system is not used as a variable
to control the system.
Open loop control systems use the input variables to calculate the output based on the
"open loop transfer function" of the system. The output is not fedback to modify the controlled
output. There are many reasons to use open loop control such as simplifying the control system,
quicker response of the system, to reduce the possiblility of oscillation and sometimes to lower
cost.
SARIATI
Page 14
One example of an open-loop system is a sprinkler system that turns on every day at a
pre-programmed time. No matter the moisture level of the grass, the sprinkler system
will continue to water it at a prescribed time. (For example, even if there was a heavy rain
and the sprinklers do not need to be turned on, they will still water at their preprogrammed time.) That is an open-loop because the sprinklers will turn on no matter
the feedback (in this case, the grass moisture). However, if someone were to install a
moisture detector where the sprinklers only turn on once it reaches a certain point, then
the entire system turns into a closed-loop system.
Example 2
The system is controlled by a timer (timer) are typically open-loop system, such as street lighting.
These lamps will be lit at a certain time (at night) and then goes off the next day (daytime). The
time between light and time off has been set by the timer (timer)
controller
actuator
Reference input
Fixed time
Timer
Relay
Lampu
The controlled
output/system
Output signal
Lamp ON @ OFF
Drawbacks
Drawbacks of the open-loop system is the possibility of waste, due to the process running
when it might not have to, and the fact that the process does not learn from feedback
and become more efficient.
SARIATI
Page 15
controller
actuator
The
controlled
system
Output
signal
Measurement devices
In a closed-loop control system the controlled variable (actual value) will be measured,
compared with the set point and fed back. So a closed loop arises. The feedback is an essential
attribute of a closed-loop control system. A control system consists of the following components.
Point with your mouse on the blocks in the block diagram and identify the elements in the
scheme below.
SARIATI
Page 16
The control
system
controller
Light
intensity
controller
Output signal
actuator
relays
lamp
Light
intensity
Measurement devices
Light sensors
SARIATI
Page 17
.
Reference
input
COMPUTER
the
controlled
system
controller
actuator
Output
signal
Measurement element
Computerized control system block diagram
SARIATI
Page 18
2.9
SARIATI
Page 19
CHAPTER 2:
INTRODUCTION TO PLC
Objectives:
At the end of this lecture the students should be able to:
1. Describe a PLC and its functions
2. Explain the history of PLC development
3. Identify the mains part of PLC and describe the functions.
4. List the types and advantages of PLC
2.0
INTRODUCTION
In this chapter , we will discussed about PLC in detail:
2.1 Definition of PLC
2.2 Define PLC Terminologies
2.3 Background PLC
2.3 The function of PLC and Types of Construction
2.4 Advantages of PLCs
2.1
Definition of PLC
SARIATI
Page 20
PLC Terminologies
Sensors:
Output Devices/Actuators:
SARIATI
Page 21
Background of PLC
Among the factors that create the initial design and development of control systems that can be
controlled are as follows:
i.
ii.
iii.
The first PLC was designed by a team of engineers at the company General Motors (GM), the
United States in 1968 when the company is looking for other methods to replace the complex
system of relays. They also set the specifications of the new control system must meet the
following requirements:
i. Easily programmed
ii. There is no need for rewiring if there are changes on the program
iii. Smaller, cheaper and higher reliability.
iv. Simple building construction and the maintenance cost is cheap.
v. Cost competitive
SARIATI
Page 22
Function of PLC
Function
1. Successor Control Relay - conventional logic
2. Timer/counter
3. Substitute PCB Control card
4. Machine and Process Controller for Automatic, Semiauto and manual
Advanced Control
1.
2.
3.
4.
5.
6.
Supervision control
SARIATI
Page 23
a) Pico or Nano is the smallest PLC in then world. Example: Omron Zen and Siemens LOGO
b) Micro or Mini PLC- Smaller Size and highly integrated for discrete and analog application in
control. Example: OMRON CP, Mitsubishi FX and Siemen S5 Series
c) Interchangeable modules and highly integrated for discrete and analog application in
control. Can be expanded flexibly at any time via pluggable I/O, functional and
communications modules, providing tailored solutions for our requirements whenever
required. A wide range of performance, scope and interface options depending on our
application.
Figure 2.3.2 shows the types of PLC construction in the market today.
1. Compact Types
SARIATI
Page 24
SARIATI
Page 25
SARIATI
Page 26
CHAPTER 3
PLC HARDWARE DESIGN
Objectives:
After completed this chapter, the student will know the major components of a PLC and the
functions of these components.
3.0 Introduction:
The PLC, being a microprocessor based device, has a similar internal structure to many
embedded controllers and computers. A PLC consist of the following components:
i.
ii.
iii.
iv.
v.
CPU,
Memory
Input modules
Output modules
Power supply.
These components are integral to the PLC controller. Additionally the PLC has a connection for
the Programming and Monitoring Unit, Printer and Program Recorder.
RAM
Microprocessor
ROM
Operation
system
( CPU )
Programming
Data
Input
Unit/
Module
Output
Unit/
Module
Output
Unit
ADDRESS BUS
CONTROLLED BUS
Page 27
Page 28
Above figure shows the memory unit in the internal design of PLCs. This unit contains two
(2) types of memory:
i.
ii.
System Busses
The internal paths along which the digital signals flow within the PLC are called
busses. The system has four busses:
- The CPU uses the data bus for sending data between the different elements,
- The address bus to send the addresses of locations for accessing stored data,
- The control bus for signals relating to internal control actions,
- The system bus is used for communications between the I/O ports and the I/O unit.
d)
Display and the indicator unit refers to the internal relay PLC status display. This can be seen in
the Console programming if the user using the mnemonic code and programming computer
screen if the user using software programming methods.
SARIATI
Page 29
Referring to above figure, the input and output units are the units available in the internal design
of PLCs.
The Input/Output units are the interfaces between the internal PLC systems and the external
processes/ field devices to be monitored and controlled. Input Unit is the unit which input
devices (switches, sensors) are connected to it. While the output unit is a unit which output
devices (Lights, motors) are connected to it.
The main purpose of the I/O interface is to condition the various signals received from or sent
to the external input and output devices. Input modules converts signals from discrete or
analog input devices to logic levels acceptable to PLCs processor. Output modules converts
signal from the processor to levels capable of driving the connected discrete or analog output
devices.
Since the PLC is a logic based device with a typical operating voltage of 5 volts and the external
processes usually demand higher powers and currents, the I/O modules are optically or
otherwise isolated. The typical I/O operating voltages are 5V - 240 V dc (or ac) and currents from
0.1A up to several amperes. The I/O modules are designed in this way to minimize or eliminate
the need for any intermediate circuitry between the PLC and the process to be controlled.
Small PLC units would have around 40 I/O connections with larger ones having more than 128
with either local or remote connections and extensive upgrade capabilities.
3.2
SARIATI
Page 30
SARIATI
Page 31
Tutorial :
ANSWER ALL THESE QUESTIONS
1.1 State THREE (3) units available in the microprocessor.
1.2 Explain the difference between RAM and ROM memory.
1.3 What do you understand about the Input Unit and Output Unit
1.4 Explain the functions of the printer unit.
QUESTION
SARIATI
Page 32
CHAPTER 4
PROGRAMMING
Main Objective:
Provide an overview of PLC programming method using programming languages commonly
used.
Specific Objectives:
After completed this chapter, student will know the major component
1. Familiarise with the PLC Programming system
2. Able to explain PLC programming method using Ladder Diagram and mnemonic
code., Instruction set and logic function.
3. Understand and use Ladder Diagram and mnemonic code to solve control systems
circuits.
4. Explain the following logic instruction set: Load. Load Not, Out, And, And Not, Or, Or
Not, And Ld and Or Ld.
5. Explain sequential instruction set: No Operation, End, Interlock, Jump, Keep,
Set/Reset and Differential Up/Down.
6. Explain the timer and Counter instruction set and execute timer/counter application
solution methods.
4.0
Introduction
PLC programming process is to plan activities such as design and write a program to perform the
required tasks.Here are the parts that should be there in a PLC program.
SARIATI
Start
Starting an operation
Operating Mode
The Reset
Operations / Ordering
Process
Signal Output
Status Output
End
Page 33
Programming Language
IEC 1131-3 is the international standard for programmable controller programming languages.
The following is a list of programming languages specified by this standard:
i.
Ladder Diagram (LD)
ii.
Instruction List (IL)
iii.
Structured Text (ST)
iv.
Sequential Function Chart (SFC)
v.
Function Block Diagram (FBD)
One of the primary benefits of the standard is that it allows multiple languages to be used within
the same programmable controller. This allows the program developer to select the language
best suited to each particular task.
i.
Ladder Diagram
Ladder Diagram is kind of graphical programming language that changed the relay control wiring
circuit diagram. Ladder Diagram contains tracks from left to right contact diagram (see Figure
below). This platform is connected to contact elements available normally open - NO or available
Normally closed - NC through the current path and loop elements.
Ladder diagram also shows the control circuit and the display function and a combination of the
sequence of operations for each branch of the horizontal lines separately.
+ve
INPUT CONDITION
NO
OUTPUT ACTION
-ve
NC
Ladder Diagram
Mnemonic Instruction
There are other methods to program PLCs. One of the earliest techniques involved mnemonic
instructions. These instructions can be derived directly from the ladder logic diagrams and
entered into the PLC through a simple programming terminal.
ii.
Instruction List
This low-level language is similar to Assembly language and is useful in cases where small
functions are repeated often. Although it is powerful, it is considered to be difficult to learn.
SARIATI
Page 34
iii.
Structured Text
Structured Text (ST) is a high level textual language that is a Pascal like language. It is very
flexible and intuitive for writing control algorithms.
Structured Text uses operators such as logical branching, multiple branching, and loops. People
trained in computer programming languages often find it the easiest language to use for
programming control logic. When symbolic addressing is used, ST programs resemble sentences,
making it highly intelligible to beginner users as well.
ST is ideal for tasks requiring complex math, algorithms or decision-making. Its concise format
allows a large algorithm to be displayed on a single.
Benefits of Structured Text
People trained in computer languages can easily program control logic
Symbols make the programs easy to understand
Programs can be created in any text editor
Runs as fast as ladder
Example 1
We have Motor that will be controlled manually by 2 push buttons (Start Push Button, and Stop Push Button).
When the Start Push Button is pushed then the Motor will be turned ON. and when the Stop Push Button is
Pushed then we want to stop the Motor. (Security logic has been taken off this logic, for the purpose of
domonstration.)
IF StartPb THEN
Motor := 1;
END_IF;
IF StopPb THEN
Motor := 0;
END_IF;
SARIATI
Page 35
These are similar to flowcharts, but much more powerful. This method is much different from
flowcharts because it does not have to follow a single path through the flowchart.
SFC programming offers a graphical method of organizing the program. The three main
components of an SFC are steps, actions and transitions. Steps are merely chunks of logic, i.e., a
unit of programming logic that accomplishes a particular control task. Actions are the individual
aspects of that task. Transitions are the mechanisms used to move from one task to another.
Control logic for each Step, Action and Transition is programmed in one of the other languages
such as Ladder Diagram or Structured Text.
Is a kind of graphic language (see Figure 4.1.4). Elements are the steps, transitions, choice and
parallel branch. Each step shows the status of the control program processes the active or
inactive. One step consists of action based on the transition. The action consists of the sequence
structure itself.
MOTOR (Start)
Step 1
Transition 1
Step 2
Action
MOTOR (Stop)
Transition 2
Step 3
Sample Program In Sequencial Function Chart Language
v.
Like SFC, FBD is a graphical language that allows programming in other languages (ladder,
instruction list, or structured text) to be nested within the FBD. In FBD, program elements
appear as blocks which are "wired" together in a manner resembling a circuit diagram. FBD is
most useful in those applications involving a high degree of information/data flow between
control components, such as process control.
SARIATI
Page 36
Based on the picture above, one should note that a ladder diagram consists of two basic parts:
left section also called conditional, and a right section which has instructions. When a condition
is fulfilled, instruction is executed.
00001
00003
00004
instruction
00006
00007
00007
00007
The pairs of vertical lines along the branch line is called the conditions. These conditions consist
of two, namely:
SARIATI
Page 37
00000
Instruction
n
Normally Open
00000
Instruction
n
Normally Closed
4.2
Basic Terms
00001
00002
instruction
Instructions will be in the Execution Conditions ON when IR 00000 is ON, IR 00001 is OFF and IR
00002 is ON.
SARIATI
Page 38
DATA AREA
Input
Area
BIT
IR00000 IR01515
FUNCTION
Used as the input bit
Output
Area
Work
Area
IR10000
IR11515
IR21600
IR21915
SR Area
SR24400
SR25507
TR Area
TR 0 TR 7
HR Area
HR 0000 HR
9915
IR Area
SARIATI
Page 39
00000
00002
instruction
0000
1
0000
3
INSTRUCTION
LD
OR
AND
AND LD
OUT
TIM
00006
CNT
00007
FUN 01
OPERASI / DATA
00000
00001
00003
10000
000
#0050
002
#0010
SARIATI
Page 40
What do you understand about Ladder Diagram and draw one (1) example of a
Ladder Diagram.
Explain the purpose of the following terms:
i. The logic blocks
ii. The Instruction block
Reference;
1. http://www.kronotech.com/ST/st.htm
SARIATI
Page 41
SPECIFIC OBJECTIVES:
At the end of this unit student should be able to:
i.
ii.
iii.
Know the functions of the instruction LOAD, LOAD NOT, OUT, AND, AND NOT,
OR, NOT and OR END
Know the function block instruction AND LD and OR LD.
Convert Ladder diagram to Mnemonic Code.
NOTE: These instructions will be explained later is based on OMRON PLC brands
SYSMAC CQM1H
5.0
Introduction
There are a lot of instructions used to develop the PLC program. Each instruction has a
respective function.
5.1
LD -
LOAD Instruction
Ladder Diagram
Mnemonic Code
00000
instruction
Address
Instruction
Operand/Data
00000
LD
00000
00001
instruction
Explanation:
The Execution Conditions of the instruction on the right will be ON when IR 00000 is ON.
SARIATI
Page 42
00000
instruction
n
00000
LD NOT
00001
instruction
00000
Explanation
The Execution Conditions of the instruction on the right will be ON when IR 00000 is OFF
5.3
00001
instruction
n
00000
LD
00000
00001
AND
00001
00002
instruction
Explanation
The Execution Conditions of the instruction on the right will be ON when IR 00000 and IR 00001
are ON
5.4
SARIATI
Page 43
Ladder Diagram
Mnemonic Code
00000
00001
instruction
n
Address
Instruction
Operand/
Data
00000
LD
00000
00001
AND NOT
00001
00002
instruction
Explanation
The Execution Conditions of the instruction on the right will be ON when IR 00000 ON and IR
00001 are OFF.
5.5
OR - OR Instruction
These instructions are used in the second contact in a normally open (NO) and in
line (parallel) with previous contacts.
.
Ladder Diagram
Mnemonic Code
00000
00001
00000
LD
00000
00001
OR
00001
00002
instruction
Explanation
The Execution Conditions of the instruction on the right will be ON when either IR 00000 or IR
00001 are ON.
5.6
SARIATI
Page 44
Ladder Diagram
Mnemonic Code
Address Instruction Operand/Data
00000
instruction
n
0000
1
00000
LD
00000
00001
OR NOT
00001
00002
instruction
Explanation
The Execution Conditions of the instruction on the right will be ON when either IR 00000 is ON
or IR 00001 is OFF or IR 00000 ON, IR 00001 OFF simultaneously
5.7
5.8
Address
Instruction
Operand/
Data
00000
LD
00000
00001
OUT
10000
END
SARIATI
Page 45
00001
1000
0
END
Address
Instruction
Operand/
Data
00000
LD
00000
00001
AND NOT
00001
00002
OUT
10000
00003
FUN 01
For PLC type OMRON - SYSMAC CQM1H, the instruction FUN 01 is the END instruction.
5.9
Ladder Diagram
00000
00001
00002
00003
1000
0
END
5.10
Address
Instruction
Operand/Data
00000
LD
00000
00001
AND
00001
00002
LD
00002
00003
AND
00003
00004
OR LD
00005
OUT
00006
FUN 01
10000
SARIATI
Page 46
Only a programming tool for solving complex functions such as AND connects a
number of OR, OR NOT, OR LD in the series.
Ladder Diagram
00000
00001
00002
00001
00003
END
5.11
Mnemonic Code
10000
Address
Instruction
Operand/
Data
00000
LD
00000
00001
OR
00002
00002
LD
00001
00003
OR
00003
00004
AND LD
00005
OUT
00006
FUN 01
10000
OR LD and AND LD
When both logic block instruction is to be used in Ladder Diagram, a program must be
written from the bottom up to merge logic blocks. For example, ladder diagram below:
Logic block of instruction for the last two blocks (blocks b1 and b2 blocks) are written
first and then followed by the first logic block instruction (block a).
SARIATI
Page 47
00001
00002
00003
00004
00005
1000
0
Block b2
Block a
END
Mnemonic Code
Address
Instruction
Operand/Data
00000
LD NOT
00000
00001
AND
00001
00002
LD
00002
00003
AND NOT
00003
00004
LD NOT
00004
00005
AND
00005
00006
OR LD
00007
AND LD
00008
OUT
00009
FUN 01
Block a
Block b1
Block b2
Block b2 + Block b1 = Block b
Block b, Block a
10000
Example.
SARIATI
Page 48
Specific Objectives:
At the end of this unit you should be able to understand set of instructions the following
sequence:
NO OPERATION
END
INTERLOCK
6.0
JUMP
KEEP
SET/RESET
DIFFERENTIATE UP / DOWN
Introduction
In this unit you will be exposed to a sequence of instructions which usually acts as the last
instruction in the instruction line.
Instruction sequence SET, RESET, KEEP, DIFFERENTIATE UP, DOWN DIFFERENTIATE, used to ON
and OFF state output bits in the IR. These instructions are used to control the status of the other
bits in the IR or in other areas.
INTERLOCK instruction sequences can overcome the problem of storing execution conditions, in
the branches of the ladder diagram.
JUMP instruction sequence can be used to control devices that require a product that can last a
long time.
6.1
NO OPERATION NOP ( 00 )
These instructions do not have a ladder diagram symbols and will not do any operations.
When you remove the memory in this instruction will be displayed on the console screen PLC
programming.
SARIATI
Page 49
END END(01)
Acting as the last instruction for each program (see figure 6.2)
There is no instruction will be written after the END instruction (01) implemented.
If there is no END instruction (01) in the program, the task would not be implemented
and verse NO END LIST is displayed on the programming PLC console screen.
10000
0000
0
END
Mnemonic Code
6.3
Address
Instruction
00000
LD NOT
00000
00001
OUT
10000
00002
FUN(01)
Operand/Data
SARIATI
Page 50
00001
10000
ILC (03)
END
Mnemonic Code
Address
00000
00001
00002
00003
00004
00005
Instruction
LD
FUN 02
LD
OUT
FUN 03
FUN 01
Operand/Data
00000
00001
10000
-
Page 51
Instructions
LD 00000
IL(02)
Instructions
LD 00001
Input
Instructions
OUT 10000
Output
ON
ON
OFF
ON
OFF
ON
OFF
OFF
OFF
OFF
6.4
00000
JMP (04)
01
00001
10000
JME (05) 01
END
SARIATI
Page 52
Address
00000
00001
00002
00003
00004
00005
Instruction
LD
FUN (04)
LD
OUT
FUN (05)
FUN (01)
Operand/Data
00000
01
00001
10000
01
-
Instruction LD 00000
JMP(04)
Instruction LD 00001
Input
ON
ON
ON
OFF
OFF
Not
implemented/executed
Not implemented/executed
OFF
SARIATI
Page 53
KEEP instruction is used to maintain the status bit operation based on two state
execution condition.
KEEP (11) operates like a Latching Relay which is set by S and reset by R.
When R is in the ON state, the operation of a particular product instruction is OFF and
remain OFF until reset, regardless of whether R is ON or OFF.
For PLC type OMRON - SYSMAC CQM1H, the instruction FUN 11 is KEEP instruction.
00002
KEEP (11)
HR 0000
00003
R
10004
HR0000
END
Mnemonic Code
Address
00000
00001
00002
00003
00004
00005
SARIATI
Instruction
LD
LD
FUN (11)
LD
OUT
FUN (01)
Operand / Data
00002
00003
HR 0000
HR 0000
10004
Page 54
Instruction LD 00002
Set
ON
OFF
ON
ON
OFF
OFF
OFF
OFF
ON
6.6
00000
SET 10000
00001
RESET 10000
Figure 6.6 : Ladder Diagram shows the Set and Reset instruction
SARIATI
Page 55
Instruction
LD
SET
LD
RESET
Operand / Data
00000
10000
00001
10000
6.7
Input
DIF U
DIF D
SARIATI
Page 56
00000
DIFU (13)
01OOO
01000
10000
END
Mnemonic Code
Address
00000
00001
00002
00003
Instruction
LD
FUN (13)
LD
OUT
Operand / Data
00000
01000
01000
10000
DIFU (14)
01OOO
01000
10000
END
SARIATI
Page 57
Instruction
LD
FUN (14)
LD
OUT
Operand / Data
00000
01000
01000
10000
SARIATI
Page 58
SPECIFIC OBJECTIVES:
At the end of this unit you should be able to:
1. Describe the instruction timer (TIMER TIM)
2. Describe the instruction counter (COUNTER - CNT).
3. Converts Ladder Diagram to mnemonic code.
7.0
Instruction
TIMER (TIM) and COUNTER (CNT) is the instructions that require numbers TIM / CNT (N) and the
set value(SV). The range of numbers TIM / CNT is from 000 to 511, while the range of set values
for the TIM / CNT is 0000 to 9999
The numbers TIM / CNT can not be used twice. When a number has been used as definer, such
as number 000 for instructions on TIM / CNT, the number can not be used again.
When a number is defined as the number of TIM / CNT, it can be used as often as required as an
operator operand in other instructions from the command TIMER or COUNTER.
7.1
TIMER - TIM
Symbol
TIM
N
SV
SV and 511.
Timer numbers (N) is between 000
The set value (SV) is between 0000 to 9999.
All numbers TIM / CNT can be used as definer in only one TIMER or COUNTER instruction.
SARIATI
Page 59
Ladder Diagram
00000
Tim 000
# 0050
(5 saat)
10000
TIM 000
END
Mnemonic Code
Address
Instruction
Operand/Data
00000
LD
00000
00001
TIM
000
# 0050
00002
LD
TIM 000
00003
OUT
10000
00004
FUN 01
Operating Condition:
When the input (LD 00000) is ON, the timer contact will be activated after 5 seconds. Next the
output (OUT 10000) will be ON
SARIATI
Page 60
00000
#0050
TIM 000
10000
(5 saat)
TIM 000
10001
END
Mnemonic Code
Address
Instruction
Operand/Data
00000
LD
00000
00001
TIM
000
# 0050
00002
LD
TIM 000
00003
OUT
10000
00004
LD NOT
TIM 000
00005
OUT
10001
00006
FUN 01
Operating Condition:
When the input (LD 00000) ON, the timer (TIM 000) will be activated after 5 seconds and the
output (OUT 10000) will be ON. While the output (OUT 10 001) will be ON as soon as the supply
is supplied and will be OFF after 5 seconds. Timer will continue to be active as long as the input
00000 state is ON.
SARIATI
Page 61
Example 7.1.3
Ladder Diagram
Tim 000
00000
# 0050
TIM 000
TIM 001
(5 saat)10000
10000
Tim 001
# 0030
END
(3 saat)
Mnemonic Code
Address
Instruction
Operand/Data
00000
LD
00000
00001
TIM
000
# 0050
00002
LD
TIM 000
00003
AND NOT
TIM 001
00004
OUT
10000
00005
LD
10000
00006
TIM
001
#0030
SARIATI
00007
OUT
00008
FUN 01
10001
Page 62
CNT
SV
Number TIM / CNT can be used as definer for either timer or counter.
Counter numbers are range from 000 to 511.
Counters are used to calculate the count down from the set value (SV) on the execution
condition on the counting pulse (CP) when it is changed from OFF to ON.
The set value (SV) is range 0000 to 9999.
Counters will reset to the reset (R).
Ladder Diagram
0000
0
0000
1
CNT 001
CP
CNT 001
# 0010
(10 kiraan)
10000
END
SARIATI
Page 63
Mnemonic Code
Address Instruction Operand/Data
00000
LD
00000
00001
LD
00001
00002
CNT
000
#0010
00003
LD
CNT 001
00004
OUT
10000
00005
FUN 01
Operating Condition
Counter set to count 10. When the input (LD 00,000) is the pulse of ten, a counter will be
activated and thus the output (OUT 10000) will be ON. When reset (LD 00,001) ON, a counter
will be in original condition
SARIATI
Page 64
The number of Counter cannot be the same number to the number of timer because both share
the same data in the PLC memory.
0000
0
0000
1
CP
CNT 000
# 0005
CNT 000
(5
10000
kiraan)
1000
0
TIM 001
# 0050
(10001
5 saat )
TIM 001
END
Operating Condition:
Counter set to count 5. When the input (LD 00,000) is the pulse of five, a counter will be
activated and thus the output (OUT 10000) will be ON.
When the output (OUT 10000) ON, TIM 001 will be activated after 3 seconds and then the
output (OUT 10 001) will be ON.
Both the output (OUT 10000) and (OUT 10 001) will always be ON until reset (LD 00001) in the
ON state.
Reset will return the counter to its original condition.
SARIATI
Page 65
CHAPTER 5
APPLICATIONS OF PLC
OBJECTIVE
Understand how to write programs in a PLC.
Write a program based on the correct format
SPECIFIC OBJECTIVES
At the end of this unit you will learn how to:
Write a program for Conveyor Motor Control
Write a program for packaging control.
Write a program for traffic lights control.
5.0
Introduction
This unit will explain samples of writing a PLC program in the applications of automation control
systems. Therefore, understanding the instructions and format shown in the PLC ladder diagram
program, the code mnemonics, and charts the sequence of functions that have been discussed in
unit 4 is needed to help in reviewing and analyze the examples given program.
SARIATI
Page 66
DEVICE
OUTPUT
DEVICE
00000
Sensor 1 ( S1 )
10000
Motor 1 ( M1 )
00001
Sensor 2 ( S2 )
10001
Motor 2 ( M2 )
00002
Sensor 3 ( S3 )
10002
Motor 3 ( M3 )
SARIATI
Page 67
LADDER DIAGRAM
S3 ( 00002 )
TIM 000
M2
Motor 2
10001
M2 (10001)
S2(00001)
TIM 001
M1
10000
Motor 1
M1( 10000)
M1(10000 )
00001
TIM 000
# 0020
S1(00000)
2 sec
TIM 001
04000
04000
04000
00000
TIM 001
# 0020
2 sec
Motor 3
FUN (01)
SARIATI
Page 68
Referring to Figure 5.2 and Table 5.2, the box is on the conveyor will move when PB1 is pressed.
Box conveyor will stops and the Apple Conveyor will begin to move when the box is detect.
Sensor part will count for 10 apples then Apple Conveyor motor will stops and Box conveyor
motor starts again. Counter will be reset and operation repeats until PB2 is pressed.
Device
00000
00001
00002
00003
Output
Device
10000
Apple Conveyor
10001
Box Conveyor
Ladder Diagram
SARIATI
Page 69
PB1 (00000 )
PB2 (00001)
Start -stop
20000
20000
When a box is
detected, a conveyor
with apples start
moving.
20000
10001
10000
SE1 (00002)
Apples Conveyor
CNT 010
CNT 010
20000
10001
Box conveyor
SE2 (00003 )
Box sensor
SARIATI
Counter count to 10
apples through a part
Part
Sensor
sensor
.When the
conveyor with boxes
has been activated ,
limit switch resets the
counter.
Counter activate the
box conveyor and the
limit switch resets the
counter.
END(01)
Page 70
Address
Instruction
Data
0000
LD
00000
0001
OR
20000
0002
AND NOT
00001
0003
OUT
20000
0004
LD
01000
0005
AND NOT
10001
0006
OUT
10000
0007
LD
00002
0008
LD NOT
00003
0009
CNT
010
#0010
SARIATI
0010
LD CNT
010
0011
OR NOT
00003
0012
AND
20000
0013
OUT
10001
0014
FUN 01
Page 71
TIM 000
TIM
001
# 0030
TIM 000
1000
GREEN 1
1000
1001
RED 1
1001
1002
GREEN 2
1003
RED 2
1002
END(01)
SARIATI
Page 72
Instruction
Data
00000
LD NOT TIM
001
00001
TIM
000
#0030
00002
LD TIM
000
00003
TIM
001
#0030
00004
LD NOT TIM
000
00005
OUT
1000
00006
LD NOT
1000
00007
OUT
1001
00008
LD
1001
00009
OUT
1002
00010
LD NOT
1002
00011
OUT
1003
00012
FUN 01
SIMULATION RESULT:
SARIATI
Page 73
Output
Page 74
00000
10005
10004 00005
10000
10000
MV1
MV1
10000
10000
In
10002
MV1
Mill Motor
10000
MV1
00005
00006
10001
10001
MV2
10001
MV2
TLB1
TLB2
ATAS
BAWAH
MV2
Kelua
ran
CNT 047
Count 4
#0004
Counts
00001
CNT 047
Stop
01000
CNT 047
10004
PL
Indicator
TIM 000
Reset
CNT 047
#0020
TIM 000
10005
BZ
Buzzer
01000
Reset
FUN(01)
Mnemonic Code.
SARIATI
Page 75
SARIATI
Address
Instruction
Data
0000
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
LD
OR
AND NOT
AND NOT
AND NOT
OUT
LD
OUT
LD
AND NOT
OR
AND NOT
OUT
LD
LD
CNT
0016
0017
0018
0019
LD
OUT
LD
TIM
0020
0021
0022
0023
0024
LD
OR
AND NOT
OUT
FUN 01
00000
10000
10005
10004
00005
10000
10000
10002
10000
00005
10001
00006
10001
10001
00001
047
#0004
CNT 047
10004
01000
000
#0020
CNT 047
01000
TIM 000
10005
Page 76
In the beginning of the drilling cycle the Upper Limit Switch (0001) is closed
The START button (0000) starts the drilling cycle
The drill motor M1 (0500) must start. At the same time, the vertical motor M2 must start
to descend the drill (0501)
The drill will stop at the Lower Limit Switch (0002).
At this time, the vertical motor start to ascend the drill (0502).
The drill motor must stop just at the upper position.
Wait for a new drilling cycle
Timing Diagram
SARIATI
Page 77
SARIATI
Page 78
Description:
S1 - Sensor passenger arrival
S2 - Sensor passenger departure
MOTOR - Motor driving escalator
Scenario
If S1 is ON, then the MOTOR ON and OFF Timer1
If S2 is ON, then ON Timer1
If Timer1 is ON, then MOTOR is OFF
SARIATI
Page 79
Rung 1. If S1 ON and OFF Timer1, the MOTOR ON. The output value of 010.00 bits (MOTOR) is
used as a lock (bit-locking).
Rung 2. If S2 is ON, then OFF for S1, the condition will Timer1_ON ON. Usage instructions DIFU
(13) serves to indicate that a higher priority than the S2 S1. And the Timer1 must be OFF when
S1 ON. This is to anticipate the possibility ON S2 longer than S1.
Rung 3. During the Timer1_ON = ON, then ON Timer1. If the value is met then Timer1 Timer1
MOTOR will disconnect the circuit so that the escalator will stop running.
SARIATI
Page 80
CHAPTER 6
Selection And Maintenance For Plc
1. Selection Specification/Criteria For Plc
(a)
INPUT UNIT
TYPES
DC Input
AC Input
MODEL NO
CAPACITY
CQM1-ID211
8 points
CQM1-ID212
16 points
CQM1-ID213
32 points
CQM1- IA121
8 points
CQM1-IA221
8 points
OUTPUT UNIT
TYPES
MODEL NO
CAPACITY
Relay Output
CQM1-OC211
8 points
Units
CQM1-OC222
16 points
Transistor
CQM1-OD211
8 points
Output Units
CQM1-OD212
16 points
CQM1-OD213
32 points
CQM1-OD214
16 points
CQM1-OD215
8 points
CQM1-OD221
8 points
AC Output Unit
(b)
(c)
Memory size
SARIATI
Page 81
A PLC memory size refers to the ability of program storage space in PLC memory system.
Table 10.2 shows the memory size depending on the CPU type.
No. Model
Saiz Ingatan
CQM1-CPU11-E
CQM1-CPU21-E
CQM1-CPU41-E
CQM1-CPU42-E
CQM1-CPU43-E
CQM1-CPU44-E
(d)
(e)
(f)
SARIATI
Page 82
Wiring failure
Conductors in the cable disconnected.
Loosen screw at the input and output terminal
Oxidation of the conductor
(c)
(d)
Power failure
Power failure occurs in the automation control system when the supply voltage drops
below 85% of the rated values. This condition will cause the PLC to stop immediately
(e)
SARIATI
Page 83
To reduce damage to the automation control system, installation and wiring PLC should give
serious consideration to the following matters:
Avoid the installation of a PLC in a place with the characteristics below.
Exposure directly to the sun.
The ambient temperature exceeds the range of 0 C to 55 C.
Relative humidity exceeds the range of 10% to 90% RH.
Condensation occurs due to temperature changes occur suddenly.
Contains flammable gases and toxic.
Contains water, oil, dirt and chemicals.
Vibration areas such as volcano or construction area.
Put the PLC in the panel / cabinet that has the following characteristics:
SARIATI
Page 84
Input / Output
Line
300 mm minimum
Control cable
And supply line
300 mm minimum
Supply cable
SARIATI
Page 85
Page 86
5. Preventive Maintenance
Although the PLC is design at a high level of reliability, but it still can have damages. Therefore,
preventive maintenance is needed. Preventive maintenance measures can be made as follows:
Conduct periodic inspections of screw tightness at input and output terminals.
Ensure that all components are free from dust. Cooling system at the PLC can not be
implemented if there is dust in layers.
The possibility of erosion in some condition. Perform periodic inspection of the possible
erosion of the terminal connection. Printed Circuit Boards and eroded the possibility of
internal connectors.
Keep storage of equipment/spare parts with good care easy to use at the time of the
damage to the components. Users will experience losses if there is no storage of
equipment because they have to wait in a long period to obtain parts.
Keep documentation of program operation and circuit wiring neatly. You may need it in
case of emergencies
SARIATI
Page 87
(a)
List FIVE (5) types of PLC failure and provide THREE (3) factors that cause
failure.
(b)
the
Floor Ducts
ii)
Conduit
iii)
Handling Ducts
(c)
State FOUR (4) technical guidelines to overcome PLC grounding system problems.
(d)
(e)
(f)
(g)
Explain the differences between Output Relay Types and Output Transistor Types
(h)
Why do we need to know the types of Programming language before to use PLC?
(i)
PLC contains many active components (transistors, circuit integrated chip), where it will
burn if surge voltage occur. The surge voltage occurs because of lightning. Therefore it is
necessary to overcome grounding problem to avoid the burning of the component. States
TWO (2) guidelines how to overcome the grounding problem
References:
1.
2.
SARIATI
Page 88