PLC - Logic Gates

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

Dr. D. Y.

Patil Institute of Engineering, Management, and Research,


Akurdi,Pune- 411044.
Mechanical Engineering Department

Mechatronics

Experiment No: 4

Name : Aakash Atul Virdhe (TME18250)

Aim: Ladder Diagram simulation, using suitable software, for logic gates

Technical Specifications- Allen-Bradley


MicroLogix1400
Execution time: 500-instruction program in only 1.56 ms.
Timers/Counters, Max : 40 timers; 32 counters (fixed)
Program Scan Time/K word: 2 ms Typical
Interfacing: Ethernet
Input Voltage: 24VDC
Output Voltage: 5VDC

Introduction-

Programmable Logic Controllers (PLCs):

A Programmable Logic Controller (PLC) is a specialized computer like device used to replace
banks of electromagnetic relays in industrial process control. The PLC is also known as a
programmable controller (PC). The tile "PC" for programmable controller could be confused
in common usage with "PC" used to mean personal computer. To avoid this confusion, we shall
refer to the programmable controller as a programmable logic controller or PLC.
The programmable logic controller as a heavy-duty computer system designed for machine
control. Like a general-purpose computer, the PLC is based on digital logic and can be
fieldprogrammed. The programming language is a bit different because the purpose of the PLC
is to control machines. The PLC is used to time and sequence functions that might be required
in assembly lines, robots, and chemical processing. It is designed to deal with the harsh
conditions of the industrial environment. Some of the physical environment problems could
include vibration and shock, dirt and vapors, and temperature extremes. The PLC commonly
has to interface with a wide variety of both input and output devices. Some input devices
include limit and pressure switches, temperature and optical sensors, and analog- to digital
converters (ADCs). Some output devices valves, motors and cylinders, and Digital-to-Analog
converts (DAC).

Before the advent of solid-state logic circuits, logical control systems were designed and built
exclusively around electromechanical relays. Relays are far from obsolete in modern design,
but have been replaced in many of their former roles as logic-level control devices, relegated
most often to those applications demanding high current and/or high voltage switching.

Systems and processes requiring "on/off" control abound in modern commerce and industry,
but such control systems are rarely built from either electromechanical relays or discrete logic
gates. Instead, digital computers fill the need, which may be programmed to do a variety of
logical functions.

In the late 1960s an American company named Bedford Associates released a computing
device they called the MODICON. As an acronym, it meant Modular Digital Controller, and
later became the name of a company division devoted to the design, manufacture, and sale of
these special-purpose control computers. Other engineering firms developed their own versions
of this device, and it eventually came to be known in non-proprietary terms as a PLC, or
Programmable Logic Controller.

The purpose of a PLC was to directly replace electromechanical relays as logic elements,
substituting instead a solid-state digital computer with a stored program, able to emulate the
interconnection of many relays to perform certain logical tasks.

A Programmable Logic Controller (PLC) is an industrial computer control system that


continuously monitors the state of input devices and makes decisions based upon a custom
program to control the state of output devices.
Almost any production line, machine function, or process can be greatly enhanced during this
type of control system. However, the biggest benefit of using a PLC is the ability to change
and replicate the operation or process while collecting and communicating vital information.
Functional Description-

A programmable controller manufactured by any company has several common functional


parts. The figure illustrates a generic PLC architecture

Fig: PLC architecture

The diagram shows Power Supply, I/O, central processor, memory, and programming and
peripheral device subsections. Each is discussed below.

1. Input System:

Inputs are defined as real-world signals giving the controller real-time status of process
variables. These signals can be analog or digital, low or high frequency, maintained or
momentary. Typically they are presented to the programmable controller as a varying voltage
current or resistance value. Signals from thermocouples (TCs) and resistance temperature
detectors (RTDs) are common examples of analog signals. Some flow meters and strain gauges
provide variable frequency signals, while pushbuttons, limit switches, or even
electromechanically relay contacts are familiar examples of digital, contact closure type
signals. One additional type of input signal, the register input, reflects the computer nature of
the programmable controller.
Inputs are devices that supply a signal/data to a PLC. Typical examples of inputs are push
buttons, switches, and measurement devices.

A discrete input also referred to as a digital input, is an input that is either in an ON or OFF
condition. Pushbuttons, toggle switches, limit switches, proximity switches, and contact
closures are examples of discrete sensors which are connected to the PLC discrete or digital
inputs. In the ON condition, a discrete input may be referred to as logic 1 or logic high. In the
OFF condition, a discrete input may be referred to as logic 0 or a logic low.
2. Outputs:

There are three common categories of outputs: Discrete, Register, and Analog. Discrete outputs
can be pilot lights, solenoid valves, or lamp box. Register output can drive panel meters or
displays; analog output scan drive signals to variable speed drives or to I/P (current to air)
converters and thus to control valves.
Outputs are devices that await a signal/data from the PLC to perform their control functions.
Lights, horns, motors, and valves are all good examples of output devices.

A discrete output is an output that is either in an ON or OFF condition. Solenoids, contactor


coils, and lamps are examples of actuator devices connected to discrete outputs. Discrete
outputs may also be referred to as digital outputs. In the following example, a lamp can be
turned on or off by the PLC output it is connected to.

3. Control Processor Unit (Real Time):


The central processor unit (CPU), or central control unit (CCU), performs the tasks necessary
to fulfill the PLC function. Among these tasks are scanning, I/O bus traffic control, program
execution, peripheral and external device communications, special function or data handling
execution (enhancements), and self-diagnostics.
One common way of rating how a PLC performs these tasks is its scan time. Scan time is
roughly defined as the time it takes for the programmable controller to interrogate the input
devices, execute the application program, and provide updated signals to the output devices.
Scan times can vary from 0.1 milliseconds per 1K (1024) words of logic to more than 50
milliseconds per 1 K of logic.
Therefore, when selecting a programmable controller other performance factors must be
considered. The user should take into account the application as well as the speed of the
controller.

4. Memory Unit:
The memory unit of the PLC serves several functions. It is the library where the application
program is stored. It is also where the PLC's executive is stored. An executive program
functions as the operating system of the PLC. It is the program that interprets, manages, and
executes the user's application program.
Finally, the memory unit is the part of the programmable controller where process data from
the input modules and control data for the output modules are temporarily stored as data tables.
Typically, an image of these data tables is used by the CPU and, when appropriate, sent to the
output modules.
Memory can be volatile or nonvolatile. Volatile memory is erased if power is removed.
Obviously, this is undesirable, and most units with volatile memory provide battery back up to
ensure that there will be no loss of program in the event of a power outage. Nonvolatile memory
does not change state on loss of power and is used in cases in which extended power outages
or long transportation time to the job site (after program entry) are anticipated. The basic
programmable controller memory element is the word. A word is a collection of 4, 8, 16, or 32
bits that are used to transfer data about the programmable controller. As word length increase
more information can be stored in a memory location.

5. Programmer Units:
The programmer unit provides an interface between the PLC and the user During Program
development, start-up, and troubleshooting. The instruction to be performed during each scan
are coded and inserted into memory with the programmer.
Programmers vary from small hand-held units the size of a large calculator to desktop
standalone intelligent CRT-based units. These units come complete with documentation,
reproduction, I/O status, and on-line and off-line programming ability. Many PLC
manufactures now offer controller models that can use a personal computer as a programming
tool.

Programming units are the liaison between what the PLC understands (words)and what the
engineer desires to occur during the control sequence. Some programmers have the ability to
store programs on other media, including cassette tapes and floppy disks. Another desirable
feature is automatic documentation of the existing program. This is accomplished by a printer
attached to the programmer. With off-line programming, the user can write a control program
on the programming unit, then take the unit to the PLC in the field and load the memory with
the new program, all without removing the PLC.
Selection of these features depends on user requirements and budget. On-line programming
allows cautions modification of the program while the PLC is controlling the process or the
machine.
Scan Cycle of PLC

Reading the inputs: RSLogix Micro Starter copies the state of the physical inputs to the
process-image input register.
Executing the control logic in the program: RSLogix Micro Starter executes the instructions
of the program and stores the values in the various memory areas.
Processing any communications requests: RSLogix Micro Starter performs any tasks
required for communications.
Executing the CPU self-test diagnostics: RSLogix Micro Starter ensures that the firmware,
the program memory, and any expansion modules are working properly.
Writing to the outputs: The values stored in the process-image output register are written to
the physical outputs.
Study of logic gate-

1. OR gate

Symbol Truth table

Ladder Diagram:

Explanation:

 The OR gate gets its name from the fact that it behaves after the fashion of the logical
inclusive "or."
 The output is "true" if either or both of the inputs are "true." If both inputs are "false,"
then the output is "false."
2. AND gate

Symbol Truth table

A B Output A.B
0 0 0
0 1 0
1 0 0
1 1 1

Ladder Diagram:

Explanation:

 AND logic circuit represents series circuit.


 AND gate is composed with two inputs and one input.
 AND gate produce output when both the inputs are HIGH state.
 Now, the lamp energies only if contact A and contact B are simultaneously actuated.
 A path exists for current from wire L1 to the lamp(wire 2) if and only if both switch
contacts are closed.
3. NOT gate

Symbol Truth table

A Output
0 1
1 0

Ladder Diagram:

Explanation:

 The logical inversion, or NOT, function can be performed on a contact input simply
by using a normally-closed contact instead of a normally-open contact.
 Now, the lamp energizes if the contact is not actuated, and de-energizes when the
contact is actuated.
4. NAND gate

Symbol Truth table

A B Output
0 0 1
0 1 1
1 0 1
1 1 0

Ladder Diagram:

Explanation:

 Arrangement shows AND gate followed by NOT gate. Hence it is called NOT AND
gate.
 Both the inputs A and B have to be at low state to get the output at HIGH state.
 NAND gate is composed of two or more input with a single output.
 Any one input is in low state also output will be high state.
5. NOR gate

Symbol Truth table

A B Output
0 0 1
0 1 0
1 0 0
1 1 0

Ladder Diagram:

Explanation:

 NOR Gate is operated OR Gate followed by the NOT gate.


 When both inputs are low then the output will be high. Otherwise, the low output will
occur.
 If both inputs are high. If we take our AND function and invert each “input” through
the use of normally closed contacts, we will end up with NOR function.
6. XOR gate

Symbol Truth table

A B Output
0 0 0
0 1 1
1 0 1
1 1 0

Ladder Diagram:

Explanation:

 We can build combinational logic functions by grouping contacts in series-parallel


arrangements, as well. In the following example, we have an Exclusive-OR function
built from a combination of AND, OR, and inverter (NOT) gates.
 The top rung (NC contact A in series with NO contact B) is the equivalent of the top
NOT/AND gate combination.
 The bottom rung (NO contact A in series with NC contact B) is the equivalent of the
bottom NOT/AND gate combination.
 The parallel connection between the two rungs at wire number 2 forms the equivalent
of the OR gate, in allowing either rung 1 or rung 2 to energize the lamp.
7. XNOR gate

Symbol Truth table

B A Output
0 0 1
0 1 0
1 0 0
1 1 1

Ladder Diagram:

Explanation:

 By connecting two XIO contacts in series with parallel to two XIC contacts in series, EX-
NOR gate can be implemented.
 When both inputs are identical A=B=O or A=B=1, output goes high.
 It implies same here as in EX-OR gate that address must be given same.
 By inverting output of EX-OR gate, implementation of EX-NOR can be accomplished.

Conclusion:

From this experiment, we have studied about PLC and Logic gates, Ladder Diagram
Simulation using PLC Ladder Simulator, for logic gates and we have concluded following
points:

 Parallel contacts are logically equivalent to an OR gate.


 Series contacts are logically equivalent to an AND gate.
 Normally closed (N.C.) contacts are logically equivalent to a NOT gate
 A relay must be used to invert the output of a logic gate function, while simple
normally-closed switch contacts are sufficient to represent inverted gate inputs.

You might also like