Programmable Logic Controller
Programmable Logic Controller
SEMESTER 4
PROGRAMMABLE
LOGIC
CONTROLLER - 1
Rev No :00
Released Date :01/02/2021
`
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 1
`
1. PLC BASICS
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.
Go to Table of Content
NTTF_DIPLOMA IN MECHATRONICS ENGINEERING & SMART FACTORY [CP15]_SEMESTER 4_PROGRAMMABLE LOGIC CONTROLLER -1_MASTER FILE 2
`
ADVANTAGES OF PLC
DISADVANTAGES OF PLC
▪ Newer Technology
▪ Fixed Program Application
▪ Environmental Consideration
▪ Fail – Safe Operation
▪ Fixed Circuit Operation
Here the overall look inside the plc is given with the block diagram.
Go to Table of Content
NTTF_DIPLOMA IN MECHATRONICS ENGINEERING & SMART FACTORY [CP15]_SEMESTER 4_PROGRAMMABLE LOGIC CONTROLLER -1_MASTER FILE 3
`
2. Memory : The area of the CPU in which the data and information are Stored and
retrieved. Holds the system software and user program.
PROGRAMMER/MONITOR(PM)
INPUT MODULE
Go to Table of Content
NTTF_DIPLOMA IN MECHATRONICS ENGINEERING & SMART FACTORY [CP15]_SEMESTER 4_PROGRAMMABLE LOGIC CONTROLLER -1_MASTER FILE 4
`
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
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 5
`
Go to Table of Content
NTTF_DIPLOMA IN MECHATRONICS ENGINEERING & SMART FACTORY [CP15]_SEMESTER 4_PROGRAMMABLE LOGIC CONTROLLER -1_MASTER FILE 6
`
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 7
`
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 8
`
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
`
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.
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 11
`
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 12
`
▪ 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 13
`
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
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 15
`
Go to Table of Content
NTTF_DIPLOMA IN MECHATRONICS ENGINEERING & SMART FACTORY [CP15]_SEMESTER 4_PROGRAMMABLE LOGIC CONTROLLER -1_MASTER FILE 16
`
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 17
`
Go to Table of Content
NTTF_DIPLOMA IN MECHATRONICS ENGINEERING & SMART FACTORY [CP15]_SEMESTER 4_PROGRAMMABLE LOGIC CONTROLLER -1_MASTER FILE 18
`
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.
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 19
`
Add sensors on the sketch as needed to carry out the control sequence.
Go to Table of Content
NTTF_DIPLOMA IN MECHATRONICS ENGINEERING & SMART FACTORY [CP15]_SEMESTER 4_PROGRAMMABLE LOGIC CONTROLLER -1_MASTER FILE 20
`
Ladder Diagram
Go to Table of Content
NTTF_DIPLOMA IN MECHATRONICS ENGINEERING & SMART FACTORY [CP15]_SEMESTER 4_PROGRAMMABLE LOGIC CONTROLLER -1_MASTER FILE 21
`
3. BASIC FUNCTIONS
3.1 Registers Basics
HOLDING REGISTERS
Go to Table of Content
NTTF_DIPLOMA IN MECHATRONICS ENGINEERING & SMART FACTORY [CP15]_SEMESTER 4_PROGRAMMABLE LOGIC CONTROLLER -1_MASTER FILE 22
`
Go to Table of Content
NTTF_DIPLOMA IN MECHATRONICS ENGINEERING & SMART FACTORY [CP15]_SEMESTER 4_PROGRAMMABLE LOGIC CONTROLLER -1_MASTER FILE 23
`
▪ 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 24
`
PLC provides several types of timer instructions . However, PLC manufacturers may
provide different definitions for each type of timer function offered.
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
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 25
`
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 26
`
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
Go to Table of Content
NTTF_DIPLOMA IN MECHATRONICS ENGINEERING & SMART FACTORY [CP15]_SEMESTER 4_PROGRAMMABLE LOGIC CONTROLLER -1_MASTER FILE 27
`
Go to Table of Content
NTTF_DIPLOMA IN MECHATRONICS ENGINEERING & SMART FACTORY [CP15]_SEMESTER 4_PROGRAMMABLE LOGIC CONTROLLER -1_MASTER FILE 28
`
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 29
`
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 30
`
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 31
`
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.
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 32
`
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.
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.
Go to Table of Content
NTTF_DIPLOMA IN MECHATRONICS ENGINEERING & SMART FACTORY [CP15]_SEMESTER 4_PROGRAMMABLE LOGIC CONTROLLER -1_MASTER FILE 33
`
Go to Table of Content
NTTF_DIPLOMA IN MECHATRONICS ENGINEERING & SMART FACTORY [CP15]_SEMESTER 4_PROGRAMMABLE LOGIC CONTROLLER -1_MASTER FILE 34
`
Go to Table of Content
NTTF_DIPLOMA IN MECHATRONICS ENGINEERING & SMART FACTORY [CP15]_SEMESTER 4_PROGRAMMABLE LOGIC CONTROLLER -1_MASTER FILE 35
`
Go to Table of Content
NTTF_DIPLOMA IN MECHATRONICS ENGINEERING & SMART FACTORY [CP15]_SEMESTER 4_PROGRAMMABLE LOGIC CONTROLLER -1_MASTER FILE 36
`
Go to Table of Content
NTTF_DIPLOMA IN MECHATRONICS ENGINEERING & SMART FACTORY [CP15]_SEMESTER 4_PROGRAMMABLE LOGIC CONTROLLER -1_MASTER FILE 37
`
Go to Table of Content
NTTF_DIPLOMA IN MECHATRONICS ENGINEERING & SMART FACTORY [CP15]_SEMESTER 4_PROGRAMMABLE LOGIC CONTROLLER -1_MASTER FILE 38
`
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 39
`
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 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 40
`
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 41
`
Go to Table of Content
NTTF_DIPLOMA IN MECHATRONICS ENGINEERING & SMART FACTORY [CP15]_SEMESTER 4_PROGRAMMABLE LOGIC CONTROLLER -1_MASTER FILE 42
`
Go to Table of Content
NTTF_DIPLOMA IN MECHATRONICS ENGINEERING & SMART FACTORY [CP15]_SEMESTER 4_PROGRAMMABLE LOGIC CONTROLLER -1_MASTER FILE 43
`
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.
Go to Table of Content
NTTF_DIPLOMA IN MECHATRONICS ENGINEERING & SMART FACTORY [CP15]_SEMESTER 4_PROGRAMMABLE LOGIC CONTROLLER -1_MASTER FILE 44
`
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 45
`
Jump with return - Jump with return instruction leaps to a subroutine when activated. It
then returns from the subroutine to them a in program.
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 46
`
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 47
`
Go to Table of Content
NTTF_DIPLOMA IN MECHATRONICS ENGINEERING & SMART FACTORY [CP15]_SEMESTER 4_PROGRAMMABLE LOGIC CONTROLLER -1_MASTER FILE 48
`
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 49
`
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 50
`
Go to Table of Content
NTTF_DIPLOMA IN MECHATRONICS ENGINEERING & SMART FACTORY [CP15]_SEMESTER 4_PROGRAMMABLE LOGIC CONTROLLER -1_MASTER FILE 51
`
It retrieves data in the order stored. It is found in most PLCs. It consists of two
subfunctions.
Once the stackis full, the unload function must precede the input function. Other wise
the data will not bein serted.
PLC LIFO FUNCTION
Go to Table of Content
NTTF_DIPLOMA IN MECHATRONICS ENGINEERING & SMART FACTORY [CP15]_SEMESTER 4_PROGRAMMABLE LOGIC CONTROLLER -1_MASTER FILE 52
`
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 53
`
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
Go to Table of Content
NTTF_DIPLOMA IN MECHATRONICS ENGINEERING & SMART FACTORY [CP15]_SEMESTER 4_PROGRAMMABLE LOGIC CONTROLLER -1_MASTER FILE 54
`
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
Go to Table of Content
NTTF_DIPLOMA IN MECHATRONICS ENGINEERING & SMART FACTORY [CP15]_SEMESTER 4_PROGRAMMABLE LOGIC CONTROLLER -1_MASTER FILE 55
`
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 56
`
Enable the operator to move digital bits within and through the PLC
registers.
1) SHIFT RIGHT
2) SHIFT LEFT
3) ROTATE
4) MULTIPLE SHIFT
• 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 57
`
Go to Table of Content
NTTF_DIPLOMA IN MECHATRONICS ENGINEERING & SMART FACTORY [CP15]_SEMESTER 4_PROGRAMMABLE LOGIC CONTROLLER -1_MASTER FILE 58
`
▪ 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 59
`
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 60
`
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 61
`
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