SlideShare a Scribd company logo
1 of 64
Download to read offline
Rev No :00
Released Date :01/02/2021
CP15
SEMESTER 4
PROGRAMMABLE
LOGIC
CONTROLLER - 1
`
Go to Table of Content
NTTF_DIPLOMA IN MECHATRONICS ENGINEERING & SMART FACTORY [CP15]_SEMESTER 4_PROGRAMMABLE LOGIC CONTROLLER -1_MASTER FILE 1
Table of Content
Contents
1.PLC BASICS......................................................................................................................................................2
1.1 Introduction to PLC.............................................................................................................................2
1.2 Overall Look Inside PLC ........................................................................................................................3
2.BASIC PLC PROGRAMMING..............................................................................................................................8
2.1 General PLC Programming Procedure and I/O Devices .......................................................................8
2.2 ON/OFF Inputs and ON/OFF outputs .................................................................................................11
2.3 Relation between Digital gates and Coil/Contact logic......................................................................12
2.4 Creating Ladder Diagrams for Process Control .................................................................................19
3.BASIC FUNCTIONS .........................................................................................................................................22
3.1 Registers Basics .................................................................................................................................22
3.2 Timer Functions..................................................................................................................................25
3.3 Counter Functions ..............................................................................................................................27
4.INTERMEDIATE FUNCTIONS ...........................................................................................................................30
4.1 Arithmetic Functions..........................................................................................................................30
4.2 Number Comparison Functions..........................................................................................................33
4.3 Number Conversion Functions...........................................................................................................41
5.DATA HANDLING FUNCTIONS ........................................................................................................................43
5.1 PLC Skip & Master Control Relay Functions......................................................................................43
5.2 JMP Instruction..................................................................................................................................45
5.3 Data Movement Instruction...............................................................................................................46
5.4 Other Functions..................................................................................................................................52
6.FUNCTIONWORKING WITH BITS.....................................................................................................................55
6.1 Digital Bit Functions & Their Applications..........................................................................................55
6.2 Sequencer Functions .........................................................................................................................61
`
Go to Table of Content
NTTF_DIPLOMA IN MECHATRONICS ENGINEERING & SMART FACTORY [CP15]_SEMESTER 4_PROGRAMMABLE LOGIC CONTROLLER -1_MASTER FILE 2
1. PLC BASICS
1.1 Introduction to PLC
A PLC is user friendly, microprocessor -based specialized computer that carries out control
functions of many types and levels of complexity. Its purpose is to monitor crucial process
parameters and adjust process
operations accordingly.A programmable
logic controller (PLC) is a solid state
device designed to perform logic
functions previously accomplished by
electro mechanical relays. The design of a
PLC is similar to that of a computer. The
PLC is an assembly of solid state digital
logic elements designed to make logical
decisions and provide outputs.
Programmable logic controllers are used
for the control and operation of
manufacturing process equipment and machinery. They are capable of storing
instructions, suchas sequencing , timing, counting, arithmetic, data manipulation, and
communication,to control industrial machines and processes.
PLC PRODUCT APPLICATION RANGES
Figure graphically illustrates programmable
controller product ranges. This chart is not
definitive, but for practical purposes, it is valid.
The PLC market can be segmented into five
groups:
1. Micro PLCs
2. Small PLCs
3. Medium PLCs
4. Large PLCs
5. Very large PLCs
`
Go to Table of Content
NTTF_DIPLOMA IN MECHATRONICS ENGINEERING & SMART FACTORY [CP15]_SEMESTER 4_PROGRAMMABLE LOGIC CONTROLLER -1_MASTER FILE 3
ADVANTAGES OF PLC
▪ Implementing changes and correcting errors
▪ Large quantity of Contacts can bee liminated
▪ Lower Cost
▪ Pilot running
▪ Visual Observation
▪ Speed of Operation
▪ Ordering control system
▪ Documentation
▪ Security
▪ Flexibility
DISADVANTAGES OF PLC
▪ Newer Technology
▪ Fixed Program Application
▪ Environmental Consideration
▪ Fail – Safe Operation
▪ Fixed Circuit Operation
1.2 Overall Look Inside PLC
Here the overall look inside the plc is given with the block diagram.
It contains Input module, CPU, Microprocessor, Memory, Output module,
Programmer/Monitor, Power Supply and Rack & Chassis. Below the following modules are
explained.
`
Go to Table of Content
NTTF_DIPLOMA IN MECHATRONICS ENGINEERING & SMART FACTORY [CP15]_SEMESTER 4_PROGRAMMABLE LOGIC CONTROLLER -1_MASTER FILE 4
CENTRAL PROCESSING UNIT
The brain of the system which is having three parts
1. Microprocessor : the computer center that carries out mathematics and logical
operations.
2. Memory : The area of the CPU in which the data and information are Stored and
retrieved. Holds the system software and user program.
3. Power supply : The electrical supply that converts AC to various operational DC
voltages. In the process the powersupply filters and regulates the DC voltages to ensure
proper computer operations.
PROGRAMMER/MONITOR(PM)
▪ Used to communicate with
circuit of PLC.
▪ Can be handheld
terminals, Industrial
terminals and personal
computer.
INPUT MODULE
Input modules have terminals in
to which outside process electrical signals generated by sense or transducer are entered.
The output module
has terminals to
which o/p signals
are sent to actuate
relays, solenoids,
various solid state
switching devices,
motors and
displays. An
electronic system
for connecting I/O modules to remote locations can be added. The actual operating
process under plc control can be thousands of feet from cpu and its I/O modules.
`
Go to Table of Content
NTTF_DIPLOMA IN MECHATRONICS ENGINEERING & SMART FACTORY [CP15]_SEMESTER 4_PROGRAMMABLE LOGIC CONTROLLER -1_MASTER FILE 5
PLC OUTPUT MODULE
The output module operates in
the opposite manner from the
input module. A dc signal from
the CPU is converted through
each module section to a usable
output voltage either AC or
DC.The CPU signal goes through
an isolation stage.Any erratic
voltage surge from output devise does not get back to CPU and cause damage. The
isolator out is then transmitted to switching accomplished by turning on a triac.The output
of a module section may be through are layora dc or ac output.
RACK AND CHASIS: The racks on which plc parts are mounted and the enclosures on which
the CPU, PM and modules are manual.
PRINCIPLES OF OPERATION
A programmable controller, as illustrated in Figure, consists of two basic sections:
• The central processing unit
• The input/output interface system
The central processing unit (CPU) governs all PLC activities. The following three
components, shown in Figure, form the CPU:
• The processor
• The memory system
• The system power supply
`
Go to Table of Content
NTTF_DIPLOMA IN MECHATRONICS ENGINEERING & SMART FACTORY [CP15]_SEMESTER 4_PROGRAMMABLE LOGIC CONTROLLER -1_MASTER FILE 6
The operation of a programmable controller is
relatively simple. The input/output(I/O) system is
physically connected to the field devices that are
encountered in the machine or that are used in the
control of a process. These field devices may bed is
creteoranalog input/output devices, suchas limit
switches, pressuretransducers, pushbuttons,
motorstarters, solenoids, etc. The I/O interfaces
provide the connection between the CPU and the
information providers(inputs) and controllable
devices(outputs).
During its operation, the CPU completes three processes:
1. itreads, or accepts, the input data from the field devices via the input interfaces,
2. it executes, orperforms, the control program stored in the
memory system, and
3. it writes, orupdates, the output devices via the output
interfaces.
This process of sequentially reading the inputs, executing the
program in memory, and updating the outputs is known as
scanning. Figure illustrates a graphicrepresentationofascan.
The input/output system forms the interface by which field
devices are connected to the controller. The main purpose of
the interface is to condition the various signals received from or
sent to external field devices. Incoming signals from sensors
(e.g.,push buttons, limit switches, analog sensors, select or
switches, and thumb wheel switches) are wired to terminals on the input inter faces.
Devices that will be controlled, like motor starters, solenoid valves, pilotlights, and
position valves, are connected to the terminals of the output interfaces. The system
power supply provides all the voltages required for the proper operation of the various
central processing unit sections.
`
Go to Table of Content
NTTF_DIPLOMA IN MECHATRONICS ENGINEERING & SMART FACTORY [CP15]_SEMESTER 4_PROGRAMMABLE LOGIC CONTROLLER -1_MASTER FILE 7
Although not generally considered apart of the controller, the programming device,
usually a personal computer or a manufacturer’s mini programmer unit is required to
enter the control program in to memory. The programming device must be connected to
the controller when entering or monitoring the control program.
`
Go to Table of Content
NTTF_DIPLOMA IN MECHATRONICS ENGINEERING & SMART FACTORY [CP15]_SEMESTER 4_PROGRAMMABLE LOGIC CONTROLLER -1_MASTER FILE 8
2. BASIC PLC PROGRAMMING
2.1 General PLC Programming Procedure and I/O Devices
LADDER DIAGRAMS AND THE PLC
The ladder diagram has and continues to be
the traditional way of representing electrical
sequences of operations.These diagrams
represent the interconnection of field devices
in such away that the activation or turning
ON,of one device will turn ON another device
according to a pre determined sequence of
events.Figure illustrates a simple electrical
ladder diagram.
The original ladder diagrams were established
to represent hardwired logic circuits used to control machines or equipment. Due to
wide industry use,they became a standard way of communicating control information
from the designers to the users of equipment.As programmable controllers were
introduced, this type of circuit representation was also desirable because it was easy to
use and interpret and was widely accepted in industry.
Programmable controllers can implement all of the “old” ladder diagram conditions and
much more.Their purpose is to perform these control operations in a more reliable
manner at a lower cost. A PLC implements, in its CPU, all of the old hardwired
interconnections using its software instructions is transparent to the engineer or
programmer. Figure illustrates the PLC transformation of the simple diagram shown in
Figure to a PLC format. Note that the “real” I/O field devices are connected to input and
output interfaces, while the ladder program is implemented in a manner, similar to
hardwiring, inside the programmable controller (i.e.,softwired inside the PLC’s CPU
instead of hardwired in a panel). As previously mentioned, the CPU reads the status of
inputs, energizes the corresponding circuit element According to the program, and
controls areal output device via the output interfaces.
`
Go to Table of Content
NTTF_DIPLOMA IN MECHATRONICS ENGINEERING & SMART FACTORY [CP15]_SEMESTER 4_PROGRAMMABLE LOGIC CONTROLLER -1_MASTER FILE 9
`
Go to Table of Content
NTTF_DIPLOMA IN MECHATRONICS ENGINEERING & SMART FACTORY [CP15]_SEMESTER 4_PROGRAMMABLE LOGIC CONTROLLER -1_MASTER FILE 10
PROPER CONSTRUCTION OF PLC LADDER DIAGRAMS
1. A construct must always inserted in slot 1 in the upper left.
2. A coilmust be inserted at the end of the rung.
3. All the contacts must run horizontally. Novertical oriented contact sare allowed.
4. Number of contact permatrixis limited(3*4)
5. Only one output connected to a group of input.
6. Contacts must be nested properly
7. Flow must be from left to right.
8. Contact progression should be straight across.
`
Go to Table of Content
NTTF_DIPLOMA IN MECHATRONICS ENGINEERING & SMART FACTORY [CP15]_SEMESTER 4_PROGRAMMABLE LOGIC CONTROLLER -1_MASTER FILE 11
2.2 ON/OFF Inputs and ON/OFF outputs
PLC INPUT INSTRUCTIONS
The various types of inputs includes
1. NORMALLY OPEN CONTACT - When this contact closes the functions carries out some
kind of actions.
2. NORMALLY CLOSED CONTACT - When this contact opens the functions carries out
some kind of actions.
3. LATCH OR UNLATCH SYSTEM - Actuating the latch input turns the function on or closes
it to change the state. The function then stays one veniflatch input is turned off. To
turn the function off, an other input, unlatch, is turned on, which turns the function
off. If unlatch is the turned off, the function remains off.
4. DIFFERENTIATING UP, OR RISING-EDGE ACTUATION - This involves turning the
function on for one scan time at the leading edge of an input pattern.
5. DIFFERENTIATION DOWN,OR FALLING-EDGE ACTUATION - This involves turning
the function on for one scan time at the trailing edge of a signal pattern.
OUTPUTS: COILS, INDUCTORS, AND OTHERS
Coils in an internal PLC program are related to output signals that are sent to external
devices. An output is energized through the output module when its corresponding coil
number is turned on in the PLC ladder diagram. Note that not all coils in the program have
a corresponding output. Many coils are used for internal logic only. The output devices
voltage and current Requirements must be matched for the output module values.
`
Go to Table of Content
NTTF_DIPLOMA IN MECHATRONICS ENGINEERING & SMART FACTORY [CP15]_SEMESTER 4_PROGRAMMABLE LOGIC CONTROLLER -1_MASTER FILE 12
2.3 Relation between Digital gates and Coil/Contact logic
We discus digital logic gates from a PLC logic stand point, but we do not cover the details
of their electronic internal workings or their electrical operation. All gates have one
output. The outputs are either on(1) or off(0), depending on the logic status of their
inputs, on/off. Gate on condition is typical when+5 volts DC comes from the outputter
minals. Off is typically zero volts outputs.
`
Go to Table of Content
NTTF_DIPLOMA IN MECHATRONICS ENGINEERING & SMART FACTORY [CP15]_SEMESTER 4_PROGRAMMABLE LOGIC CONTROLLER -1_MASTER FILE 13
NOT Gates or Inverters
The NOT gate always has one
inputs. The output of a NOTgate is
the inverse of the input. The NOT
gate is sometimes called an
inverter. The function of a NOT
gateis simulated by the electric
circuit displayed in Figure. When
the switchis closed, the electric
bulb is short circuited, and it turns
off .When the switchis open,
electric current flows through the
light bulb, and the light bulb turns on. Like the NOT gate, the output is on when the input
is off and viceversa. The input is inverted to generate an output. Figure displays the NOT
logic gate symbol, its Boolean expression, and its truthtable. Figure displays that there
are two different types of PLC ladder logic diagrams that perform the NOT function.
▪ In rung 0000, the XIO (examineif open) deviceis connected to the output. There fore,
the XIO deviceis normally closed and output zero is ON. When you press push button
#1(I:0/0), the output zero (pilotlight#1) is turned off. (Notice that addressI:0/0
references the port 0 on module 0.)
▪ In rung 0001, push button #2(I:0/1) is connected to internal coil bit B3:0/0. (Notice that
addressI:0/1 references the port 1 on module 0.)
▪ In rung 0002, the internal contact bit B3:0/0 is inverted and connected to output one
(pilotlight#2). When normally open inputI:0/1 is open, output one (O:0/1) is ON. Press
input0/1 to close it, then output one will turn OFF.
`
Go to Table of Content
NTTF_DIPLOMA IN MECHATRONICS ENGINEERING & SMART FACTORY [CP15]_SEMESTER 4_PROGRAMMABLE LOGIC CONTROLLER -1_MASTER FILE 14
AND Gate
The function of an AND gate is simulated in the electric circuit displayed in Figure. Notice
that the lamp will be on only when both switches are closed. Figure displays a two-input
AND logic gate symbol, its Boolean expression, and itstruthtable. In the truthtable, you
can see that there is only one set of inputs that produces a logic high output. Figure
displays a ladder logic diagram that performs the function of a two-input AND gate.
When normally open inputs I:0/0 and I:0/1 are closed, output O:0/0 is energized.
OR Gate
The function of an OR gate is simulated in the electric circuit displayed in Figure.
Notice that the lamp will be ON when one or both of the switches are closed. Figure
displays a two-input OR logic gate symbol, its Boolean expression, and its truth table.
The truth table shows a logic high output for all combinations of inputs except where
both A and B are low. When either input A, B, or both are on, the output is on. Figure
displays a ladder logic diagram that performs the function of a two-input OR gate.
When either normally open (NO)inputs I:0/0,I:0/1, or both are closed, output O:0/0 is
energized.
`
Go to Table of Content
NTTF_DIPLOMA IN MECHATRONICS ENGINEERING & SMART FACTORY [CP15]_SEMESTER 4_PROGRAMMABLE LOGIC CONTROLLER -1_MASTER FILE 15
NAND Gate
The function of a NAND gate is simulated in the electric circuit displayed in Figure. Notice
that the lamp will be off when both switches are closed. The NAND gate takes its name
from NOT and AND. Its outputs are the inverse of the AND gate. Figure displays a two-
input NAND logic gate symbol, its Boolean expression, and its truthtable. Notice that the
NAND gate can be built by connecting an AND gate in series with a NOT gate. U sing the
De- Morgan the orem, some times also called the Bubble method, you can convert a
NAND gate to an OR gate with inverted inputs where (A·B)′=A′+B′. Figure displays that
there are two different types of ladder logic diagrams that perform the NAND function.
Both normally closed inputs I:0/0 and I:0/1 must bee nergized (opened) to turn off the
output O:0/0.
`
Go to Table of Content
NTTF_DIPLOMA IN MECHATRONICS ENGINEERING & SMART FACTORY [CP15]_SEMESTER 4_PROGRAMMABLE LOGIC CONTROLLER -1_MASTER FILE 16
`
Go to Table of Content
NTTF_DIPLOMA IN MECHATRONICS ENGINEERING & SMART FACTORY [CP15]_SEMESTER 4_PROGRAMMABLE LOGIC CONTROLLER -1_MASTER FILE 17
NOR Gate
The function of a NOR logic gate is simulated in the electric circuit displayed in Figure.
Notice that the lamp will be ON when both switches are open. The NOR gate takes its
name from NOT and OR. Its outputs are the inverse of the OR gate.
Figure displays a two-input
NOR logic gate symbol, its
Boolean expression, and its
truthtable. Notice the NOR
gate can be built by
connecting an OR gate in
series with a NOT gate. Using
the De-Morgan the orem,
youcan convert a NOR gate
to an AND gate with inverted
inputs where (A+B)′=A′·B′.
Figure displays that there are two different types of ladder logic diagrams that perform
the NOR gate function.
Both normally closed inputs I:0/0 and I:0/1 must be deenergized (remain closed) to turn
the output O:0/0.
`
Go to Table of Content
NTTF_DIPLOMA IN MECHATRONICS ENGINEERING & SMART FACTORY [CP15]_SEMESTER 4_PROGRAMMABLE LOGIC CONTROLLER -1_MASTER FILE 18
XOR (Exclusive OR) Gate
The function of an XOR (exclusiveOR) gate is
simulated in the electric circuit displayed in
Figure. Notice that the lamp will be on if one
switch is open while the other switch is
closed. Figure displays an XOR logic gate
symbol, its Boolean expression, and its truth
table. Looking at the truth table, you can see
that either inputs AorB (but not both) must
be high to produce a high out put. One input
must be ON and the other one OFF in Order
to have the output ON.
Figure displays a ladder logic diagram that
performs the function of an XOR gate. When
I:0/0ison, I:0/1 must be off and viceversa in
order to turn on output O:0/0. When either Push button #1orPush button #2is pressed,
the output is ON. When both push buttons are pressed, output is OFF.
`
Go to Table of Content
NTTF_DIPLOMA IN MECHATRONICS ENGINEERING & SMART FACTORY [CP15]_SEMESTER 4_PROGRAMMABLE LOGIC CONTROLLER -1_MASTER FILE 19
2.4 Creating Ladder Diagrams for Process Control
Ladder diagrams are most commonly used diagrams for non electronic control circuit.
They are sometimes called elementary diagrams. Sometimes they are considered as a
sub type of schematic diagrams. The term ladder diagram isused in this book. Why these
diagrams are called ladder diagrams. They look like a ladder in away.
Two types of ladder diagrams are used in control systems: The control ladder diagram
and Power ladder diagram.
This section concentrates on control ladder diagrams with only a fundamental
explanation of power ladder diagram.
LARGE-PROCESS LADDER DIAGRAM CONSTRUCTION
Steps in planning a program
▪ Define the process to be controlled.
▪ Make a sketch of the process operation.
▪ Create a written step sequence listing for the process.
▪ Add sensors on the sketch as needed to carry out the control sequence.
▪ Add manual controls as needed for process set up or operational checking.
▪ Consider the safety of the operating personal and make additions and adjustments as
needed.
▪ Add master stop switches as required for safe shutdown.
▪ Create the ladder logic diagram that will be used as basis for the PLC program.
▪ Consider the “what if’s”where the process sequence may go as tray.
Define the problem
We wish to setup a system for spray painting parts. A part is to be placed on a mandrel.
(A mandrel is a shaft or bar who seen disinserted into a workpiece to hold it during an
operation). When the part is in place, two push buttons are pressed and them and
relrises. After the part rises to the top and is in the hood, it is to have spray paint applied
for a period of 6 seconds. At the end of the 6 seconds, the mandrel returns to the original
position. The painted partis then removed from the mandrel by hand.(We as sume for
our illustration that the part driesvery quickly.) Make a sketch of the process operation.
`
Go to Table of Content
NTTF_DIPLOMA IN MECHATRONICS ENGINEERING & SMART FACTORY [CP15]_SEMESTER 4_PROGRAMMABLE LOGIC CONTROLLER -1_MASTER FILE 20
SKETCH OF THE SPRAY PAINT SYSTEM
Add sensors on the sketch as needed to carry out the control sequence.
Sensor, Enclosures, and Push button locations
`
Go to Table of Content
NTTF_DIPLOMA IN MECHATRONICS ENGINEERING & SMART FACTORY [CP15]_SEMESTER 4_PROGRAMMABLE LOGIC CONTROLLER -1_MASTER FILE 21
Ladder Diagram
`
Go to Table of Content
NTTF_DIPLOMA IN MECHATRONICS ENGINEERING & SMART FACTORY [CP15]_SEMESTER 4_PROGRAMMABLE LOGIC CONTROLLER -1_MASTER FILE 22
3. BASIC FUNCTIONS
3.1 Registers Basics
HOLDING REGISTERS
▪ A Holding register, or working register( HR)”holds”the contents of a calculation,
arithmeticor logic.
▪ Conceptually, it is in the “middle”of the CPU.
▪ The holding register is not directly accessible to inputs or outputs, input and output
register (single or group) interface the holding register contents to the outside world.
▪ Signal data from as pecific input device is first“deposited”, in the form of 0 sand 1s, in
an input register. It may then be manipulated by the micro process or and the result
sent to a holding register.
▪ Conversely, before the contents of the holding register can affect the output device,
they are transferred to an output register. The output register’s 0sand1s“drive”
output interface devices such as opto- isolators.
`
Go to Table of Content
NTTF_DIPLOMA IN MECHATRONICS ENGINEERING & SMART FACTORY [CP15]_SEMESTER 4_PROGRAMMABLE LOGIC CONTROLLER -1_MASTER FILE 23
INPUT REGISTERS : SINGLE AND GROUP
▪ It is readily accessible to the input module’s terminals or ports.
▪ The number of input registers in a PLC is normally one-tenth that of holding registers.
▪ The input group register(IG) is some what like the input register.
▪ It differs in that each one of the individual 16 bits is directly accessible from one input
port.
▪ One input group register receives data from 16nconsecutive input ports (terminals).
▪ The advantage of the IG system is that only one register is required to service 16
inputs.
`
Go to Table of Content
NTTF_DIPLOMA IN MECHATRONICS ENGINEERING & SMART FACTORY [CP15]_SEMESTER 4_PROGRAMMABLE LOGIC CONTROLLER -1_MASTER FILE 24
OUTPUT REGISTERS : SINGLE AND GROUP
▪ The output register has the same basic characteristics as the holding register.
▪ The output register differs from the holding register,however,in that it is readily
accessible to the output module’s terminals and ports the number of output registers
is normally equal to the number of the input registers.
▪ One OG register can control 16 outputs.
▪ If a 1 is in a bit position, it will turn that bit’s corresponding output on.
`
Go to Table of Content
NTTF_DIPLOMA IN MECHATRONICS ENGINEERING & SMART FACTORY [CP15]_SEMESTER 4_PROGRAMMABLE LOGIC CONTROLLER -1_MASTER FILE 25
3.2 Timer Functions
PLC provides several types of timer instructions . However, PLC manufacturers may
provide different definitions for each type of timer function offered.
Single input timer - A single input timer is
also known as no retentive timer. Energizing
IN001 causes the timer to run for 14
seconds. At the end of 14 seconds output
goes on. When the input is re energized, the
timer reset to zero. If the input is turned off
during the timing interval the timer resets
to zero.
Multiple input Timer - It includes RUN and ENABLE/RESET line. The ENABLE/RESET line
allows the timer to run when energized. When this line reenergized the timer reset
stozero. The RUN line causes the timer
to run when ENABLE line is energized.
When enabled the timer run along as
the run input is energized. When
runline is reenergized the timer stops
running where it is but does not reset
to zero. Suppose that IN002 is closed
and IN001 is turned on. After 6
sec,IN001is opened. The timer retains a
count of 6. Timing has not reached the
preset value of 14 seconds, and the timer
output is still off. The timer does not
reset until the IN002 is opened. Suppose
that some times later the IN002 is
reclosed. After 8 more seconds of IN001
being closed, the timer coil will energize.
Since 6+8=14.
3 input timer is a special case when ENABLE and RESET are separate input rather than a
common single input. This configuration can be used for special arrangement.
`
Go to Table of Content
NTTF_DIPLOMA IN MECHATRONICS ENGINEERING & SMART FACTORY [CP15]_SEMESTER 4_PROGRAMMABLE LOGIC CONTROLLER -1_MASTER FILE 26
Exercise using Timer:
1. For a grinding operation of metal part, the coolant flow on a metal part must be on for
an interval before the Grinding process starts. When the process circuitis turned on
the coolant motor is turned on. 8 seconds later the grinding process starts.
2. A motor and its lubrication pump are both running.Lubrication for main motor bearing
is required during motor coast down. After the main motor shutdown, the lubricating
pump remains on for a time corresponding to motor coast down time.
`
Go to Table of Content
NTTF_DIPLOMA IN MECHATRONICS ENGINEERING & SMART FACTORY [CP15]_SEMESTER 4_PROGRAMMABLE LOGIC CONTROLLER -1_MASTER FILE 27
3.3 Counter Functions
PLC counters have programming formats which are similar to timer formats. One counter
input furnishes count pulse swhich the plc function analyze. Another input usually carries
out ENABLE/RESET. Most plc
contains both up and down
counter swhich functions
similarly. Some PLC also
includes a combination
UP/DOWN counter in one
function. Others contain
special high speed counters
for high speed counting. And
increments by one each time
IN001 is pulsed on. When the
preset value is reached, the
output CR17 goes on. Ask the count goes on beyond the preset value, the output stays on.
Opening IN002 at any time resets the counter to 0. The down counter operates in a similar
manner. The count starts at the preset value and decrements by one each time the input
IN001 goes on. When the count reaches zero, the output goes on.
In some applications, you may wish to stop the count for a time without it resetting to
zero and start counting again later where the count left off. This is accomplished byu
sing counter with separateenable and reset.
UP/DOWN COUNTER
There are three input one for up count,
one for down count and an
ENABLE/RESET input. The up/down
counter is used as a single function when
the process uses an up and down counter
in tandem.
`
Go to Table of Content
NTTF_DIPLOMA IN MECHATRONICS ENGINEERING & SMART FACTORY [CP15]_SEMESTER 4_PROGRAMMABLE LOGIC CONTROLLER -1_MASTER FILE 28
The basic plc counter function, which is
same for UP and DOWN counters except
for the designation for UC/DC. The count a
twhich the counter output is to goon is
entered into the preset space. The count
can be a constant or canbe are gister. For
the up counter, the count starts at 0 and
increments by one each time IN001 is pulse
don. When the preset value is reached, the
output CR17 goeson. Ask the count goes on
beyond the preset value, the output stay son. Opening IN002 at any time resets the
counter to 0. The down counter operates in a similar manner. The count starts at the
preset value and decrements byone each time the input IN001 goeson. When the count
reaches zero, the output goeson.
`
Go to Table of Content
NTTF_DIPLOMA IN MECHATRONICS ENGINEERING & SMART FACTORY [CP15]_SEMESTER 4_PROGRAMMABLE LOGIC CONTROLLER -1_MASTER FILE 29
In some applications, you may wish to stop the count for a time without it resetting to
zero and start counting again later where the count left off. This is accomplished by
using counter with separate enable and reset.
QUESTIONS.
An indicator to go on when six of part C and eight of part D are on the conveyor. IN002 and
IN003 are proximity devices that senses part C and part D respectively.
`
Go to Table of Content
NTTF_DIPLOMA IN MECHATRONICS ENGINEERING & SMART FACTORY [CP15]_SEMESTER 4_PROGRAMMABLE LOGIC CONTROLLER -1_MASTER FILE 30
4. INTERMEDIATE FUNCTIONS
4.1 Arithmetic Functions
PLC ADDITION
The addition will not take place continuously just because Enable is on. It adds only when
the enable line
changes from off to
on. When enabled,
the numerical value in
operand 2 register is
added to the
numerical value in
operand 1 register.
The resulting value
then appears in the
specified destination
register. The coil only comes on when the resulting number exceeds the register
counting capability (Overflow). Constants, HR, or OR can be used as operand by consult
the manufacture's manual of PLC. 462+327=789 no over flow, coil off 9642+3471=13113
overflow, coil on.
PLC SUBTRACTION
For subtraction
operand 2 is
subtracted from
operand 1. The
result is found in
destination register.
When the result
is+ve the coil is off
and the result is
found in destination
register when the result is–ve the coil is ON and the resulting negative number value is
found in destination register. 8642-6218=2424,+ve, coil off 4621-7307= 2686, -ve, coil on.
`
Go to Table of Content
NTTF_DIPLOMA IN MECHATRONICS ENGINEERING & SMART FACTORY [CP15]_SEMESTER 4_PROGRAMMABLE LOGIC CONTROLLER -1_MASTER FILE 31
PLC REPETITIVE CLOCK
A repetitive on-off enable is needed for continuous operation. A coil turns it self off and
on a tavery fast rate about two times the scan time rate. If this is used as enable, the
operation of an arithmetic function is essentially continuous.
PLC MULTIPLICATION
The destination is two register wide by necessity 0034*0086= 2064 only one reg.
required. 6453*8933=
57, 644, 649tworeg.
required. The coil
comes on when the
multiplication is
completed. There is
normally nosquaring
function in a PLC.
Squaring is done by
putting the number to
be squared into both operand 1 and 2 of a MULTIPLY function.
`
Go to Table of Content
NTTF_DIPLOMA IN MECHATRONICS ENGINEERING & SMART FACTORY [CP15]_SEMESTER 4_PROGRAMMABLE LOGIC CONTROLLER -1_MASTER FILE 32
PLC DIVISION
Operand 1, the dividend is divided by operand 2 the divisor. The numerical result of
division appears in destination register when the function is enabled. The first
destination register is the numerical result of division. The second register value is the
remainder in numerical form.
PLC SQUARE ROOT
The number whose square rootis to bedetermined is placed in the source. The source
input number is contained in two registers. There is usually no remainder register.
`
Go to Table of Content
NTTF_DIPLOMA IN MECHATRONICS ENGINEERING & SMART FACTORY [CP15]_SEMESTER 4_PROGRAMMABLE LOGIC CONTROLLER -1_MASTER FILE 33
PLC TRIGNOMETRIC& LOG FUNCTIONS
General block diagram
The source register value is an alyzed appropriately and the calculated value appears in
destination register.The angles involved in trigonometric function are normally stated in
radians. Some PLCs have an antilog function also.
4.2 Number Comparison Functions
Many PLC’s have only two compare functions. Equal and greater than equalto. Toper for
many one of the other four function combinations of basic two comparison function are
used. Some PLC’s have all six individual functions. Which makes programming easier.
TYPICAL PLC COMPARE FUNCTIONS
The two numbers being
compared are operand 1 and
2. Operand scan Be a constant
or a register. When the
function is enabled by the
input contact, the comparison
is made .If the comparison is
true, the o/p goes on. If the
comparison is not true,the o/p
goes off,or stays off.
`
Go to Table of Content
NTTF_DIPLOMA IN MECHATRONICS ENGINEERING & SMART FACTORY [CP15]_SEMESTER 4_PROGRAMMABLE LOGIC CONTROLLER -1_MASTER FILE 34
EQUAL TO COMPARE FUNCTIONS
`
Go to Table of Content
NTTF_DIPLOMA IN MECHATRONICS ENGINEERING & SMART FACTORY [CP15]_SEMESTER 4_PROGRAMMABLE LOGIC CONTROLLER -1_MASTER FILE 35
NOT-EQUAL-TO COMPARE FUNCTIONS (Derived)
GREATER THAN OR EQUAL TO COMPARE FUNCTION
`
Go to Table of Content
NTTF_DIPLOMA IN MECHATRONICS ENGINEERING & SMART FACTORY [CP15]_SEMESTER 4_PROGRAMMABLE LOGIC CONTROLLER -1_MASTER FILE 36
NOT-EQUAL-TO COMPARE FUNCTIONS(Basic)
LESS THAN COMPARE FUNCTIONS
`
Go to Table of Content
NTTF_DIPLOMA IN MECHATRONICS ENGINEERING & SMART FACTORY [CP15]_SEMESTER 4_PROGRAMMABLE LOGIC CONTROLLER -1_MASTER FILE 37
LESS THAN COMPARE FUNCTIONS (Derived)
GREATER THAN COMPARE FUNCTIONS
`
Go to Table of Content
NTTF_DIPLOMA IN MECHATRONICS ENGINEERING & SMART FACTORY [CP15]_SEMESTER 4_PROGRAMMABLE LOGIC CONTROLLER -1_MASTER FILE 38
LESS THAN OR EQUAL TO FUNCTION
`
Go to Table of Content
NTTF_DIPLOMA IN MECHATRONICS ENGINEERING & SMART FACTORY [CP15]_SEMESTER 4_PROGRAMMABLE LOGIC CONTROLLER -1_MASTER FILE 39
When the function is enabled by the input contact, the comparison is made. If the
comparison is true the output goes on. If the comparison is not true, the output goes off
or stays off. The comparison in some PLCs is made continuously as long as the enable is
on which makes the comparison on eachscan. Insome PLC the comparison is made only
at the time the enable goeson. To make another numerical comparison the input must go
OFF and then ON. The pattern soft wo basic COMPARE functions are normally similar.
`
Go to Table of Content
NTTF_DIPLOMA IN MECHATRONICS ENGINEERING & SMART FACTORY [CP15]_SEMESTER 4_PROGRAMMABLE LOGIC CONTROLLER -1_MASTER FILE 40
Advance PLC comparison function
Limit Test - There are three inputs: the varying value and the two limits. It determines if
the value is between the high and low limits.
The Masked Comparison
The Function compares bits in two register selectively. The mask is used to denote which
bits to compare and which not to compare. Where a mask bit is 1, the comparison is
made. When mask bit is 0, no comparison is made. When enabled, the function
goeson(true) if all un masked bit spairs match. If one or more pair do not match, the
function remains off(false).
`
Go to Table of Content
NTTF_DIPLOMA IN MECHATRONICS ENGINEERING & SMART FACTORY [CP15]_SEMESTER 4_PROGRAMMABLE LOGIC CONTROLLER -1_MASTER FILE 41
4.3 Number Conversion Functions
Figure shows typical layout of BCD to binary conversion function, which is usually used for
input data conversions. It converts BCD value found in source register to destination
register. For PLC CPU use. When the function input line is energized, the values the
sources register values are converted from BCD to binary. The resulting number is put on
to the destination register. Typically for this function, the coin comes on only if the binary
value exceeds 9999 in decimal during operation.
`
Go to Table of Content
NTTF_DIPLOMA IN MECHATRONICS ENGINEERING & SMART FACTORY [CP15]_SEMESTER 4_PROGRAMMABLE LOGIC CONTROLLER -1_MASTER FILE 42
BCD TO BINARY CONVERSION
BINARY TO BCD CONVERSION
`
Go to Table of Content
NTTF_DIPLOMA IN MECHATRONICS ENGINEERING & SMART FACTORY [CP15]_SEMESTER 4_PROGRAMMABLE LOGIC CONTROLLER -1_MASTER FILE 43
5. DATA HANDLING FUNCTIONS
5.1 PLC Skip & Master Control Relay Functions
In addition to programming a coil
number in the usual manner, the
number of lines to be skipped is also
specified and programmed.
SKIP Function PLC Operation
When the SKIP function(setat3) is
turned on, the first two lines will
function as usual. However, the next three lines, 4th
rough 6, will stay on or off in their
previous state. With SKIP on, changing the input on-off status feeding the coils on lines 4th
rough 6 will have no effect on output coils 4 through 6.Coil on lines 4th
rough 6 will retain
their previous states. Line7 and 8 will continue to operate normally, unaffected by the
SKIP function operation.
`
Go to Table of Content
NTTF_DIPLOMA IN MECHATRONICS ENGINEERING & SMART FACTORY [CP15]_SEMESTER 4_PROGRAMMABLE LOGIC CONTROLLER -1_MASTER FILE 44
MASTER CONTROL RELAY FUNCTION AND APPLICATIONS
When its enable line is energized, itturnson. When MCR is off, the number of following
ladder diagram lines specified are turned off. When MCR is ON, the other seven lines
operate normally. When MCR is off the next three lines, 4th
rough 6 are turned off. With
MCR off there is no otherway to turn on coils 4th
rough 6 by energizing their enable lines.
When MCR is turned on the ladder operates in normal manner.
MCR FUNCTION PLC OPERATION
`
Go to Table of Content
NTTF_DIPLOMA IN MECHATRONICS ENGINEERING & SMART FACTORY [CP15]_SEMESTER 4_PROGRAMMABLE LOGIC CONTROLLER -1_MASTER FILE 45
5.2 JMP Instruction
Jump is a command that causes the sequence to goto , or branch to, a specified poin to
ther than the next line in the program sequence. Two types
• Jump with non return
• Jump with return
Jump with nonreturn - Jump with non return is similar to the skip function in that it leaps
over a certain portion of the main program when called up on to do so.
`
Go to Table of Content
NTTF_DIPLOMA IN MECHATRONICS ENGINEERING & SMART FACTORY [CP15]_SEMESTER 4_PROGRAMMABLE LOGIC CONTROLLER -1_MASTER FILE 46
Jump with return - Jump with return instruction leaps to a subroutine when activated. It
then returns from the subroutine to them a in program.
5.3 Data Movement Instruction
There are three types of data moving functions
1. The basic MOVE function takes aword, byte, or group bit pattern from one place and
moves it to another. Some PLC system uses a GET/PUT format instead of MOVE.
2.The second type of plc data move involves moving groups of data from two or more
consecutive register to two or more consecutive register. This second type is usually
designated as BLOCK MOVE in plc. Some plc function uses file to file in stead of block
move.
3.The third type in volves two types. One types equentially moves data from designated
group register into a single register. This is called a TABLE TO REGISTER move. Some plc
format calls this FILE TO WORD. The other type takes the value from a single register and
moves its value sequentially to a portion of a table. This is called a REGISTER TO TABLE or
WORD TO FILE.
When the function is turned on through the enable circuit, the bit pattern from the
specified source register is duplicated in the specified destination register. The source
register is unchanged. The function coil goes on when the MOVE function is completed.
The coil operation can be used to inter lock MOVE functions when there is more than one
MOVE function in program. Inter locking prevent senergizing two or more contradictory
moves when only one is desired. For example, two moves to the same register cannot
take place at the same time.
`
Go to Table of Content
NTTF_DIPLOMA IN MECHATRONICS ENGINEERING & SMART FACTORY [CP15]_SEMESTER 4_PROGRAMMABLE LOGIC CONTROLLER -1_MASTER FILE 47
BASIC MOVE FUNCTION BLOCK FORMAT
When the function is
enabled, the bit pattern
from specified register is
duplicated in the specified
destination register. The
source register is
unchanged.
The coil goes on when move function is completed. The coil operation can be used to
inter lock MOVE functions when there is more than one MOVE function in the program.
Inter locking prevents two or more contradictory moves when only one is desired. Eg:-
Two moves to the same register cannot take place at the same time.
Move Example
MOVE-ADDITION SYSTEM
The two numbers to be added are entered in input registers. The data must be transfer red
to holding registers be fore addition can take place. After addition is made,
theresultislocatedinholdingregister.Theoutputofthe addition is required to appear in an
output register.
`
Go to Table of Content
NTTF_DIPLOMA IN MECHATRONICS ENGINEERING & SMART FACTORY [CP15]_SEMESTER 4_PROGRAMMABLE LOGIC CONTROLLER -1_MASTER FILE 48
MOVE ADDITION PROGRAM
`
Go to Table of Content
NTTF_DIPLOMA IN MECHATRONICS ENGINEERING & SMART FACTORY [CP15]_SEMESTER 4_PROGRAMMABLE LOGIC CONTROLLER -1_MASTER FILE 49
BLOCK TRANSFER(BT) FUNCTION
Some PLC’s call this TABLE-TO-TABLE Function. In the functional block, specify the number
of registers to be moved. Also specify the last register of the input sequence from which
the data comes. The output coil comes on when the transfer of all registers is complete.
`
Go to Table of Content
NTTF_DIPLOMA IN MECHATRONICS ENGINEERING & SMART FACTORY [CP15]_SEMESTER 4_PROGRAMMABLE LOGIC CONTROLLER -1_MASTER FILE 50
TABLE –TO- REGISTER(TR) MOVE SYSTEM
TR function moves data sequentially from a specified portion of a large listing of data to a
single register. The TR function is programmed for table length, which is the number of
registers to besequentially inputted. The second line in the TR function is the point at
which the table transfer operation is to end. The pointer is used to point to the register
being moved at any given moment.
The function is enabled when the lower line is on. The middle line resets to the first
register. Whenever the step line is turned ON, the function transfers data and moves
down one register. To step again the top line must be turned off and back on.A timer can
be used to do the stepping. A timer contact would be used as the step contact for the
function. TR function moves data sequentially from as pecified portion of a large listing of
data to a single register. The TR function is programmed for table length, which is the
number of registers to be sequentially inputted. The second line in the TR function is the
point at which the table transfer operation is to end. The pointer is used to point to the
register being moved at any given moment.
`
Go to Table of Content
NTTF_DIPLOMA IN MECHATRONICS ENGINEERING & SMART FACTORY [CP15]_SEMESTER 4_PROGRAMMABLE LOGIC CONTROLLER -1_MASTER FILE 51
REGISTER-TO– TABLE MOVE SYSTEM
REGISTER-TO– TABLE MOVE SYSTEM
It moves data from a single register
sequentially in to a specified
number of consecutive
registers.Table length denote show
many destination registers are to
beused. The pointer in the RT
function operates similarly to
pointer in TR function. The source
specifies the one register from
which the data is to come.
`
Go to Table of Content
NTTF_DIPLOMA IN MECHATRONICS ENGINEERING & SMART FACTORY [CP15]_SEMESTER 4_PROGRAMMABLE LOGIC CONTROLLER -1_MASTER FILE 52
5.4 Other Functions
STACKING FUNCTION–FIFO&LIFO PLC FIFO FUNCTON
It retrieves data in the order stored. It is found in most PLCs. It consists of two
subfunctions.
1. FIFO Load (FFL) or FIN– to put data in to a stack
2. FIFO Unload (FFU) or FOUT – to take data out of stack.
Once the stackis full, the unload function must precede the input function. Other wise
the data will not bein serted.
PLC LIFO FUNCTION
It retrieves data in the reverse order stored.
`
Go to Table of Content
NTTF_DIPLOMA IN MECHATRONICS ENGINEERING & SMART FACTORY [CP15]_SEMESTER 4_PROGRAMMABLE LOGIC CONTROLLER -1_MASTER FILE 53
PLC FIFO FUNCTON
FILE ARITHMETIC AND LOGIC (FAL) FUNCTION
It is useful when a complex computation is performed on a series of data values. Instead
of performing a COMPUTE (CPT) function repetitively for each group of data, program
only once for FAL function. Specify the number of times the calculation process should run
and where the calculation process should start in a stack of data values. FAL function is a
multiple, sequential CPT function which saves programming time and program space.
ONE SHOT(ONS) FUNCTION
It is used with a push button input which is subjected to contact bounce. If there is a
contact bounce,there are multiple input spikes of voltage. The PLC can misinterpret the
signal. When the input goes from false to true, ONS turns the rung on for scan. The ONS
output turns on for sub sequent scan suntil the input goes from false to true. TheONS
output going from true to false has no effect on the output, whiche liminates the effect
of spikes from bounce.
`
Go to Table of Content
NTTF_DIPLOMA IN MECHATRONICS ENGINEERING & SMART FACTORY [CP15]_SEMESTER 4_PROGRAMMABLE LOGIC CONTROLLER -1_MASTER FILE 54
CLEAR (CLR) FUNCTION
It sets all the bit sin are gister or word to zero.It is useful to zero out a system be fore
starting or restarting a process.
SWEEP FUNCTION
▪ It is used to scan through a program or portion of a program at fixed intervals.
▪ The fixed intervals need to be longer than the scan time to be operational.
`
Go to Table of Content
NTTF_DIPLOMA IN MECHATRONICS ENGINEERING & SMART FACTORY [CP15]_SEMESTER 4_PROGRAMMABLE LOGIC CONTROLLER -1_MASTER FILE 55
6. FUNCTIONWORKING WITH BITS
6.1 Digital Bit Functions & Their Applications
BIT PATTERNS IN A REGISTER
CHANGING A REGISTER BIT STATUS
1. BIT SET(BS) - When BS function is enabled the corresponding bit is set to 1.Turning the
function off would have no further effect on the bit–it would remain as
2. BIT CLEAR (BC) - It has the opposite effect of BIT SET.Whenenabled,itwillchangethebit
from 1 to 0. When BC turned off, nothing further happens.
`
Go to Table of Content
NTTF_DIPLOMA IN MECHATRONICS ENGINEERING & SMART FACTORY [CP15]_SEMESTER 4_PROGRAMMABLE LOGIC CONTROLLER -1_MASTER FILE 56
3. BIT FOLLOW (BF) - When enabled the function sets the bit to 1. When disabled, the
function sets the bit to 0.
`
Go to Table of Content
NTTF_DIPLOMA IN MECHATRONICS ENGINEERING & SMART FACTORY [CP15]_SEMESTER 4_PROGRAMMABLE LOGIC CONTROLLER -1_MASTER FILE 57
SHIFT REGISTER FUNCTIONS
Enable the operator to move digital bits within and through the PLC
registers.
1) SHIFT RIGHT
2) SHIFT LEFT
3) ROTATE
4) MULTIPLE SHIFT
SHIFT RIGHT FUNCTION – One Register
The bottom input is enabling input
• The middle input determines whether a 1 or 0 is inserted in to the register
when shifting
• When the top input is activated, the register shifts all bits one position to the right
and a new bit is added on left.
`
Go to Table of Content
NTTF_DIPLOMA IN MECHATRONICS ENGINEERING & SMART FACTORY [CP15]_SEMESTER 4_PROGRAMMABLE LOGIC CONTROLLER -1_MASTER FILE 58
SHIFT RIGHT FUNCTION– Multiple Registers
SHIFT LEFT FUNCTION
▪ The bit is inserted on the right.
▪ The bits shift to the left and leave on the left.
▪ The output coil status follows the status of the last bit on left.
`
Go to Table of Content
NTTF_DIPLOMA IN MECHATRONICS ENGINEERING & SMART FACTORY [CP15]_SEMESTER 4_PROGRAMMABLE LOGIC CONTROLLER -1_MASTER FILE 59
REGISTER ROTATE FUNCTION
▪ Rotate functions are Rotate Right (RR) and Rotate Left (RL).
▪ It can be of full register re-entry or partial register re-entry.
▪ The full register re-entry system’s re-entry point can only be at the beginning of a
register.
▪ With partial re-entry type the exact number of bits needed can be chosen.
`
Go to Table of Content
NTTF_DIPLOMA IN MECHATRONICS ENGINEERING & SMART FACTORY [CP15]_SEMESTER 4_PROGRAMMABLE LOGIC CONTROLLER -1_MASTER FILE 60
Multiple shift right (MSR) function
It needs one more piece of information than SR and SL functions: a specification of the
number of shifts to be made at a time, N.
`
Go to Table of Content
NTTF_DIPLOMA IN MECHATRONICS ENGINEERING & SMART FACTORY [CP15]_SEMESTER 4_PROGRAMMABLE LOGIC CONTROLLER -1_MASTER FILE 61
6.2 Sequencer Functions
PLC’S equencer function is also called as DRUM CONTROLLER Function. It can operate
between steps by programmed time sequences.
`
Go to Table of Content
NTTF_DIPLOMA IN MECHATRONICS ENGINEERING & SMART FACTORY [CP15]_SEMESTER 4_PROGRAMMABLE LOGIC CONTROLLER -1_MASTER FILE 62
`
Go to Table of Content
NTTF_DIPLOMA IN MECHATRONICS ENGINEERING & SMART FACTORY [CP15]_SEMESTER 4_PROGRAMMABLE LOGIC CONTROLLER -1_MASTER FILE 63

More Related Content

Similar to PLCThis pdf is for those who want to learn plc from 0 level , very helpful.pdf

Similar to PLCThis pdf is for those who want to learn plc from 0 level , very helpful.pdf (20)

Basic plc
Basic plcBasic plc
Basic plc
 
Basic plc
Basic plcBasic plc
Basic plc
 
Basic plc
Basic plcBasic plc
Basic plc
 
Basic plc
Basic plcBasic plc
Basic plc
 
Basic plc
Basic plcBasic plc
Basic plc
 
Basic plc
Basic plcBasic plc
Basic plc
 
Basic plc
Basic plcBasic plc
Basic plc
 
Plc 131022133632-phpapp02
Plc 131022133632-phpapp02Plc 131022133632-phpapp02
Plc 131022133632-phpapp02
 
Basic plc
Basic plcBasic plc
Basic plc
 
Basic PLC.ppt
Basic PLC.pptBasic PLC.ppt
Basic PLC.ppt
 
plc-basics.pptx
plc-basics.pptxplc-basics.pptx
plc-basics.pptx
 
Plc basics
Plc   basicsPlc   basics
Plc basics
 
Plc 7 my saminar plc
Plc 7  my saminar plcPlc 7  my saminar plc
Plc 7 my saminar plc
 
manuales y guías PLC siemens Simatic S7
manuales y guías  PLC siemens Simatic S7manuales y guías  PLC siemens Simatic S7
manuales y guías PLC siemens Simatic S7
 
Basic Control System unit5
Basic Control System unit5Basic Control System unit5
Basic Control System unit5
 
Programming logic controllers (plc)
Programming  logic controllers (plc)Programming  logic controllers (plc)
Programming logic controllers (plc)
 
Programmable Logic Controller Training Day 1 to 3.pptx
Programmable Logic Controller  Training Day 1 to 3.pptxProgrammable Logic Controller  Training Day 1 to 3.pptx
Programmable Logic Controller Training Day 1 to 3.pptx
 
Plc on cnc
Plc on cncPlc on cnc
Plc on cnc
 
Unit 5 Use of PLC.pptx
Unit 5 Use of PLC.pptxUnit 5 Use of PLC.pptx
Unit 5 Use of PLC.pptx
 
Chapter 4 plc programing(1) by m
Chapter 4 plc programing(1) by mChapter 4 plc programing(1) by m
Chapter 4 plc programing(1) by m
 

Recently uploaded

Meghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media ComponentMeghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media ComponentInMediaRes1
 
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...M56BOOKSTORE PRODUCT/SERVICE
 
Capitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitolTechU
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
internship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerinternship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerunnathinaik
 
CELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxCELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxJiesonDelaCerna
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Celine George
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxiammrhaywood
 
Final demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxFinal demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxAvyJaneVismanos
 
भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,Virag Sontakke
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
 
Painted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaPainted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaVirag Sontakke
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersSabitha Banu
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsanshu789521
 

Recently uploaded (20)

Meghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media ComponentMeghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media Component
 
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
 
Capitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptx
 
9953330565 Low Rate Call Girls In Rohini Delhi NCR
9953330565 Low Rate Call Girls In Rohini  Delhi NCR9953330565 Low Rate Call Girls In Rohini  Delhi NCR
9953330565 Low Rate Call Girls In Rohini Delhi NCR
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
internship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerinternship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developer
 
CELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxCELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptx
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
 
Final demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxFinal demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptx
 
भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
 
Painted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaPainted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of India
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginners
 
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha elections
 

PLCThis pdf is for those who want to learn plc from 0 level , very helpful.pdf

  • 1. Rev No :00 Released Date :01/02/2021 CP15 SEMESTER 4 PROGRAMMABLE LOGIC CONTROLLER - 1
  • 2. ` Go to Table of Content NTTF_DIPLOMA IN MECHATRONICS ENGINEERING & SMART FACTORY [CP15]_SEMESTER 4_PROGRAMMABLE LOGIC CONTROLLER -1_MASTER FILE 1 Table of Content Contents 1.PLC BASICS......................................................................................................................................................2 1.1 Introduction to PLC.............................................................................................................................2 1.2 Overall Look Inside PLC ........................................................................................................................3 2.BASIC PLC PROGRAMMING..............................................................................................................................8 2.1 General PLC Programming Procedure and I/O Devices .......................................................................8 2.2 ON/OFF Inputs and ON/OFF outputs .................................................................................................11 2.3 Relation between Digital gates and Coil/Contact logic......................................................................12 2.4 Creating Ladder Diagrams for Process Control .................................................................................19 3.BASIC FUNCTIONS .........................................................................................................................................22 3.1 Registers Basics .................................................................................................................................22 3.2 Timer Functions..................................................................................................................................25 3.3 Counter Functions ..............................................................................................................................27 4.INTERMEDIATE FUNCTIONS ...........................................................................................................................30 4.1 Arithmetic Functions..........................................................................................................................30 4.2 Number Comparison Functions..........................................................................................................33 4.3 Number Conversion Functions...........................................................................................................41 5.DATA HANDLING FUNCTIONS ........................................................................................................................43 5.1 PLC Skip & Master Control Relay Functions......................................................................................43 5.2 JMP Instruction..................................................................................................................................45 5.3 Data Movement Instruction...............................................................................................................46 5.4 Other Functions..................................................................................................................................52 6.FUNCTIONWORKING WITH BITS.....................................................................................................................55 6.1 Digital Bit Functions & Their Applications..........................................................................................55 6.2 Sequencer Functions .........................................................................................................................61
  • 3. ` Go to Table of Content NTTF_DIPLOMA IN MECHATRONICS ENGINEERING & SMART FACTORY [CP15]_SEMESTER 4_PROGRAMMABLE LOGIC CONTROLLER -1_MASTER FILE 2 1. PLC BASICS 1.1 Introduction to PLC A PLC is user friendly, microprocessor -based specialized computer that carries out control functions of many types and levels of complexity. Its purpose is to monitor crucial process parameters and adjust process operations accordingly.A programmable logic controller (PLC) is a solid state device designed to perform logic functions previously accomplished by electro mechanical relays. The design of a PLC is similar to that of a computer. The PLC is an assembly of solid state digital logic elements designed to make logical decisions and provide outputs. Programmable logic controllers are used for the control and operation of manufacturing process equipment and machinery. They are capable of storing instructions, suchas sequencing , timing, counting, arithmetic, data manipulation, and communication,to control industrial machines and processes. PLC PRODUCT APPLICATION RANGES Figure graphically illustrates programmable controller product ranges. This chart is not definitive, but for practical purposes, it is valid. The PLC market can be segmented into five groups: 1. Micro PLCs 2. Small PLCs 3. Medium PLCs 4. Large PLCs 5. Very large PLCs
  • 4. ` Go to Table of Content NTTF_DIPLOMA IN MECHATRONICS ENGINEERING & SMART FACTORY [CP15]_SEMESTER 4_PROGRAMMABLE LOGIC CONTROLLER -1_MASTER FILE 3 ADVANTAGES OF PLC ▪ Implementing changes and correcting errors ▪ Large quantity of Contacts can bee liminated ▪ Lower Cost ▪ Pilot running ▪ Visual Observation ▪ Speed of Operation ▪ Ordering control system ▪ Documentation ▪ Security ▪ Flexibility DISADVANTAGES OF PLC ▪ Newer Technology ▪ Fixed Program Application ▪ Environmental Consideration ▪ Fail – Safe Operation ▪ Fixed Circuit Operation 1.2 Overall Look Inside PLC Here the overall look inside the plc is given with the block diagram. It contains Input module, CPU, Microprocessor, Memory, Output module, Programmer/Monitor, Power Supply and Rack & Chassis. Below the following modules are explained.
  • 5. ` Go to Table of Content NTTF_DIPLOMA IN MECHATRONICS ENGINEERING & SMART FACTORY [CP15]_SEMESTER 4_PROGRAMMABLE LOGIC CONTROLLER -1_MASTER FILE 4 CENTRAL PROCESSING UNIT The brain of the system which is having three parts 1. Microprocessor : the computer center that carries out mathematics and logical operations. 2. Memory : The area of the CPU in which the data and information are Stored and retrieved. Holds the system software and user program. 3. Power supply : The electrical supply that converts AC to various operational DC voltages. In the process the powersupply filters and regulates the DC voltages to ensure proper computer operations. PROGRAMMER/MONITOR(PM) ▪ Used to communicate with circuit of PLC. ▪ Can be handheld terminals, Industrial terminals and personal computer. INPUT MODULE Input modules have terminals in to which outside process electrical signals generated by sense or transducer are entered. The output module has terminals to which o/p signals are sent to actuate relays, solenoids, various solid state switching devices, motors and displays. An electronic system for connecting I/O modules to remote locations can be added. The actual operating process under plc control can be thousands of feet from cpu and its I/O modules.
  • 6. ` Go to Table of Content NTTF_DIPLOMA IN MECHATRONICS ENGINEERING & SMART FACTORY [CP15]_SEMESTER 4_PROGRAMMABLE LOGIC CONTROLLER -1_MASTER FILE 5 PLC OUTPUT MODULE The output module operates in the opposite manner from the input module. A dc signal from the CPU is converted through each module section to a usable output voltage either AC or DC.The CPU signal goes through an isolation stage.Any erratic voltage surge from output devise does not get back to CPU and cause damage. The isolator out is then transmitted to switching accomplished by turning on a triac.The output of a module section may be through are layora dc or ac output. RACK AND CHASIS: The racks on which plc parts are mounted and the enclosures on which the CPU, PM and modules are manual. PRINCIPLES OF OPERATION A programmable controller, as illustrated in Figure, consists of two basic sections: • The central processing unit • The input/output interface system The central processing unit (CPU) governs all PLC activities. The following three components, shown in Figure, form the CPU: • The processor • The memory system • The system power supply
  • 7. ` Go to Table of Content NTTF_DIPLOMA IN MECHATRONICS ENGINEERING & SMART FACTORY [CP15]_SEMESTER 4_PROGRAMMABLE LOGIC CONTROLLER -1_MASTER FILE 6 The operation of a programmable controller is relatively simple. The input/output(I/O) system is physically connected to the field devices that are encountered in the machine or that are used in the control of a process. These field devices may bed is creteoranalog input/output devices, suchas limit switches, pressuretransducers, pushbuttons, motorstarters, solenoids, etc. The I/O interfaces provide the connection between the CPU and the information providers(inputs) and controllable devices(outputs). During its operation, the CPU completes three processes: 1. itreads, or accepts, the input data from the field devices via the input interfaces, 2. it executes, orperforms, the control program stored in the memory system, and 3. it writes, orupdates, the output devices via the output interfaces. This process of sequentially reading the inputs, executing the program in memory, and updating the outputs is known as scanning. Figure illustrates a graphicrepresentationofascan. The input/output system forms the interface by which field devices are connected to the controller. The main purpose of the interface is to condition the various signals received from or sent to external field devices. Incoming signals from sensors (e.g.,push buttons, limit switches, analog sensors, select or switches, and thumb wheel switches) are wired to terminals on the input inter faces. Devices that will be controlled, like motor starters, solenoid valves, pilotlights, and position valves, are connected to the terminals of the output interfaces. The system power supply provides all the voltages required for the proper operation of the various central processing unit sections.
  • 8. ` Go to Table of Content NTTF_DIPLOMA IN MECHATRONICS ENGINEERING & SMART FACTORY [CP15]_SEMESTER 4_PROGRAMMABLE LOGIC CONTROLLER -1_MASTER FILE 7 Although not generally considered apart of the controller, the programming device, usually a personal computer or a manufacturer’s mini programmer unit is required to enter the control program in to memory. The programming device must be connected to the controller when entering or monitoring the control program.
  • 9. ` Go to Table of Content NTTF_DIPLOMA IN MECHATRONICS ENGINEERING & SMART FACTORY [CP15]_SEMESTER 4_PROGRAMMABLE LOGIC CONTROLLER -1_MASTER FILE 8 2. BASIC PLC PROGRAMMING 2.1 General PLC Programming Procedure and I/O Devices LADDER DIAGRAMS AND THE PLC The ladder diagram has and continues to be the traditional way of representing electrical sequences of operations.These diagrams represent the interconnection of field devices in such away that the activation or turning ON,of one device will turn ON another device according to a pre determined sequence of events.Figure illustrates a simple electrical ladder diagram. The original ladder diagrams were established to represent hardwired logic circuits used to control machines or equipment. Due to wide industry use,they became a standard way of communicating control information from the designers to the users of equipment.As programmable controllers were introduced, this type of circuit representation was also desirable because it was easy to use and interpret and was widely accepted in industry. Programmable controllers can implement all of the “old” ladder diagram conditions and much more.Their purpose is to perform these control operations in a more reliable manner at a lower cost. A PLC implements, in its CPU, all of the old hardwired interconnections using its software instructions is transparent to the engineer or programmer. Figure illustrates the PLC transformation of the simple diagram shown in Figure to a PLC format. Note that the “real” I/O field devices are connected to input and output interfaces, while the ladder program is implemented in a manner, similar to hardwiring, inside the programmable controller (i.e.,softwired inside the PLC’s CPU instead of hardwired in a panel). As previously mentioned, the CPU reads the status of inputs, energizes the corresponding circuit element According to the program, and controls areal output device via the output interfaces.
  • 10. ` Go to Table of Content NTTF_DIPLOMA IN MECHATRONICS ENGINEERING & SMART FACTORY [CP15]_SEMESTER 4_PROGRAMMABLE LOGIC CONTROLLER -1_MASTER FILE 9
  • 11. ` Go to Table of Content NTTF_DIPLOMA IN MECHATRONICS ENGINEERING & SMART FACTORY [CP15]_SEMESTER 4_PROGRAMMABLE LOGIC CONTROLLER -1_MASTER FILE 10 PROPER CONSTRUCTION OF PLC LADDER DIAGRAMS 1. A construct must always inserted in slot 1 in the upper left. 2. A coilmust be inserted at the end of the rung. 3. All the contacts must run horizontally. Novertical oriented contact sare allowed. 4. Number of contact permatrixis limited(3*4) 5. Only one output connected to a group of input. 6. Contacts must be nested properly 7. Flow must be from left to right. 8. Contact progression should be straight across.
  • 12. ` Go to Table of Content NTTF_DIPLOMA IN MECHATRONICS ENGINEERING & SMART FACTORY [CP15]_SEMESTER 4_PROGRAMMABLE LOGIC CONTROLLER -1_MASTER FILE 11 2.2 ON/OFF Inputs and ON/OFF outputs PLC INPUT INSTRUCTIONS The various types of inputs includes 1. NORMALLY OPEN CONTACT - When this contact closes the functions carries out some kind of actions. 2. NORMALLY CLOSED CONTACT - When this contact opens the functions carries out some kind of actions. 3. LATCH OR UNLATCH SYSTEM - Actuating the latch input turns the function on or closes it to change the state. The function then stays one veniflatch input is turned off. To turn the function off, an other input, unlatch, is turned on, which turns the function off. If unlatch is the turned off, the function remains off. 4. DIFFERENTIATING UP, OR RISING-EDGE ACTUATION - This involves turning the function on for one scan time at the leading edge of an input pattern. 5. DIFFERENTIATION DOWN,OR FALLING-EDGE ACTUATION - This involves turning the function on for one scan time at the trailing edge of a signal pattern. OUTPUTS: COILS, INDUCTORS, AND OTHERS Coils in an internal PLC program are related to output signals that are sent to external devices. An output is energized through the output module when its corresponding coil number is turned on in the PLC ladder diagram. Note that not all coils in the program have a corresponding output. Many coils are used for internal logic only. The output devices voltage and current Requirements must be matched for the output module values.
  • 13. ` Go to Table of Content NTTF_DIPLOMA IN MECHATRONICS ENGINEERING & SMART FACTORY [CP15]_SEMESTER 4_PROGRAMMABLE LOGIC CONTROLLER -1_MASTER FILE 12 2.3 Relation between Digital gates and Coil/Contact logic We discus digital logic gates from a PLC logic stand point, but we do not cover the details of their electronic internal workings or their electrical operation. All gates have one output. The outputs are either on(1) or off(0), depending on the logic status of their inputs, on/off. Gate on condition is typical when+5 volts DC comes from the outputter minals. Off is typically zero volts outputs.
  • 14. ` Go to Table of Content NTTF_DIPLOMA IN MECHATRONICS ENGINEERING & SMART FACTORY [CP15]_SEMESTER 4_PROGRAMMABLE LOGIC CONTROLLER -1_MASTER FILE 13 NOT Gates or Inverters The NOT gate always has one inputs. The output of a NOTgate is the inverse of the input. The NOT gate is sometimes called an inverter. The function of a NOT gateis simulated by the electric circuit displayed in Figure. When the switchis closed, the electric bulb is short circuited, and it turns off .When the switchis open, electric current flows through the light bulb, and the light bulb turns on. Like the NOT gate, the output is on when the input is off and viceversa. The input is inverted to generate an output. Figure displays the NOT logic gate symbol, its Boolean expression, and its truthtable. Figure displays that there are two different types of PLC ladder logic diagrams that perform the NOT function. ▪ In rung 0000, the XIO (examineif open) deviceis connected to the output. There fore, the XIO deviceis normally closed and output zero is ON. When you press push button #1(I:0/0), the output zero (pilotlight#1) is turned off. (Notice that addressI:0/0 references the port 0 on module 0.) ▪ In rung 0001, push button #2(I:0/1) is connected to internal coil bit B3:0/0. (Notice that addressI:0/1 references the port 1 on module 0.) ▪ In rung 0002, the internal contact bit B3:0/0 is inverted and connected to output one (pilotlight#2). When normally open inputI:0/1 is open, output one (O:0/1) is ON. Press input0/1 to close it, then output one will turn OFF.
  • 15. ` Go to Table of Content NTTF_DIPLOMA IN MECHATRONICS ENGINEERING & SMART FACTORY [CP15]_SEMESTER 4_PROGRAMMABLE LOGIC CONTROLLER -1_MASTER FILE 14 AND Gate The function of an AND gate is simulated in the electric circuit displayed in Figure. Notice that the lamp will be on only when both switches are closed. Figure displays a two-input AND logic gate symbol, its Boolean expression, and itstruthtable. In the truthtable, you can see that there is only one set of inputs that produces a logic high output. Figure displays a ladder logic diagram that performs the function of a two-input AND gate. When normally open inputs I:0/0 and I:0/1 are closed, output O:0/0 is energized. OR Gate The function of an OR gate is simulated in the electric circuit displayed in Figure. Notice that the lamp will be ON when one or both of the switches are closed. Figure displays a two-input OR logic gate symbol, its Boolean expression, and its truth table. The truth table shows a logic high output for all combinations of inputs except where both A and B are low. When either input A, B, or both are on, the output is on. Figure displays a ladder logic diagram that performs the function of a two-input OR gate. When either normally open (NO)inputs I:0/0,I:0/1, or both are closed, output O:0/0 is energized.
  • 16. ` Go to Table of Content NTTF_DIPLOMA IN MECHATRONICS ENGINEERING & SMART FACTORY [CP15]_SEMESTER 4_PROGRAMMABLE LOGIC CONTROLLER -1_MASTER FILE 15 NAND Gate The function of a NAND gate is simulated in the electric circuit displayed in Figure. Notice that the lamp will be off when both switches are closed. The NAND gate takes its name from NOT and AND. Its outputs are the inverse of the AND gate. Figure displays a two- input NAND logic gate symbol, its Boolean expression, and its truthtable. Notice that the NAND gate can be built by connecting an AND gate in series with a NOT gate. U sing the De- Morgan the orem, some times also called the Bubble method, you can convert a NAND gate to an OR gate with inverted inputs where (A·B)′=A′+B′. Figure displays that there are two different types of ladder logic diagrams that perform the NAND function. Both normally closed inputs I:0/0 and I:0/1 must bee nergized (opened) to turn off the output O:0/0.
  • 17. ` Go to Table of Content NTTF_DIPLOMA IN MECHATRONICS ENGINEERING & SMART FACTORY [CP15]_SEMESTER 4_PROGRAMMABLE LOGIC CONTROLLER -1_MASTER FILE 16
  • 18. ` Go to Table of Content NTTF_DIPLOMA IN MECHATRONICS ENGINEERING & SMART FACTORY [CP15]_SEMESTER 4_PROGRAMMABLE LOGIC CONTROLLER -1_MASTER FILE 17 NOR Gate The function of a NOR logic gate is simulated in the electric circuit displayed in Figure. Notice that the lamp will be ON when both switches are open. The NOR gate takes its name from NOT and OR. Its outputs are the inverse of the OR gate. Figure displays a two-input NOR logic gate symbol, its Boolean expression, and its truthtable. Notice the NOR gate can be built by connecting an OR gate in series with a NOT gate. Using the De-Morgan the orem, youcan convert a NOR gate to an AND gate with inverted inputs where (A+B)′=A′·B′. Figure displays that there are two different types of ladder logic diagrams that perform the NOR gate function. Both normally closed inputs I:0/0 and I:0/1 must be deenergized (remain closed) to turn the output O:0/0.
  • 19. ` Go to Table of Content NTTF_DIPLOMA IN MECHATRONICS ENGINEERING & SMART FACTORY [CP15]_SEMESTER 4_PROGRAMMABLE LOGIC CONTROLLER -1_MASTER FILE 18 XOR (Exclusive OR) Gate The function of an XOR (exclusiveOR) gate is simulated in the electric circuit displayed in Figure. Notice that the lamp will be on if one switch is open while the other switch is closed. Figure displays an XOR logic gate symbol, its Boolean expression, and its truth table. Looking at the truth table, you can see that either inputs AorB (but not both) must be high to produce a high out put. One input must be ON and the other one OFF in Order to have the output ON. Figure displays a ladder logic diagram that performs the function of an XOR gate. When I:0/0ison, I:0/1 must be off and viceversa in order to turn on output O:0/0. When either Push button #1orPush button #2is pressed, the output is ON. When both push buttons are pressed, output is OFF.
  • 20. ` Go to Table of Content NTTF_DIPLOMA IN MECHATRONICS ENGINEERING & SMART FACTORY [CP15]_SEMESTER 4_PROGRAMMABLE LOGIC CONTROLLER -1_MASTER FILE 19 2.4 Creating Ladder Diagrams for Process Control Ladder diagrams are most commonly used diagrams for non electronic control circuit. They are sometimes called elementary diagrams. Sometimes they are considered as a sub type of schematic diagrams. The term ladder diagram isused in this book. Why these diagrams are called ladder diagrams. They look like a ladder in away. Two types of ladder diagrams are used in control systems: The control ladder diagram and Power ladder diagram. This section concentrates on control ladder diagrams with only a fundamental explanation of power ladder diagram. LARGE-PROCESS LADDER DIAGRAM CONSTRUCTION Steps in planning a program ▪ Define the process to be controlled. ▪ Make a sketch of the process operation. ▪ Create a written step sequence listing for the process. ▪ Add sensors on the sketch as needed to carry out the control sequence. ▪ Add manual controls as needed for process set up or operational checking. ▪ Consider the safety of the operating personal and make additions and adjustments as needed. ▪ Add master stop switches as required for safe shutdown. ▪ Create the ladder logic diagram that will be used as basis for the PLC program. ▪ Consider the “what if’s”where the process sequence may go as tray. Define the problem We wish to setup a system for spray painting parts. A part is to be placed on a mandrel. (A mandrel is a shaft or bar who seen disinserted into a workpiece to hold it during an operation). When the part is in place, two push buttons are pressed and them and relrises. After the part rises to the top and is in the hood, it is to have spray paint applied for a period of 6 seconds. At the end of the 6 seconds, the mandrel returns to the original position. The painted partis then removed from the mandrel by hand.(We as sume for our illustration that the part driesvery quickly.) Make a sketch of the process operation.
  • 21. ` Go to Table of Content NTTF_DIPLOMA IN MECHATRONICS ENGINEERING & SMART FACTORY [CP15]_SEMESTER 4_PROGRAMMABLE LOGIC CONTROLLER -1_MASTER FILE 20 SKETCH OF THE SPRAY PAINT SYSTEM Add sensors on the sketch as needed to carry out the control sequence. Sensor, Enclosures, and Push button locations
  • 22. ` Go to Table of Content NTTF_DIPLOMA IN MECHATRONICS ENGINEERING & SMART FACTORY [CP15]_SEMESTER 4_PROGRAMMABLE LOGIC CONTROLLER -1_MASTER FILE 21 Ladder Diagram
  • 23. ` Go to Table of Content NTTF_DIPLOMA IN MECHATRONICS ENGINEERING & SMART FACTORY [CP15]_SEMESTER 4_PROGRAMMABLE LOGIC CONTROLLER -1_MASTER FILE 22 3. BASIC FUNCTIONS 3.1 Registers Basics HOLDING REGISTERS ▪ A Holding register, or working register( HR)”holds”the contents of a calculation, arithmeticor logic. ▪ Conceptually, it is in the “middle”of the CPU. ▪ The holding register is not directly accessible to inputs or outputs, input and output register (single or group) interface the holding register contents to the outside world. ▪ Signal data from as pecific input device is first“deposited”, in the form of 0 sand 1s, in an input register. It may then be manipulated by the micro process or and the result sent to a holding register. ▪ Conversely, before the contents of the holding register can affect the output device, they are transferred to an output register. The output register’s 0sand1s“drive” output interface devices such as opto- isolators.
  • 24. ` Go to Table of Content NTTF_DIPLOMA IN MECHATRONICS ENGINEERING & SMART FACTORY [CP15]_SEMESTER 4_PROGRAMMABLE LOGIC CONTROLLER -1_MASTER FILE 23 INPUT REGISTERS : SINGLE AND GROUP ▪ It is readily accessible to the input module’s terminals or ports. ▪ The number of input registers in a PLC is normally one-tenth that of holding registers. ▪ The input group register(IG) is some what like the input register. ▪ It differs in that each one of the individual 16 bits is directly accessible from one input port. ▪ One input group register receives data from 16nconsecutive input ports (terminals). ▪ The advantage of the IG system is that only one register is required to service 16 inputs.
  • 25. ` Go to Table of Content NTTF_DIPLOMA IN MECHATRONICS ENGINEERING & SMART FACTORY [CP15]_SEMESTER 4_PROGRAMMABLE LOGIC CONTROLLER -1_MASTER FILE 24 OUTPUT REGISTERS : SINGLE AND GROUP ▪ The output register has the same basic characteristics as the holding register. ▪ The output register differs from the holding register,however,in that it is readily accessible to the output module’s terminals and ports the number of output registers is normally equal to the number of the input registers. ▪ One OG register can control 16 outputs. ▪ If a 1 is in a bit position, it will turn that bit’s corresponding output on.
  • 26. ` Go to Table of Content NTTF_DIPLOMA IN MECHATRONICS ENGINEERING & SMART FACTORY [CP15]_SEMESTER 4_PROGRAMMABLE LOGIC CONTROLLER -1_MASTER FILE 25 3.2 Timer Functions PLC provides several types of timer instructions . However, PLC manufacturers may provide different definitions for each type of timer function offered. Single input timer - A single input timer is also known as no retentive timer. Energizing IN001 causes the timer to run for 14 seconds. At the end of 14 seconds output goes on. When the input is re energized, the timer reset to zero. If the input is turned off during the timing interval the timer resets to zero. Multiple input Timer - It includes RUN and ENABLE/RESET line. The ENABLE/RESET line allows the timer to run when energized. When this line reenergized the timer reset stozero. The RUN line causes the timer to run when ENABLE line is energized. When enabled the timer run along as the run input is energized. When runline is reenergized the timer stops running where it is but does not reset to zero. Suppose that IN002 is closed and IN001 is turned on. After 6 sec,IN001is opened. The timer retains a count of 6. Timing has not reached the preset value of 14 seconds, and the timer output is still off. The timer does not reset until the IN002 is opened. Suppose that some times later the IN002 is reclosed. After 8 more seconds of IN001 being closed, the timer coil will energize. Since 6+8=14. 3 input timer is a special case when ENABLE and RESET are separate input rather than a common single input. This configuration can be used for special arrangement.
  • 27. ` Go to Table of Content NTTF_DIPLOMA IN MECHATRONICS ENGINEERING & SMART FACTORY [CP15]_SEMESTER 4_PROGRAMMABLE LOGIC CONTROLLER -1_MASTER FILE 26 Exercise using Timer: 1. For a grinding operation of metal part, the coolant flow on a metal part must be on for an interval before the Grinding process starts. When the process circuitis turned on the coolant motor is turned on. 8 seconds later the grinding process starts. 2. A motor and its lubrication pump are both running.Lubrication for main motor bearing is required during motor coast down. After the main motor shutdown, the lubricating pump remains on for a time corresponding to motor coast down time.
  • 28. ` Go to Table of Content NTTF_DIPLOMA IN MECHATRONICS ENGINEERING & SMART FACTORY [CP15]_SEMESTER 4_PROGRAMMABLE LOGIC CONTROLLER -1_MASTER FILE 27 3.3 Counter Functions PLC counters have programming formats which are similar to timer formats. One counter input furnishes count pulse swhich the plc function analyze. Another input usually carries out ENABLE/RESET. Most plc contains both up and down counter swhich functions similarly. Some PLC also includes a combination UP/DOWN counter in one function. Others contain special high speed counters for high speed counting. And increments by one each time IN001 is pulsed on. When the preset value is reached, the output CR17 goes on. Ask the count goes on beyond the preset value, the output stays on. Opening IN002 at any time resets the counter to 0. The down counter operates in a similar manner. The count starts at the preset value and decrements by one each time the input IN001 goes on. When the count reaches zero, the output goes on. In some applications, you may wish to stop the count for a time without it resetting to zero and start counting again later where the count left off. This is accomplished byu sing counter with separateenable and reset. UP/DOWN COUNTER There are three input one for up count, one for down count and an ENABLE/RESET input. The up/down counter is used as a single function when the process uses an up and down counter in tandem.
  • 29. ` Go to Table of Content NTTF_DIPLOMA IN MECHATRONICS ENGINEERING & SMART FACTORY [CP15]_SEMESTER 4_PROGRAMMABLE LOGIC CONTROLLER -1_MASTER FILE 28 The basic plc counter function, which is same for UP and DOWN counters except for the designation for UC/DC. The count a twhich the counter output is to goon is entered into the preset space. The count can be a constant or canbe are gister. For the up counter, the count starts at 0 and increments by one each time IN001 is pulse don. When the preset value is reached, the output CR17 goeson. Ask the count goes on beyond the preset value, the output stay son. Opening IN002 at any time resets the counter to 0. The down counter operates in a similar manner. The count starts at the preset value and decrements byone each time the input IN001 goeson. When the count reaches zero, the output goeson.
  • 30. ` Go to Table of Content NTTF_DIPLOMA IN MECHATRONICS ENGINEERING & SMART FACTORY [CP15]_SEMESTER 4_PROGRAMMABLE LOGIC CONTROLLER -1_MASTER FILE 29 In some applications, you may wish to stop the count for a time without it resetting to zero and start counting again later where the count left off. This is accomplished by using counter with separate enable and reset. QUESTIONS. An indicator to go on when six of part C and eight of part D are on the conveyor. IN002 and IN003 are proximity devices that senses part C and part D respectively.
  • 31. ` Go to Table of Content NTTF_DIPLOMA IN MECHATRONICS ENGINEERING & SMART FACTORY [CP15]_SEMESTER 4_PROGRAMMABLE LOGIC CONTROLLER -1_MASTER FILE 30 4. INTERMEDIATE FUNCTIONS 4.1 Arithmetic Functions PLC ADDITION The addition will not take place continuously just because Enable is on. It adds only when the enable line changes from off to on. When enabled, the numerical value in operand 2 register is added to the numerical value in operand 1 register. The resulting value then appears in the specified destination register. The coil only comes on when the resulting number exceeds the register counting capability (Overflow). Constants, HR, or OR can be used as operand by consult the manufacture's manual of PLC. 462+327=789 no over flow, coil off 9642+3471=13113 overflow, coil on. PLC SUBTRACTION For subtraction operand 2 is subtracted from operand 1. The result is found in destination register. When the result is+ve the coil is off and the result is found in destination register when the result is–ve the coil is ON and the resulting negative number value is found in destination register. 8642-6218=2424,+ve, coil off 4621-7307= 2686, -ve, coil on.
  • 32. ` Go to Table of Content NTTF_DIPLOMA IN MECHATRONICS ENGINEERING & SMART FACTORY [CP15]_SEMESTER 4_PROGRAMMABLE LOGIC CONTROLLER -1_MASTER FILE 31 PLC REPETITIVE CLOCK A repetitive on-off enable is needed for continuous operation. A coil turns it self off and on a tavery fast rate about two times the scan time rate. If this is used as enable, the operation of an arithmetic function is essentially continuous. PLC MULTIPLICATION The destination is two register wide by necessity 0034*0086= 2064 only one reg. required. 6453*8933= 57, 644, 649tworeg. required. The coil comes on when the multiplication is completed. There is normally nosquaring function in a PLC. Squaring is done by putting the number to be squared into both operand 1 and 2 of a MULTIPLY function.
  • 33. ` Go to Table of Content NTTF_DIPLOMA IN MECHATRONICS ENGINEERING & SMART FACTORY [CP15]_SEMESTER 4_PROGRAMMABLE LOGIC CONTROLLER -1_MASTER FILE 32 PLC DIVISION Operand 1, the dividend is divided by operand 2 the divisor. The numerical result of division appears in destination register when the function is enabled. The first destination register is the numerical result of division. The second register value is the remainder in numerical form. PLC SQUARE ROOT The number whose square rootis to bedetermined is placed in the source. The source input number is contained in two registers. There is usually no remainder register.
  • 34. ` Go to Table of Content NTTF_DIPLOMA IN MECHATRONICS ENGINEERING & SMART FACTORY [CP15]_SEMESTER 4_PROGRAMMABLE LOGIC CONTROLLER -1_MASTER FILE 33 PLC TRIGNOMETRIC& LOG FUNCTIONS General block diagram The source register value is an alyzed appropriately and the calculated value appears in destination register.The angles involved in trigonometric function are normally stated in radians. Some PLCs have an antilog function also. 4.2 Number Comparison Functions Many PLC’s have only two compare functions. Equal and greater than equalto. Toper for many one of the other four function combinations of basic two comparison function are used. Some PLC’s have all six individual functions. Which makes programming easier. TYPICAL PLC COMPARE FUNCTIONS The two numbers being compared are operand 1 and 2. Operand scan Be a constant or a register. When the function is enabled by the input contact, the comparison is made .If the comparison is true, the o/p goes on. If the comparison is not true,the o/p goes off,or stays off.
  • 35. ` Go to Table of Content NTTF_DIPLOMA IN MECHATRONICS ENGINEERING & SMART FACTORY [CP15]_SEMESTER 4_PROGRAMMABLE LOGIC CONTROLLER -1_MASTER FILE 34 EQUAL TO COMPARE FUNCTIONS
  • 36. ` Go to Table of Content NTTF_DIPLOMA IN MECHATRONICS ENGINEERING & SMART FACTORY [CP15]_SEMESTER 4_PROGRAMMABLE LOGIC CONTROLLER -1_MASTER FILE 35 NOT-EQUAL-TO COMPARE FUNCTIONS (Derived) GREATER THAN OR EQUAL TO COMPARE FUNCTION
  • 37. ` Go to Table of Content NTTF_DIPLOMA IN MECHATRONICS ENGINEERING & SMART FACTORY [CP15]_SEMESTER 4_PROGRAMMABLE LOGIC CONTROLLER -1_MASTER FILE 36 NOT-EQUAL-TO COMPARE FUNCTIONS(Basic) LESS THAN COMPARE FUNCTIONS
  • 38. ` Go to Table of Content NTTF_DIPLOMA IN MECHATRONICS ENGINEERING & SMART FACTORY [CP15]_SEMESTER 4_PROGRAMMABLE LOGIC CONTROLLER -1_MASTER FILE 37 LESS THAN COMPARE FUNCTIONS (Derived) GREATER THAN COMPARE FUNCTIONS
  • 39. ` Go to Table of Content NTTF_DIPLOMA IN MECHATRONICS ENGINEERING & SMART FACTORY [CP15]_SEMESTER 4_PROGRAMMABLE LOGIC CONTROLLER -1_MASTER FILE 38 LESS THAN OR EQUAL TO FUNCTION
  • 40. ` Go to Table of Content NTTF_DIPLOMA IN MECHATRONICS ENGINEERING & SMART FACTORY [CP15]_SEMESTER 4_PROGRAMMABLE LOGIC CONTROLLER -1_MASTER FILE 39 When the function is enabled by the input contact, the comparison is made. If the comparison is true the output goes on. If the comparison is not true, the output goes off or stays off. The comparison in some PLCs is made continuously as long as the enable is on which makes the comparison on eachscan. Insome PLC the comparison is made only at the time the enable goeson. To make another numerical comparison the input must go OFF and then ON. The pattern soft wo basic COMPARE functions are normally similar.
  • 41. ` Go to Table of Content NTTF_DIPLOMA IN MECHATRONICS ENGINEERING & SMART FACTORY [CP15]_SEMESTER 4_PROGRAMMABLE LOGIC CONTROLLER -1_MASTER FILE 40 Advance PLC comparison function Limit Test - There are three inputs: the varying value and the two limits. It determines if the value is between the high and low limits. The Masked Comparison The Function compares bits in two register selectively. The mask is used to denote which bits to compare and which not to compare. Where a mask bit is 1, the comparison is made. When mask bit is 0, no comparison is made. When enabled, the function goeson(true) if all un masked bit spairs match. If one or more pair do not match, the function remains off(false).
  • 42. ` Go to Table of Content NTTF_DIPLOMA IN MECHATRONICS ENGINEERING & SMART FACTORY [CP15]_SEMESTER 4_PROGRAMMABLE LOGIC CONTROLLER -1_MASTER FILE 41 4.3 Number Conversion Functions Figure shows typical layout of BCD to binary conversion function, which is usually used for input data conversions. It converts BCD value found in source register to destination register. For PLC CPU use. When the function input line is energized, the values the sources register values are converted from BCD to binary. The resulting number is put on to the destination register. Typically for this function, the coin comes on only if the binary value exceeds 9999 in decimal during operation.
  • 43. ` Go to Table of Content NTTF_DIPLOMA IN MECHATRONICS ENGINEERING & SMART FACTORY [CP15]_SEMESTER 4_PROGRAMMABLE LOGIC CONTROLLER -1_MASTER FILE 42 BCD TO BINARY CONVERSION BINARY TO BCD CONVERSION
  • 44. ` Go to Table of Content NTTF_DIPLOMA IN MECHATRONICS ENGINEERING & SMART FACTORY [CP15]_SEMESTER 4_PROGRAMMABLE LOGIC CONTROLLER -1_MASTER FILE 43 5. DATA HANDLING FUNCTIONS 5.1 PLC Skip & Master Control Relay Functions In addition to programming a coil number in the usual manner, the number of lines to be skipped is also specified and programmed. SKIP Function PLC Operation When the SKIP function(setat3) is turned on, the first two lines will function as usual. However, the next three lines, 4th rough 6, will stay on or off in their previous state. With SKIP on, changing the input on-off status feeding the coils on lines 4th rough 6 will have no effect on output coils 4 through 6.Coil on lines 4th rough 6 will retain their previous states. Line7 and 8 will continue to operate normally, unaffected by the SKIP function operation.
  • 45. ` Go to Table of Content NTTF_DIPLOMA IN MECHATRONICS ENGINEERING & SMART FACTORY [CP15]_SEMESTER 4_PROGRAMMABLE LOGIC CONTROLLER -1_MASTER FILE 44 MASTER CONTROL RELAY FUNCTION AND APPLICATIONS When its enable line is energized, itturnson. When MCR is off, the number of following ladder diagram lines specified are turned off. When MCR is ON, the other seven lines operate normally. When MCR is off the next three lines, 4th rough 6 are turned off. With MCR off there is no otherway to turn on coils 4th rough 6 by energizing their enable lines. When MCR is turned on the ladder operates in normal manner. MCR FUNCTION PLC OPERATION
  • 46. ` Go to Table of Content NTTF_DIPLOMA IN MECHATRONICS ENGINEERING & SMART FACTORY [CP15]_SEMESTER 4_PROGRAMMABLE LOGIC CONTROLLER -1_MASTER FILE 45 5.2 JMP Instruction Jump is a command that causes the sequence to goto , or branch to, a specified poin to ther than the next line in the program sequence. Two types • Jump with non return • Jump with return Jump with nonreturn - Jump with non return is similar to the skip function in that it leaps over a certain portion of the main program when called up on to do so.
  • 47. ` Go to Table of Content NTTF_DIPLOMA IN MECHATRONICS ENGINEERING & SMART FACTORY [CP15]_SEMESTER 4_PROGRAMMABLE LOGIC CONTROLLER -1_MASTER FILE 46 Jump with return - Jump with return instruction leaps to a subroutine when activated. It then returns from the subroutine to them a in program. 5.3 Data Movement Instruction There are three types of data moving functions 1. The basic MOVE function takes aword, byte, or group bit pattern from one place and moves it to another. Some PLC system uses a GET/PUT format instead of MOVE. 2.The second type of plc data move involves moving groups of data from two or more consecutive register to two or more consecutive register. This second type is usually designated as BLOCK MOVE in plc. Some plc function uses file to file in stead of block move. 3.The third type in volves two types. One types equentially moves data from designated group register into a single register. This is called a TABLE TO REGISTER move. Some plc format calls this FILE TO WORD. The other type takes the value from a single register and moves its value sequentially to a portion of a table. This is called a REGISTER TO TABLE or WORD TO FILE. When the function is turned on through the enable circuit, the bit pattern from the specified source register is duplicated in the specified destination register. The source register is unchanged. The function coil goes on when the MOVE function is completed. The coil operation can be used to inter lock MOVE functions when there is more than one MOVE function in program. Inter locking prevent senergizing two or more contradictory moves when only one is desired. For example, two moves to the same register cannot take place at the same time.
  • 48. ` Go to Table of Content NTTF_DIPLOMA IN MECHATRONICS ENGINEERING & SMART FACTORY [CP15]_SEMESTER 4_PROGRAMMABLE LOGIC CONTROLLER -1_MASTER FILE 47 BASIC MOVE FUNCTION BLOCK FORMAT When the function is enabled, the bit pattern from specified register is duplicated in the specified destination register. The source register is unchanged. The coil goes on when move function is completed. The coil operation can be used to inter lock MOVE functions when there is more than one MOVE function in the program. Inter locking prevents two or more contradictory moves when only one is desired. Eg:- Two moves to the same register cannot take place at the same time. Move Example MOVE-ADDITION SYSTEM The two numbers to be added are entered in input registers. The data must be transfer red to holding registers be fore addition can take place. After addition is made, theresultislocatedinholdingregister.Theoutputofthe addition is required to appear in an output register.
  • 49. ` Go to Table of Content NTTF_DIPLOMA IN MECHATRONICS ENGINEERING & SMART FACTORY [CP15]_SEMESTER 4_PROGRAMMABLE LOGIC CONTROLLER -1_MASTER FILE 48 MOVE ADDITION PROGRAM
  • 50. ` Go to Table of Content NTTF_DIPLOMA IN MECHATRONICS ENGINEERING & SMART FACTORY [CP15]_SEMESTER 4_PROGRAMMABLE LOGIC CONTROLLER -1_MASTER FILE 49 BLOCK TRANSFER(BT) FUNCTION Some PLC’s call this TABLE-TO-TABLE Function. In the functional block, specify the number of registers to be moved. Also specify the last register of the input sequence from which the data comes. The output coil comes on when the transfer of all registers is complete.
  • 51. ` Go to Table of Content NTTF_DIPLOMA IN MECHATRONICS ENGINEERING & SMART FACTORY [CP15]_SEMESTER 4_PROGRAMMABLE LOGIC CONTROLLER -1_MASTER FILE 50 TABLE –TO- REGISTER(TR) MOVE SYSTEM TR function moves data sequentially from a specified portion of a large listing of data to a single register. The TR function is programmed for table length, which is the number of registers to besequentially inputted. The second line in the TR function is the point at which the table transfer operation is to end. The pointer is used to point to the register being moved at any given moment. The function is enabled when the lower line is on. The middle line resets to the first register. Whenever the step line is turned ON, the function transfers data and moves down one register. To step again the top line must be turned off and back on.A timer can be used to do the stepping. A timer contact would be used as the step contact for the function. TR function moves data sequentially from as pecified portion of a large listing of data to a single register. The TR function is programmed for table length, which is the number of registers to be sequentially inputted. The second line in the TR function is the point at which the table transfer operation is to end. The pointer is used to point to the register being moved at any given moment.
  • 52. ` Go to Table of Content NTTF_DIPLOMA IN MECHATRONICS ENGINEERING & SMART FACTORY [CP15]_SEMESTER 4_PROGRAMMABLE LOGIC CONTROLLER -1_MASTER FILE 51 REGISTER-TO– TABLE MOVE SYSTEM REGISTER-TO– TABLE MOVE SYSTEM It moves data from a single register sequentially in to a specified number of consecutive registers.Table length denote show many destination registers are to beused. The pointer in the RT function operates similarly to pointer in TR function. The source specifies the one register from which the data is to come.
  • 53. ` Go to Table of Content NTTF_DIPLOMA IN MECHATRONICS ENGINEERING & SMART FACTORY [CP15]_SEMESTER 4_PROGRAMMABLE LOGIC CONTROLLER -1_MASTER FILE 52 5.4 Other Functions STACKING FUNCTION–FIFO&LIFO PLC FIFO FUNCTON It retrieves data in the order stored. It is found in most PLCs. It consists of two subfunctions. 1. FIFO Load (FFL) or FIN– to put data in to a stack 2. FIFO Unload (FFU) or FOUT – to take data out of stack. Once the stackis full, the unload function must precede the input function. Other wise the data will not bein serted. PLC LIFO FUNCTION It retrieves data in the reverse order stored.
  • 54. ` Go to Table of Content NTTF_DIPLOMA IN MECHATRONICS ENGINEERING & SMART FACTORY [CP15]_SEMESTER 4_PROGRAMMABLE LOGIC CONTROLLER -1_MASTER FILE 53 PLC FIFO FUNCTON FILE ARITHMETIC AND LOGIC (FAL) FUNCTION It is useful when a complex computation is performed on a series of data values. Instead of performing a COMPUTE (CPT) function repetitively for each group of data, program only once for FAL function. Specify the number of times the calculation process should run and where the calculation process should start in a stack of data values. FAL function is a multiple, sequential CPT function which saves programming time and program space. ONE SHOT(ONS) FUNCTION It is used with a push button input which is subjected to contact bounce. If there is a contact bounce,there are multiple input spikes of voltage. The PLC can misinterpret the signal. When the input goes from false to true, ONS turns the rung on for scan. The ONS output turns on for sub sequent scan suntil the input goes from false to true. TheONS output going from true to false has no effect on the output, whiche liminates the effect of spikes from bounce.
  • 55. ` Go to Table of Content NTTF_DIPLOMA IN MECHATRONICS ENGINEERING & SMART FACTORY [CP15]_SEMESTER 4_PROGRAMMABLE LOGIC CONTROLLER -1_MASTER FILE 54 CLEAR (CLR) FUNCTION It sets all the bit sin are gister or word to zero.It is useful to zero out a system be fore starting or restarting a process. SWEEP FUNCTION ▪ It is used to scan through a program or portion of a program at fixed intervals. ▪ The fixed intervals need to be longer than the scan time to be operational.
  • 56. ` Go to Table of Content NTTF_DIPLOMA IN MECHATRONICS ENGINEERING & SMART FACTORY [CP15]_SEMESTER 4_PROGRAMMABLE LOGIC CONTROLLER -1_MASTER FILE 55 6. FUNCTIONWORKING WITH BITS 6.1 Digital Bit Functions & Their Applications BIT PATTERNS IN A REGISTER CHANGING A REGISTER BIT STATUS 1. BIT SET(BS) - When BS function is enabled the corresponding bit is set to 1.Turning the function off would have no further effect on the bit–it would remain as 2. BIT CLEAR (BC) - It has the opposite effect of BIT SET.Whenenabled,itwillchangethebit from 1 to 0. When BC turned off, nothing further happens.
  • 57. ` Go to Table of Content NTTF_DIPLOMA IN MECHATRONICS ENGINEERING & SMART FACTORY [CP15]_SEMESTER 4_PROGRAMMABLE LOGIC CONTROLLER -1_MASTER FILE 56 3. BIT FOLLOW (BF) - When enabled the function sets the bit to 1. When disabled, the function sets the bit to 0.
  • 58. ` Go to Table of Content NTTF_DIPLOMA IN MECHATRONICS ENGINEERING & SMART FACTORY [CP15]_SEMESTER 4_PROGRAMMABLE LOGIC CONTROLLER -1_MASTER FILE 57 SHIFT REGISTER FUNCTIONS Enable the operator to move digital bits within and through the PLC registers. 1) SHIFT RIGHT 2) SHIFT LEFT 3) ROTATE 4) MULTIPLE SHIFT SHIFT RIGHT FUNCTION – One Register The bottom input is enabling input • The middle input determines whether a 1 or 0 is inserted in to the register when shifting • When the top input is activated, the register shifts all bits one position to the right and a new bit is added on left.
  • 59. ` Go to Table of Content NTTF_DIPLOMA IN MECHATRONICS ENGINEERING & SMART FACTORY [CP15]_SEMESTER 4_PROGRAMMABLE LOGIC CONTROLLER -1_MASTER FILE 58 SHIFT RIGHT FUNCTION– Multiple Registers SHIFT LEFT FUNCTION ▪ The bit is inserted on the right. ▪ The bits shift to the left and leave on the left. ▪ The output coil status follows the status of the last bit on left.
  • 60. ` Go to Table of Content NTTF_DIPLOMA IN MECHATRONICS ENGINEERING & SMART FACTORY [CP15]_SEMESTER 4_PROGRAMMABLE LOGIC CONTROLLER -1_MASTER FILE 59 REGISTER ROTATE FUNCTION ▪ Rotate functions are Rotate Right (RR) and Rotate Left (RL). ▪ It can be of full register re-entry or partial register re-entry. ▪ The full register re-entry system’s re-entry point can only be at the beginning of a register. ▪ With partial re-entry type the exact number of bits needed can be chosen.
  • 61. ` Go to Table of Content NTTF_DIPLOMA IN MECHATRONICS ENGINEERING & SMART FACTORY [CP15]_SEMESTER 4_PROGRAMMABLE LOGIC CONTROLLER -1_MASTER FILE 60 Multiple shift right (MSR) function It needs one more piece of information than SR and SL functions: a specification of the number of shifts to be made at a time, N.
  • 62. ` Go to Table of Content NTTF_DIPLOMA IN MECHATRONICS ENGINEERING & SMART FACTORY [CP15]_SEMESTER 4_PROGRAMMABLE LOGIC CONTROLLER -1_MASTER FILE 61 6.2 Sequencer Functions PLC’S equencer function is also called as DRUM CONTROLLER Function. It can operate between steps by programmed time sequences.
  • 63. ` Go to Table of Content NTTF_DIPLOMA IN MECHATRONICS ENGINEERING & SMART FACTORY [CP15]_SEMESTER 4_PROGRAMMABLE LOGIC CONTROLLER -1_MASTER FILE 62
  • 64. ` Go to Table of Content NTTF_DIPLOMA IN MECHATRONICS ENGINEERING & SMART FACTORY [CP15]_SEMESTER 4_PROGRAMMABLE LOGIC CONTROLLER -1_MASTER FILE 63