Adaptive Control For Machine Tools

Download as pdf or txt
Download as pdf or txt
You are on page 1of 49

03-05-2023

ADAPTIVE CONTROL FOR MACHINE TOOLS

ADAPTIVE CONTROL FOR MACHINE TOOLS

1
03-05-2023

ADAPTIVE CONTROL FOR MACHINE TOOLS

ADAPTIVE CONTROL FOR MACHINE TOOLS

2
03-05-2023

ADAPTIVE CONTROL FOR MACHINE TOOLS

A programmable logic controller


(PLC)

Relay Based Control Panel

3
03-05-2023

A programmable logic controller (PLC)


• A programmable logic controller (PLC) is an
industrial grade computer that is capable of being
programmed to perform control functions.
• It uses a programmable memory to store instructions
and specific functions that include On/Off control,
timing, counting, sequencing,arithmetic, and data
handling
• Unlike a personal computer, it has been designed to
operate in the industrial environment and is equipped
with special input/output interfaces and a control
programming language.
• The programmable controller has eliminated much of
the hardwiring associated with conventional relay
control circuits.
• Other benefits include fast response, easy
programming and installation, high control speed,
network compatibility, troubleshooting and testing
convenience, and high reliability

A programmable logic controller (PLC)


• A programmable logic controller (PLC) is a special form of
microprocessor- based controller that uses a
programmable memory to store instructions and to
implement functions such as logic, sequencing, timing,
counting and arithmetic in order to control machines and
processes(Figure 1.) and are designed to be operated by
engineers with perhaps a limited knowledge of computers
and computing languages.
• They are not designed so that only computer programmers
can set up or change the programs.
• Thus, the designers of the PLC have pre-programmed it so
that the control program can be entered using a simple, rather
intuitive, form of language.
• The term logic is used because programming is primarily
concerned with implementing logic and switching operations,
e.g. if A or B occurs switch on C, if A and B occurs switch on
D.
• Input devices, e.g. sensors such as switches, and output
devices in the system being controlled, e.g. motors, valves,
etc., are connected to the PLC.

4
03-05-2023

Fig 1.Programmable logic controller (PLC)

• The operator then enters a sequence of instructions, i.e. a program,


into the memory of the PLC. The controller then monitors the
inputs and outputs according to this program and carries out the
control rules for which it has been programmed.

a ) Relaybased control panel. b ) PLC-based control panel.

5
03-05-2023

The Need for PLCs


1. PLC was developed an alternative to hard wired
analog relay circuitry used in industrial controls
2. Hardwired relay panels were very time consuming to
wire, debug and change.
3. Initially the PLC was used to replace relay logic, but
its ever-increasing range of functions means that it is
found in many and more complex applications
4. it is capable not only of performing relay switching
tasks but also of performing other applications such
as timing, counting, calculating, comparing, and the
processing of analog signals

6
03-05-2023

5. PLCs have the great advantage that the same


basic controller can be used with a wide range of
control systems.
6. PLCs are designed for multiple input and output
arrangements, extended temperature ranges,
immunity to electrical noise, and resistance to
vibration and impact
7. There is no need to rewire.
8. Flexible, cost effective, system which can be
used with control systems which vary quite
widely in their nature and complexity.
9. Similar to computers but whereas computers are
optimised for calculation and display tasks,
PLCs are optimised for control tasks and the
industrial environment.

• In short the PLCs are:


1. Rugged and designed to withstand vibrations,
temperature, humidity and noise.
2. Have interfacing for inputs and outputs already
inside the controller.
3. Are easily programmed and have an easily
understood programming language which is
primarily concerned with logic and switching
operations.

7
03-05-2023

PLCs Versus Personal


Computers
Same basic
architecture

PLC
1. Operates in the industrial environment
PC
2. Is programmed in relay ladder logic
1. Computers are complex computing
or other easily learned languages.
3. PLCs, execute a single program in an
machines capable of executing
orderly and sequential fashion from several programs simultaneously,
first to last instruction. in any order
4. Has no keyboard, CD drive, monitor, 2. Some manufacturers have
or disk drive. software and interface cards
5. Has communications ports, and available so that a PC can do the
terminals for input and output work of a PLC
devices 3. Has keyboard, CD drive, monitor,
or disk drive

Other Benefits of PLC’s


1. Increased reliability: Once a program has been
written and tested, it can be easily downloaded to
other PLCs. Since all logic is contained in the
PLC’s memory, there is no chance of making a
logic wiring error. It will reduce the use external
wiring for control the process.
2. More Flexibility: It is easy to create and update a
program in a PLC. With a PLC relationship b/w the
input and output are determined by the user
programs. Original equipment manufacturers can
provide system updates by sending out a new
program.
3. Low cost : PLCs were originally designed to
reduce relay control logic and the cost savings
have been so significant that relay control is
becoming obsolete except for power applications.

8
03-05-2023

4. Communications Capability: It can communicate


with other controllers or computer equipment to
perform such functions as supervisory control, data
gathering, monitoring devices, process parameters
etc.
5. Faster Response Time: It is designed for high
speed real-time applications.The programmable
controller operations in real time, which means that
an event taking place in the field will result in the
execution of an operation or output.
6. Easy to troubleshoot: PLCs have resident
diagnostics and override functions that allow user to
easily trace and correct software and hardware
problems.
7. Easier to Test field Devices: A PLC control panel
has the ability to checkfield devices at common
point. By having each device wired back to a
common point on a PLC module, each device could
be checked for operation fairly quickly

PLC Architecture
• An open architecture design allows the system to
be connected easily to devices and programs
made by other manufacturers.
• A closed architecture or proprietary system, is
one whose design makes it more difficult to
connect devices and programs made by other
manufacturers.
• NOTE: When working with PLC systems that are
proprietary in nature you must be sure that any
generic hardware or software you use is
compatible with your particular PLC

9
03-05-2023

PLC Hardware- components

• Typically a PLC system has the basic functional


components of :-
1. Processor unit (CPU),
2. Memory unit
3. Input/output interface section
4. Power supply unit
5. Programming device
6. Communications interface

PLC Hardware- components

10
03-05-2023

PLC Hardware- components


1. The processor unit or central processing unit (CPU) is
the unit containing the microprocessor and this
interprets the input signals and carries out the control
actions, according to the program stored in its memory,
communicating the decisions as action signals to the
outputs.
2. The memory unit is where the program is stored that is
to be used for the control actions to be exercised by the
microprocessor and data stored from the input for
processing and for the output for outputting.
3. The input and output sections are where the processor
receives information from external devices and
communicates information to external devices. The
inputs might thus be from switches, other sensors such
as photo-electric cells, temperature sensors, or flow
sensors, etc. The outputs might be to motor, starter coils,
solenoid valves, etc

PLC Hardware- components


4. The power supply unit is needed to convert the mains a.c.
voltage to the low d.c. voltage (5 V) necessary for the
processor and the circuits in the input and output interface
modules.
5. The programming device is used to enter the required
program into the memory of the processor. The program is
developed in the device and then transferred to the memory
unit of the PLC
6. The communications interface is used to receive and
transmit data on communication networks from or to other
remote PLCs It is concerned with such actions as device
verification, data acquisition, synchronisation between user
applications and connection management

11
03-05-2023

Internal architecture of PLC

Fig 2. Internal architecture of a PLC

Internal architecture of PLC

Figure 2 shows the basic internal architecture of a


PLC. It consists of a
1. Central processing unit (CPU) containing the
system microprocessor,
2. Data Buses
3. Memory, and
4. Input/output Unit

12
03-05-2023

1. Central processing unit ( (CPU)

The internal structure of the CPU depends on the


microprocessor concerned. In general they have:
1 An arithmetic and logic unit (ALU) which is
responsible for data manipulation and carrying out
arithmetic operations of addition and subtraction and
logic operations of AND, OR, NOT and
EXCLUSIVE-OR.
2 Memory, termed registers, located within the
microprocessor and used to store information
involved in program execution.
3 A control unit which is used to control the timing of
operations Processor
Module

2.The buses
• The buses are the paths used for communication
within the PLC. The information is transmitted in
binary form, i.e. as a group of bits with a bit being a
binary digit of 1 or 0, i.e. on/off states. The term
word is used for the group of bits constituting some
information. The system has four buses:-
• The data bus carries the data used in the
processing carried out by the CPU
• The address bus is used to carry the addresses of
memory locations
• The control bus carries the signals used by the
CPU for control,
• The system bus is used for communications
between the input/output ports and the input/output
unit

13
03-05-2023

3.The memory There are several memory elements in a


PLC system:
1 System read-only-memory (ROM) to give permanent
storage for theoperating system and fixed data used by the
CPU.
2 Random-access memory (RAM) for the user’s program.
3 Random-access memory (RAM) for data.
The programs and data in RAM can be changed by
the user

3. Input/output unit
• The input/output unit provides the interface between the
system and the outside world, allowing for connections
to be made through input/output channels to input
devices such as sensors and output devices such as
motors and solenoids
• It is also through the input/output unit that programs are
entered from a program panel.
• Every input/output point has a unique address which can
be used by the CPU.
• It is like a row of houses along a road, number 10 might
be the ‘house’ to be used for an input from a particular
sensor while number ‘45’ might be the ‘house’ to be used
for the output to a particular motor

14
03-05-2023

4. Input/output unit

Input Module

• Forms the interface


by which input field
devices are connected
to the controller.

•.

Lecture – Introduction to PLC's MME 486 – Fall 2006 29 of 47

3. Input/output interface section


Output Module

• Forms the interface


by which output field
devices are connected
to the controller.

15
03-05-2023

4.Power Supply Unit


• The power supply unit is needed to convert
the mains a.c. voltage to the low d.c.
voltage (5 V) necessary for the processor
and the circuits in the input and output
interface modules
• In large PLC systems,
this power supply does
not normally supply
power to the field
devices.
• In small and micro PLC systems, the
power supply is also used to power field
devices.

5. Programming Device

PC with appropriate
software

• A personal computer (PC) is the most commonly used


programming device
• The software allows users to create, edit, document,
store and troubleshoot programs
• The personal computer communicates with the PLC
processor via a serial or parallel data communications link

16
03-05-2023

Programming Device

Hand-held unit
with display

• Hand-held programming devices are sometimes used to


program small PLCs

• They are compact, inexpensive, and easy to use, but are


not able to display as much logic on screen as a computer
monitor

6.The communications interface


These are buses used to receive and transmit data on
communication networks from or to other remote PLCs
It is concerned with such actions as device verification, data
acquisition, synchronisation between user applications and
connection management

17
03-05-2023

A program
• A program is a user-developed series of
instructions that directs the PLC to execute
actions.
• A programming language provides rules for
combining the instructions so that they
produce the desired actions.

18
03-05-2023

PLC Programming Languages


The term PLC programming language refers to the method by which the
user communicates information to the PLC. The standard IEC 61131 ( Figure
5-12 ) was established to standardize the multiple languages associated with
PLC programming by defining the following five
standard languages:
1. Ladder Diagram (LD) —a graphical depiction of a process with rungs of
logic, similar to the relay ladder logic schemes that were replaced by
PLCs.
2. Function Block Diagram (FBD) —a graphical depiction of process flow
using simple and complex interconnecting blocks.
3. Sequential Function Chart (SFC) —a graphical depiction of
interconnecting steps, actions, and transitions.
4. Instruction List (IL) —a low-level, text-based language that uses
mnemonic instructions.
5. Structured Text (ST) —a high-level, text-based language such as
BASIC, C, or PASCAL specifically developed for industrial control
applications.

PLC Programming Languages

19
03-05-2023

Structured text is a programming language that strongly resembles the


programming language PASCAL. Programs are written as a series of
statements separated by semicolons. The statements use predefined
statements and subroutines to change variables, these being defined
values, internally stored values or inputs and outputs.

• Programming can be made even easier by the use of the


so-called high-level languages, such as C, BASIC, PASCAL,
FORTRAN, COBOL. These use prepackaged functions,
represented by simple words or symbols descriptive of the
function concerned.
• For example, with C language the symbol & is used for the
logic AND operation.
• However, the use of these methods to write programs
requires some skill in programming and PLCs are intended
to be used by engineers without any great knowledge of
programming.
• As a consequence, ladder programming was developed.
This is a means of writing programs which can then be
converted into machine code by some software for use
by the PLC microprocessor

20
03-05-2023

PLC Ladder Programming


• The ladder diagram language is basically a symbolic set of
instructions used to create the controller program.
• These ladder instruction symbols are arranged to obtain the
desired control logic that is to be entered into the memory of the
PLC.
• Because the instruction set is composed of contact symbols,
ladder diagram language is also referred to as contact
symbology
• Representations of contacts and coils are the basic
symbols of the logic ladder diagram instruction set.
Instead of words, ladder logic programming language uses
graphic symbols that show their intended outcome.
• A program in ladder logic is similar to a schematic for a relay
control circuit. It emulate behavior of relays and switches
• It is a special language written to make it easy for people
familiar with relay logic control to program the PLC.

ladder diagrams
• A ladder diagram is used to represent PLC
programs
• As an introduction to ladder diagrams, consider
the simple wiring diagram for an electrical
circuit in Figure 1a. The diagram shows the
circuit for switching on or off an electric motor.

1a. Wiring Diagram

21
03-05-2023

Ladder diagrams
• We can redraw this diagram in a different way,
using two vertical lines to represent the input
power rails and stringing the rest of the circuit
between them. Figure 1b shows the result.

1b. Ladder Wiring Diagram

• Both circuits have the switch in series with the


motor and supplied with electrical power when the
switch is closed.
• The circuit shown in Figure 1b is termed a ladder
diagram

• With such a diagram the power supply for the circuits is


always shown as two vertical lines with the rest of the
circuit as horizontal lines.
• The power lines, or rails as they are often
termed, are like the vertical sides of a ladder with
the horizontal circuit lines like the rungs of the
ladder.
– The horizontal rungs show only the control
portion of the circuit; in the case of Figure 1a it
is just the switch in series with the motor.
– Vertical portion/lines shows the power
supplies.
• Circuit diagrams often show the relative physical
location of the circuit components and how they are
actually wired.
• With ladder diagrams no attempt is made to show
the actual physical locations and the emphasis is on
clearly showing how the control is exercised.

22
03-05-2023

Rules for drawing a Ladder diagram


• In drawing a ladder diagram, certain conventions
are adopted:
1. The vertical lines of the diagram represent the
power rails between which circuits are
connected. The power flow is taken to be from the
left-hand vertical across a rung.
2. Each rung on the ladder defines one operation
in the control process.
3. A ladder diagram is read from left to right and
from top to bottom, Figure 11.3 showing the
scanning motion employed by the PLC.

The top rung is read from left to


right. Then the second rung
down is read from left to right
and so on.
When the PLC is in its run mode, it
goes through the entire ladder
program to the end, the end
rung of the program being
clearly denoted, and then
promptly resumes at the start.
This procedure of going through all
the rungs of the program is
termed a cycle.
The end rung might be indicated by a
block with the word END or RET
for return, since the program
promptly returns to its
beginning.

23
03-05-2023

Rules for drawing a Ladder diagram


4. Each rung must start with an input or inputs and must
end with at least one output. The term input is used for a
control action, such as closing the contacts of a switch,
used as an input to the PLC. The term output is used for a
device connected to the output of a PLC, e.g., a motor.
5. Electrical devices are shown in their normal condition.
Thus a switch, which is normally open until some object
closes it, is shown as open on the ladder diagram. A switch
that is normally closed is shown closed.
6. A particular device can appear in more than one rung
of a ladder. For example, we might have a relay that
switches on one or more devices. The same letters and/or
numbers are used to label the device in each situation.
7. The inputs and outputs are all identified by their
addresses, the notation used depending on the PLC
manufacturer. This is the address of the input or output in
the memory of the PLC.

• This method of writing programs became


adopted by most PLC manufacturers, however
each tended to have developed their own
versions and so an international standard has
been adopted for ladder programming and
indeed all the methods used for programming
PLCs.
• The standard, published in 1993, is IEC 1131-3
(International Electrotechnical Commission). The
IEC 1131-3 programming languages are ladder
diagrams (LAD), instruction list (IL), sequential
function charts (SFC), structured text (ST), and
function block diagrams (FBD).

24
03-05-2023

PLC Scan Cycle


The PLC program is executed as part of a repetitive process referred to as
a scan ( Figure 1-13 ).
A typical PLC scan starts with the CPU reading the status of inputs.
Then, the application program is executed. Once the program execution is
completed, the CPU performs internal diagnostic and communication
tasks. Next, the status of all outputs is updated.
This process is repeated continuously as long as the PLC is in the run
mode

Entering the Ladder Diagram

25
03-05-2023

Symbols used Ladder programming

Fig. shows a basic standared symbols that are used and rung,
1. Inputs must always preceede outputs and there must be at least one
output on each line
2. Each rung must start with an input or series of inputs and end with an
output

26
03-05-2023

Example 1.Simple ladder diagram for an electrical circuit in Figure c. The diagram
shows the circuit for switching on or off an electric motor.

a. Wiring Diagram

Example 1.Simple ladder diagram for an electrical circuit in Figure c. The diagram
shows the circuit for switching on or off an electric motor.

a. Wiring Diagram b. Ladder Wiring Diagram

c. Ladder Diagram

27
03-05-2023

• Example 2. Activation of a solenoid when switch A & B are


closed

(a), wiring diagram of electric circuit

• Example 2. Activation of a solenoid when switch A & B are


closed

(a), wiring diagram of electric circuit


(b) Ladder drawing of the electric circuit,
(c) ladder program rung

Thus a rung could specify that the state of switches A and B be


examined and if both A and B are closed then a solenoid, the
output is energized.

28
03-05-2023

• In drawing ladder diagrams the names of the


associated variable or addresses of each element
are appended to its symbol.
• Thus Figure 11.6 shows how the ladder diagram
of Figure 11.5a would appear using (a)
Mitsubishi, (b) Siemens, (c) Allen-Bradley, (d)
notations for the addresses.
• Thus, Figure 11.6a indicates that this rung of
the ladder program has an input from address
X400 and an output to address Y430.
• When wiring up the inputs and outputs to the
PLC, the relevant ones must be connected to
the input and output terminals with these
addresses.

29
03-05-2023

The output from the PLC is to energise a solenoid when a normally


open start switch connnected to the input is activated by being closed
This might be a solenoid valve which opens to allow water to enter a
vessel.

Example of a ladder diagram ;Switch controlling a


solenoid

Logic Functions
• Programs are based on logic.
• Logic can be realized using blocks.
• Blocks contain digital circuits.
• Digital circuits can be realized using logic
gates.
• Therefore logic gates are fundamental
components in which a program is realised

30
03-05-2023

Logic Functions
• AND, OR, NOT, EXCLUSIVE OR, NOR, and
NAND circuits are common in ladder logic and
parallel designs found in digital logic circuits.
• Simple circuits can be combined into larger
circuits to perform very complicated tasks.
• PLCs use the same type of logic as does digital
logic texts. Some common digital and ladder
logic equivalent circuits follow:

The AND Function


The basic rules that apply to an AND gate are:
•If all inputs are 1, the output will be 1.
•If any input is 0, the output will be 0.
• ,

• On a ladder diagram when contacts are in series, it represents


a logical AND operation

31
03-05-2023

The OR Function
• The symbol drawn in Figure is that of an
OR gate. An OR gate can have any number
of inputs but only one output.
• The basic rules that apply to an OR
gate are:
–If one or more inputs are 1, the output is 1.
–If all inputs are 0, the output will be 0.

On a ladder diagram when paths are in parallel, it represents a logical OR operation

The NOT Function


• The NOT function can have only one input.
– The NOT output is 1 if the input is 0.
– The output is 0 if the input is 1.
• The result of the NOT operation is always the
inverse of the input, and the NOT function is,
therefore, called an inverter

The ladder logic equivalent of a NOT function looks like a


normal contact but with a slash through it .

32
03-05-2023

The NAND Function


• The NOT symbol placed at the output of an
AND gate would invert the normal output
result.
• An AND gate with an inverted output is called
a NAND gate.
• The NAND gate symbol and truth table are
shown in Figure

The NOR Function


• If a NOT symbol is placed at the output of the
OR gate. The normal output is inverted, and the
function is referred to as a NOR gate.
• The NOR gate symbol and truth table are shown
in Figure

33
03-05-2023

The Exclusive-OR (XOR) Function


• An often-used combination of gates is the exclusive-OR
(XOR) function. The XOR gate symbol and truth table are
shown in Figure .
• The output of this circuit is HIGH only when one input or
the other is HIGH,

Electromagnetic Control Relays


an understanding of electromagnetic relay operation and
terminology is important for correctly converting relay
schematic diagrams to ladder logic programs.

34
03-05-2023

Electromagnetic Control Relays

Electromagnetic Control Relays


• Figure 6-2 illustrates the operation of a typical control
relay. With no current flow through the coil
(deenergized),the armature is held away from the
core of
• the coil by spring tension. When the coil is energized,
it produces an electromagnetic field. Action of this
field, in turn, causes the physical movement of the
armature.
• Movement of the armature causes the contact points
of the relay to open or close. The coil and contacts
are insulated from each other; therefore, under
normal conditions, no electric circuit will exist between
them.

35
03-05-2023

Electromagnetic Control Relays


• The symbol used to represent a control relay is
shown in Figure 6-3 .
• The contacts are represented by a pair of short
parallel lines and are identified with the coil by means
of the letters. The letter M frequently indicates a
motor starter, while CR is used for control relays.
• Normally open (NO) contacts are defined as those
contacts that are open when no current flows through
the coil but that close as soon as the coil conducts a
current or is energized.
• Normally closed (NC) contacts are closed when the
coil is de-energized and open when the coil is
energized.
• Each contact is usually drawn as it would appear with
the coil de-energized

Electromagnetic Control Relays

36
03-05-2023

Electromagnetic Control Relays


A typical control relay used to control two pilot lights
is shown in Figure 6-4 . The operation of the circuit can
be summarized as follows:
1. With the switch open, coil CR is de-energized.
2. The circuit to the green pilot light is completed
3. through the normally closed contact, so this light will
be on. At the same time, the circuit to the red pilot
light is opened through the normally open contact, so
this light will be off.
4. With the switch closed, the coil is energized.
5. The normally open contact closes to switch the red
pilot light on.
6. At the same time, the normally closed contact opens
to switch the green pilot light off.

Electromagnetic Control Relays

37
03-05-2023

Push button switches


• Normally open (NO) pushbutton , which
makes a circuit when it is pressed and returns to
its open position when the button is released.
• Normally closed (NC) pushbutton, which
opens the circuit when it is pressed and returns
to the closed position when the button is
released.

Internal relays
• In PLCs there are elements that are used to hold
data, i.e. bits, and behave like relays, being able to
be switched on or off and switch other devices on or
off.
• Hence the term internal relay. Such internal relays
do not exist as real-world switching devices but are
merely bits in the storage memory that behave in the
same way as relays.
• For programming, they can be treated in the same
way as an external relay output and input. Thus
inputs to external switches can be used to give an
output from an internal relay.
• This then results in the internal relay contacts being
used, in conjunction with other external input
switches to give an output, e.g. activate a motor.
Thus we might have (Figure 7.1):

38
03-05-2023

Internal relays

Internal relays
• With ladder programs, an internal relay output is
represented using the symbol for an output device,
namely ( ), with an address which indicates that it is an
internal relay rather than an external relay.
• Thus, with a Mitsubishi PLC, we might have the
address M100, the M indicating that it is an internal
relay or marker rather than an external device.
• The internal relay switching contacts are
designated with the symbol for an input device,
namely | |, and given the same address as the
internal relay output, e.g. M100.
• In using an internal relay, it has to be activated on
one rung of a program and then its output used to
operate switching contacts on another rung, or
rungs, of the program.
• Internal relays can be programmed with as many sets
of associated contacts as desired.

39
03-05-2023

Programs with multiple input conditions


• As an illustration of the use that can be made of
internal relays, consider the following situation.
• Figure 7.2 shows a ladder program for such a task.
For the first rung: when input 1 or input 3 is closed
and input 2 closed, then internal relay IR 1 is
activated. This results in the contacts IR 1 closing. If
input 4 is then activated, there is an output from
output 1

40
03-05-2023

• Such a task might be involved in the automatic lifting of a


barrier when someone approaches from either side.
• Input 1 and input 3 are inputs from photoelectric sensors
that detect the presence of a person, approaching or
leaving from either side of the barrier, input 1 being
activated from one side of it and input 3 from the other.
• Input 2 is an enabling switch to enable the system to be closed
down.
• Thus when input 1 or input 3, and input 2, are activated, there
is an output from the internal relay 1. This will close the
internal relay contacts.
• If input 4, perhaps a limit switch, detects that the barrier is
closed then it is activated and closes. The result is then
an output from Out 1, a motor which lifts the barrier.
• If the limit switch detects that the barrier is already open,
the person having passed through it, then it opens and so
output 1 is no longer energized and a counterweight
might then close the barrier

41
03-05-2023

Latching
• There are often situations where it is necessary to hold an
output energized, even when the input ceases
• A motor, which is started by pressing a push button switch.
Though the switch contacts do not remain closed, the motor is
required to continue running until a stop push button switch is
pressed. The term latch circuit is used for the circuit used to
carry out such an operation.
• It is a self-maintaining circuit in that, after being energized, it
maintains that state until another input is received

• An example of a latch circuit is shown in Figure


11.18. When the input A contacts close, there is
an output. However, when there is an output,
another set of contacts associated with the
output closes.
• These contacts form an OR logic gate
system with the input contacts. Thus, even if
the input A opens, the circuit will still
maintain the output energized.
• The only way to release the output is by
operating the normally closed contact B.

42
03-05-2023

• As an illustration of the application of a latching circuit,


consider a motor controlled by stop and start push button
switches and for which one signal light must be
illuminated when the power is applied to the motor and
another when it is not applied. Figure 11.19 shows the
ladder diagram with Mitsubishi notation for the
addresses.
• X401 is closed when the program is started. When X400
is momentarily closed, Y430 is energized and its
contacts close. This results in latching and also the
switching off of Y431 and the switching on of Y432. To
switch the motor off, X401 is pressed and opens.
• Y430 contacts open in the top rung and third rung, but
close in the second rung.
• Thus Y431 comes on and Y432 off.

43
03-05-2023

Timers
• In many control tasks there is a need to control
time. For example, a motor or a pump might need
to be controlled to operate for a particular interval of
time, or perhaps be switched on after some time
interval.
• PLCs thus have timers as built-in devices.Timers
count fractions of seconds or seconds using the
internal CPU clock.
• A common approach is to consider timers to
behave like relays with coils which when
energised result in the closure or opening of
contacts after some preset time.

Types of timers
• There are a number of different forms of timers that
can be found with PLCs.
• With small PLCs there is likely to be just one form,
the on-delay timers. These are timers which
come on after a particular time delay(Figure 9.2(a)).
• Off-delay timers are on for a fixed period of time
before turning off (Figure 9.2(b)).
• Another type of timer that occurs is the pulse
timer. This timer switches on or off for a fixed
period of time (Figure 9.2(c)).

44
03-05-2023

Types of timers

Programming timers
Figure 9.4(a) is typical of Mitsubishi. The timer is like a relay
with a coil which is energised when the input In 1 occurs
(rung 1). It then closes, after some preset time delay, its
contacts on rung 2. Thus the output occurs some preset time
after the input In 1 occurs

45
03-05-2023

On-off cycle timer


• Figure 9.8 shows how on-delay timers
can be used to produce an on-off cycle
timer.
• The timer is designed to switch on an
output for 5 s, then off for 5 s, then on for
5 s, then off for 5 s, and so on.
• When there is an input to In 1 and its
contacts close, timer 1 starts. Timer 1 is
set for a delay of 5s.
• After 5 s, it switches on timer 2 and the
output Out 1. Timer 2 has a delay of 5 s.
• After 5 s, the contacts for timer 2, which
are normally closed
• open. This results in timer 1, in the first
rung, being switched off. This
• then causes its contacts in the second
rung to open and switch off timer 2.
• This results in the timer 2 contacts
resuming their normally closed state
• and so the input to In 1 causes the cycle
to start all over again

COUNTERS
• Counters are provided as built-in elements in
PLCs and allow the number of occurrences of
input signals to be counted.
• This might be where items have to be counted as
they pass along a conveyor belt, or the number of
revolutions of a shaft, or perhaps the number of
people passing through a door.
• A counter is set to some preset number value and,
when this value of input pulses has been received,
it will operate its contacts. Thus normally open
contacts would be closed, normally closed
contacts opened

46
03-05-2023

Counter- Types
• There are two types of counter, though PLCs may
not include both types. These are down-counters
and up-counters.
• Down-counters count down from the preset value
to zero, i.e. events are subtracted from the set
value. When the counter reaches the zero value, its
contacts change state.Most PLCs offer down
counting.
• Up-counters count from zero up to the preset
value, i.e. events are added until the number
reaches the preset value. When the counter
reaches the set value, its contacts change state

Counters can be considered to consist of two basic elements: one


relay coil to count input pulses and one to reset the counter, the
associated contacts of the counter being used in other rungs.

47
03-05-2023

Figure 10.2 shows a basic counting


circuit. When there is a pulse input to In
1, the counter is reset.
When there is an input to In 2, the
counter starts counting. If the counter is
set for, say, 10 pulses, then when 10
pulse inputs have been received at In 2,
the counter’s contacts will close and
Figure 10.2 Basic there will be an output from Out 1.
counter program If at any time during the counting there
is an input to In 1, the counter will be
reset and start all over again and count
for 10 pulses.

On-off cycle timer


• Figure 9.8 shows how on-delay timers can be used
to produce an on-off cycle timer.
• The timer is designed to switch on an output for 5
s, then off for 5 s, then on for 5 s, then off for 5 s,
and so on.
• When there is an input to In 1 and its contacts
close, timer 1 starts. Timer 1 is set for a delay of 5s.
• After 5 s, it switches on timer 2 and the output Out
1. Timer 2 has a delay of 5 s.
• After 5 s, the contacts for timer 2, which are
normally closed

48
03-05-2023

Application of Timer- Example


• Flash light can be an example for timer application. Light flashes ”on”
“off” as long as supply is available . Thus we might have both timer 0
and timer 1 set to 1 s. When the output occurs, then timer 0 starts and
switches on after 1 s. This closes the timer 0 contacts and starts timer 1.
This switches on after 1 s and, in doing so, switches off timer 0. In so
doing, it switches off itself. The lamp is only on when timer 0 is on and so
we have a program to flash the lamp on and off as long as there is an
output.

49

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy