0% found this document useful (0 votes)
2 views

Unit-2-3 Features of PLC

Programmable Logic Controllers (PLCs) have evolved over the past twenty years as flexible replacements for traditional relay and timer logic in control panels. They feature internal functions like timers and counters, and utilize various instructions such as program control, data manipulation, and jump instructions to enhance control efficiency and flexibility. The document details specific instructions, including Master Control Reset (MCR) and Jump (JMP), which allow for complex programming and efficient operation in industrial applications.

Uploaded by

Padmavathy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

Unit-2-3 Features of PLC

Programmable Logic Controllers (PLCs) have evolved over the past twenty years as flexible replacements for traditional relay and timer logic in control panels. They feature internal functions like timers and counters, and utilize various instructions such as program control, data manipulation, and jump instructions to enhance control efficiency and flexibility. The document details specific instructions, including Master Control Reset (MCR) and Jump (JMP), which allow for complex programming and efficient operation in industrial applications.

Uploaded by

Padmavathy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 45

THE STRUCTURE AND FEATURES OF PROGRAMMABLE

LOGIC CONTROLLER

• Programmable logic controllers (PLCs) have


been used in industry in one form or
another for the past twenty over years.
• The PLC is designed as a replacement for
the hard- wired relay and timer logic to be
found in traditional control panels,
• where PLC provides ease and flexibility of
control based on programming and
executing logic instructions..
THE STRUCTURE AND FEATURES OF PROGRAMMABLE LOGIC CONTROLLER

• The internal functions such as timers, counters


and shift registers making sophisticated
control possible using even the smallest PLC.
APPLICATIONS OF PLC
• Instructions in PLC
• Program control instructions,
• data manipulation Instructions,
• math instructions,
• sequencer and shift register instructions
APPLICATIONS OF PLC
• Program Control Instructions:
• Program control instructions are used to alter
the program scan from its normal sequence.
Sometimes referred to as override instructions,
• they provide a means of executing sections of
the control logic if certain conditions are met.
• They allow for greater program flexibility and
greater efficiency in the program scan.
Program Control Instructions
• Instructions comprising the override
instruction group include

• i)Master Control Reset (MCR)


• ii) Jump (JMP) instructions.

Program Control Instructions
Command Name Description

JMP Jump to label Jump forward/backward to a corresponding


label.

LBL Label Specifies label location.


JSR Jump to Subroutine Jumps to a designated subroutine
instruction.

RET Return from Subroutine Exits current subroutine and returns to


previous condition.

SBR Subroutine Identifies the subroutine program.


TND Temporary end Makes a temporary end that halts the
program execution.

MCR Master Control Reset Clears all set outputs between the paired
MCR instructions.

SUS Suspend Identifies specific conditions for program


debugging and system troubleshooting.
Master Control Reset (MCR)
• The master control reset (MCR) instruction can be
programmed to control an entire circuit or to
control only selected rungs of a circuit.
• When the MCR instruction is false, or de-
energized, all non-retentive (non-latched) rungs
below the MCR will be de-energized even if the
programmed logic for each rung is true.
• All retentive rungs will remain in their last state
Master Control Reset (MCR)
• The MCR instruction establishes a zone in the
user program in which all non-retentive
outputs can be turned off simultaneously.
• Therefore, retentive instructions should not
normally be placed within an MCR zone
because the MCR zone maintains retentive
instructions in the last active state when the
instruction goes false.
MCR instruction programmed to control an
entire circuit
• The MCR instruction sets up a zone or multiple zones in
a program.
• The MCR instruction is used in pairs to disable or enable
a zone within a ladder program, and it has no address.
• A common application of an MCR zone control involves
examining one or more fault bits as part of the start
fence and enclosing the portion of the program you
want de-energized in case of a fault in the MCR zone.
• In case of a detected fault condition, the outputs in that
zone would be de-energized automatically.
MCR Zone True

• The operation of the program can be


summarized as follows:
• The MCR zone is enclosed by a start fence
which is a rung with a conditional MCR, and
an end fence which is a rung with an
unconditional MCR.
• When the MCR in the start rung is true (input
A), outputs act according to their rung
MCR Zone True

• energize instruction, the on-delay timer, and


the off-delay timer). All retentive devices, such
as latches, retentive timers, and counters
remain in their last state
MCR Zone False
MCR Zone False

• When input A is false, output A and T4:1 will


be false and output B will remain in its last
state.
• The input conditions in each rung will have no
effect on output conditions.
• Multiple MCR zones are permitted in a
program
Jump Instruction

• PLC programming it is sometimes desirable to be


able to jump over certain program instructions if
certain conditions exist.
• The jump (JMP) instruction is an output instruction
used for this purpose.
• The advantage to the jump instruction is to reduce
the processor scan time by jumping over
instructions not pertinent to the machine's
operation at that instant
• .
Jump Instruction

• Other useful functions of the jump instruction


are the following
• The programmable controller can hold more
than one program and scan only the program
appropriate to operator requirements.
• Sections of a program can be jumped when a
production fault occurs
Jump Instruction
Jump Instruction
• Some manufacturers provide a skip instruction, which is essentially
the same as the jump instruction.
• By using the jump instruction, you can branch or skip to different
portions of a program and freeze all affected outputs in their last
state.
• Jumps are normally allowed in both the forward and backward
directions.

• Jumping over counters and timers will stop them from being
incremented.
Jump Instruction
• There are two types of Jump.
• i) Non-return
• and ii) Return
Non-return Jump instruction
• The jump (JMP) instruction and the label (LBL) instruction are
employed together so the scan can jump over a portion of the
program.

• The label is a target for the jump; it is the first instruction in


the rung, and it is always true.
• A jump instruction jumps to a label with the same address.
• The area that the processor jumps over is defined by the
locations of the jump and label instructions in the program. If
the jump coil is energized, all logic between the jump and label
instructions is bypassed and the processor continues scanning
after the LBL instruction.
A simple example of a jump-to-label
program
A simple example of a jump-to-label
program
• The label instruction is used to identify the ladder rung that is the
target destination of the jump instruction.
• The label address number must match that of the jump instruction with
which it is used.
• The label instruction does not contribute to logic continuity, and for all
practical purposes, it is always logically true.
• When rung 4 has logic continuity, the processor is instructed to jump to
rung 8 and continue to execute the main program from that point.
Jumped rungs 5, 6, and 7 are not scanned by the processor. Input
conditions are not examined and outputs controlled by these rungs
remain in their last state. Any timers or counters programmed within
the jump area cease to function and will not update themselves during
this period. For this reason they should be programmed outside the
jumped section in the main program zone.
A simple example of a jump-to-label
program
• When rung 4 has logic continuity, the processor is
instructed to jump to rung 8 and continue to execute the
main program from that point.
• Jumped rungs 5, 6, and 7 are not scanned by the processor.
• Input conditions are not examined and outputs controlled
by these rungs 5,6 and 7 remain in their last state.
• Any timers or counters programmed within the jump area
cease to function and will not update themselves during
this period.
• For this reason they should be programmed outside the
jumped section in the main program zone.
Return Jump instruction

• Another valuable tool in PLC programming is


to be able to escape from the main program
and go to a program subroutine to perform
certain functions and then return to the main
program.

Return Jump instruction
Return Jump instruction
• The subroutine will be acted on when the rung
containing the jump-to-subroutine (JSR) is
true.
• The CPU will then look for the destination
address at an LBL in the subroutine area. The
subroutine must always be completed with a
return.
• This return rung is always unconditional.
Return Jump instruction
• The exit from the subroutine is always
returned to the rung following the JSR in the
main application program.
• When the rung containing the JSR goes false,
all outputs in the subroutine area are held in
their last state, either energized or de-
energized.
Flashing Pilot Light using Subroutine Program
Return Jump instruction
Flashing Pilot Light using Subroutine Program
Return Jump instruction
Flashing Pilot Light using Subroutine Program
Return Jump instruction
• Materials conveyor system with a flashing pilot light as a subroutine.
• If the weight on the conveyor exceeds a preset value, the solenoid
is de-energized and the alarm light will begin flashing.

• When the weight sensor switch closes, the JSR is activated and the
processor scan jumps to the subroutine area.

• The subroutine is continually scanned and the light flashes.



• When the sensor switch opens, the processor will no longer scan
the subroutine area and the alarm light will return to the on state.
Nested Subroutine
Nested Subroutine
• Nested subroutines make complex
programming easier and program operation
faster because the programmer does not have
to continually return from one subroutine to
enter another.
Immediate Input and
Immediate Output Instructions

• Immediate input and immediate output


instructions interrupt the normal program
scan to update the input image table file with
current input data or to update an output
module group with the current output image
table file data.
• These instructions are intended to be used
only in area where time or timing is critical.
Immediate Input and
Immediate Output Instructions
Immediate Input and
Immediate Output Instructions
• The immediate input (IIN) instruction is used to
read an input condition before the I/O update is
performed.
• This operation interrupts the program scan
when it is executed.
• After the immediate input instruction is
executed, normal program scan resumes.
• This instruction is used with critical input devices
that require updating in advance of the I/O scan
Immediate Input and
Immediate Output Instructions
• When the program scan reaches the immediate input
instruction, the scan is interrupted and the bits of the
addressed word are updated.
• The immediate input is most useful if the instruction
associated with the critical input device is at the middle or
toward the end of the program.
• The immediate input is not needed near the beginning of the
program since the I/O scan has just occurred at that time.
• Although the immediate input instruction speeds the
updating of bits, its scan-time interruption increases the total
scan time of the program.
Immediate Output Instruction
Immediate Output Instruction
• The immediate output (IOT) instruction is a special
version of the OUTPUT ENERGIZE instruction used to
update the status of an output device before the I/O
update is performed.
• The immediate output is used with critical output
devices that require updating in advance of the I/O
scan.
• . When the program scan reaches the immediate
output instruction, the scan is interrupted and the
bits of the addressed word are updated
Data Manipulation Instructions
Data Manipulation Instructions
• Data manipulation instructions enable the
programmable controller to manipulate data
stored in memory.
• This extra characteristic gives the PLC capabilities
that go far beyond the conventional relay
equivalent instructions.
• Data manipulation involves transfer of data and
operation on data with math functions, data
conversion, data comparison, and logical
operations
Data Manipulation Instructions
• There are two basic classes of instructions to
accomplish this:
• instructions that operate on word data
• and those that operate on file, or block, data,
which involve multiple words.
• Each data manipulation instruction requires
two or more words of data memory for
operation
Data Manipulation Instructions
• The data contained in files and words will be in the
form of binary bits represented as series of 1s and 0s.
• The data manipulation instructions allow the
movement, manipulation, or storage of data in either
single or multiple word groups from one data
memory area of the PLC to another.
• Use of these PLC instructions in applications that
require the generation and manipulation of large
quantities of data greatly reduces the complexity and
quantity of the programming required.
Data Manipulation Instructions
• Data manipulation can be placed in two broad
categories:
• i)Data transfer and ii) Data comparison
• Data transfer operations are all output
instructions.
• Data transfer instructions simply involve the
transfer of the contents from one word or
register to another.
Data Manipulation Instructions

You might also like