Programming Logic Gate Functions in PLCs

Slides:



Advertisements
Similar presentations
Logic Gates A logic gate is an elementary building block of a digital circuit Most logic gates have two inputs and one output At any given moment, every.
Advertisements

Logic Gates.
CT455: Computer Organization Logic gate
Lecture 6 More Logic Functions: NAND, NOR, XOR and XNOR
ECE 2373 Modern Digital System Design Exam 2. ECE 2372 Exam 2 Thursday March 5 You may use two 8 ½” x 11” pages of information, front and back, write.
1 COMP541 Combinational Logic Montek Singh Jan 16, 2007.
Chapter 4 Gates and Circuits.
Chapter 4 Logic Gates and Boolean Algebra. Introduction Logic gates are the actual physical implementations of the logical operators. These gates form.
EET 1131 Unit 5 Boolean Algebra and Reduction Techniques
In this module you will learn: What the various logic gates do. How to represent logic gates on a circuit diagram. The truth tables for the logic gates.
Lecture 3. Boolean Algebra, Logic Gates Prof. Sin-Min Lee Department of Computer Science 2x.
Chapter 4 Gates and Circuits. 4–2 Chapter Goals Identify the basic gates and describe the behavior of each Describe how gates are implemented using transistors.
EEE324 Digital Electronics Ian McCrumRoom 5B18, Lecture 4: Boolean Algebra.
Logical Circuit Design Week 5: Combinational Logic Circuits Mentor Hamiti, MSc Office ,
Module 3.  Binary logic consists of :  logic variables  designated by alphabet letters, e.g. A, B, C… x, y, z, etc.  have ONLY 2 possible values:
1 Fundamentals of Computer Science Propositional Logic (Boolean Algebra)
XOR and XNOR Logic Gates. XOR Function Output Y is TRUE if input A OR input B are TRUE Exclusively, else it is FALSE. Logic Symbol  Description  Truth.
Logic gates & Boolean Algebra. Introduction Certain components (called logic elements) of the computer combine electric pulses using a set of rules. Electric.
Digital Logic Chapter 4 Presented by Prof Tim Johnson
BOOLEAN ALGEBRA Saras M. Srivastava PGT (Computer Science)
DeMorgan Theorem, Computer Simulation Exercises
1 The Chinese University of Hong Kong Faculty of Education Diploma in Education (Part-Time) Winter 1997 Educational Communications and Technology Assignment.
Lecture 22: 11/19/2002CS170 Fall CS170 Computer Organization and Architecture I Ayman Abdel-Hamid Department of Computer Science Old Dominion University.
Week 6: Gates and Circuits: PART I READING: Chapter 4.
Chapter 3: Digital Logic Dr Mohamed Menacer Taibah University
Sneha.  Gates Gates  Characteristics of gates Characteristics of gates  Basic Gates Basic Gates  AND Gate AND Gate  OR gate OR gate  NOT gate NOT.
LOGIC CIRCUITLOGIC CIRCUIT. Goal To understand how digital a computer can work, at the lowest level. To understand what is possible and the limitations.
Floyd, Digital Fundamentals, 10 th ed Digital Fundamentals Tenth Edition Floyd Chapter 5 © 2008 Pearson Education.
Logic Gates. A logic gate is an elementary building block of a digital circuit. Most logic gates have two inputs and one output. At any given moment,
Karnaugh Map and Circuit Design.
BOOLEAN ALGEBRA AND LOGIC SIMPLIFICATION
CHAPTER 1 INTRODUCTION TO DIGITAL LOGIC
BOOLEAN ALGEBRA LOGIC GATES. Introduction British mathematician George Boole( ) was successful in finding the link between logic and mathematics.
MECH 1500 Chapter 4. MECH 1500 The Binary Concept 4.1.
©2008 The McGraw-Hill Companies, Inc. All rights reserved. Digital Electronics Principles & Applications Seventh Edition Chapter 4 Using Logic Gates Roger.
Circuit Synthesis A logic function can be represented in several different forms:  Truth table representation  Boolean equation  Circuit schematic 
Chapter 11 & 13 PLC Math Instructions Permission granted to reproduce for educational use only. 11 PLC Compare, Jump, and MCR Instructions.
Basics of Logic gates - Part 1
Combinational Circuits Part 1
Digital Logic.
Dr.Ahmed Bayoumi Dr.Shady Elmashad
Logic Gates and Boolean Algebra
Digital Fundamentals Floyd Chapter 5 Tenth Edition
Logic Gates, Boolean Algebra and Karnaugh Maps
Logic Gates.
Logic Gates Benchmark Companies Inc PO Box Aurora CO
KS4 Electricity – Electronic systems
KS4 Electricity – Electronic systems
Fundamentals & Ethics of Information Systems IS 201
Reading: Hambley Chapters
Karnaugh Maps (K-Maps)
Computer Science 210 Computer Organization
Agenda – 2/12/18 Questions? Readings: CSI 4, P
BASIC & COMBINATIONAL LOGIC CIRCUIT
Logic Gates.
Boolean Logic Boolean Logic is considered to be the basic of digital electronics. We know that a computer’s most basic operation is based on digital electronics.
Logic Gates.
KS4 Electricity – Electronic systems
ECB2212-Digital Electronics K-Map
Digital Fundamentals Floyd Chapter 5 Tenth Edition
GCSE Computer Science – Logic Gates & Boolean Expressions
Logic Gates By Dr.Mazin Alzewary
Dr. Clincy Professor of CS
Chapter 4 Gates and Circuits.
Digital Fundamentals Floyd Chapter 5 Tenth Edition
Digital Fundamentals Floyd Chapter 5 Tenth Edition
Analysis of Logic Circuits Example 1
Combinational Logic Circuit
Principles & Applications
What are Logic Gates?.
Presentation transcript:

Programming Logic Gate Functions in PLCs 7 Programming Logic Gate Functions in PLCs

Objectives Describe combinational and sequential logic gate circuits. Create PLC ladder logic programs for NOT, AND, OR, NAND, NOR, XOR, and XNOR logic gates. Create Boolean expressions and logic gate circuits from truth tables. © Goodheart-Willcox Co., Inc.

Objectives Use the Logic Converter instrument in NI Multisim to create logic tables and Boolean expressions from logic gate circuits. Convert Boolean expressions to PLC ladder logic diagrams. Convert PLC ladder logic diagrams to logic gate circuits and Boolean expressions. © Goodheart-Willcox Co., Inc.

Combinational Logic Gates Do not require clock pulses to operate. Outputs depend only on their inputs. Outputs are generated instantaneously. Simply called logic gates. © Goodheart-Willcox Co., Inc.

Logic Gates NOT. AND. OR. NAND. NOR. XOR (exclusive OR). XNOR (exclusive NOR). © Goodheart-Willcox Co., Inc.

Sequential Logic Devices Have outputs that depend on their inputs as well as time. Require clock pulses. An inherent delay time is always present. Flip-flop devices. © Goodheart-Willcox Co., Inc.

Sequential Logic Circuit © Goodheart-Willcox Co., Inc.

Boolean Expressions Every gate logic function has its own equation called a Boolean expression. Boolean algebra: Two states are true and false. © Goodheart-Willcox Co., Inc.

Boolean Expressions (Cont.) True state: Represented by the number one, called logic high or logic one in Boolean algebra. False state: Represented by the number zero, called logic low or logic zero. © Goodheart-Willcox Co., Inc.

Boolean Expressions (Cont.) Logic high: Represented by the presence of a voltage potential. Represented with five volts (+5 V). Logic low: Represented by the absence of a voltage potential. Represented with zero volts (0 V). © Goodheart-Willcox Co., Inc.

Truth Tables In Boolean algebra, a table contains the digital input and output points. This table is called a truth table. © Goodheart-Willcox Co., Inc.

Gate Symbols For every combinational and sequential logic device. Used to create logic gate circuits. © Goodheart-Willcox Co., Inc.

NOT Gate Output is the inverse of the input. Sometimes called an inverter. Function is simulated by the electric circuit displayed. © Goodheart-Willcox Co., Inc.

AND Gate Two-input AND logic gate symbol, its Boolean expression, and its truth table. © Goodheart-Willcox Co., Inc.

OR Gate Two-input OR logic gate symbol, its Boolean expression, and its truth table. © Goodheart-Willcox Co., Inc.

NAND Gate Two-input NAND logic gate symbol, Boolean expression, and its truth table. © Goodheart-Willcox Co., Inc.

NOR Gate A two-input NOR logic gate symbol, its Boolean expression, and its truth table. © Goodheart-Willcox Co., Inc.

XOR (exclusive OR) Gate XOR logic gate symbol, its Boolean expression, and its truth table. © Goodheart-Willcox Co., Inc.

XNOR (exclusive NOR) Gate XNOR logic gate symbol, its Boolean expression, and its truth table. © Goodheart-Willcox Co., Inc.

Simplifying Boolean Expressions To convert a truth table to a PLC ladder logic diagram: Find its simplified Boolean expression. Use the gate logic to PLC ladder diagram conversion routine to create the PLC ladder logic diagram. © Goodheart-Willcox Co., Inc.

Simplifying Boolean Expressions (Cont.) Three methods used to simplify Boolean expressions: Karnaugh maps. Quine-McCluskey routine. Electronic simulation software. © Goodheart-Willcox Co., Inc.

Karnaugh Maps (K-Map) Graphical representations of truth tables. Use columns and rows to represent each term in a truth table. For an n-variable input truth table, there are 2n boxes in a Karnaugh map. A box for every line in the truth table. © Goodheart-Willcox Co., Inc.

Karnaugh Maps (K-Map) (Cont.) © Goodheart-Willcox Co., Inc.

Using K-Maps Use the following steps to simplify the Boolean expressions using K-Maps: Select an appropriate K-Map that has the correct number of input boxes, such as two-input and three-input. As stated, for an n-variable input truth table, there will be 2n boxes. Therefore, for a two-variable (A and B) input table, there will be 22 boxes, or 4 boxes. Plot only the terms in which Y = 1. © Goodheart-Willcox Co., Inc.

Using K-Maps (Cont.) 3. Follow the rules below for grouping the 1s in the K-Map that lead to simplifying the expression. © Goodheart-Willcox Co., Inc.

Using K-Maps (Cont.) Each group must contain an even number of binary 1s. © Goodheart-Willcox Co., Inc.

Using K-Maps (Cont.) Every 1 in adjacent cells must be included in a group. The same 1 can be used in two or more overlapping groups. Each group should be as large as possible. © Goodheart-Willcox Co., Inc.

Using K-Maps (Cont.) Map can be considered closed, so that end boxes are grouped adjacently (top and bottom, or left and right). © Goodheart-Willcox Co., Inc.

Using K-Maps (Cont.) How groups wrap around the K-Map. © Goodheart-Willcox Co., Inc.

Using K-Maps (Cont.) 4. Write the Boolean expressions for each group, and then simplify the expression. © Goodheart-Willcox Co., Inc.

Using K-Maps (Cont.) 5. Sum common variables from each group to create simplified sum of product (SOP) Boolean expression. © Goodheart-Willcox Co., Inc.

Quine-McCluskey Routine For more than five input variables, a better method for simplifying Boolean expressions. Complicated method that uses the Boolean algebraic simplification rules to find the simplified Boolean expression. Might be used in an advanced course. © Goodheart-Willcox Co., Inc.

Electronic Simulation Software Easiest method to find simplified Boolean expression: Enter input and output data. Solves and simplifies the expression. NI Multisim is an example of this software. © Goodheart-Willcox Co., Inc.

NI Multisim Software Open NI Multisim program. From the Instruments toolbar, click the Logic Converter icon. Click a space in the work area to place the converter. Double-click the Logic Converter image to open the Logic Converter dialog box. © Goodheart-Willcox Co., Inc.

Creating PLC Ladder Logic Diagrams from Logic Gate Circuits Convert each gate to its equivalent ladder logic diagram. © Goodheart-Willcox Co., Inc.

Creating PLC Ladder Logic Diagrams from Boolean Expressions Some manufacturers use Boolean expressions to program PLCs. Example Create the PLC ladder logic diagram for the following Boolean expression. Y = A′ + B + CD + EB © Goodheart-Willcox Co., Inc.

Creating PLC Ladder Logic Diagrams from Boolean Expressions (Cont.) To create the diagram, each rung or each portion of a rung is created by replacing the Boolean letter with the inputs that match. © Goodheart-Willcox Co., Inc.

PLC Ladder Logic Diagrams from Boolean Expressions © Goodheart-Willcox Co., Inc.

Creating Logic Gate Circuits from PLC Ladder Logic Diagrams Converting to logic gate circuits: Find Boolean expression that represents ladder logic diagram. Draw the logic gate circuit using the Boolean expression similar. Use logic converter instrument in NI Multisim program to find truth tables and Boolean expressions. © Goodheart-Willcox Co., Inc.

Creating Logic Gate Circuits from PLC Ladder Logic Diagrams (Cont.) Create the logic gate circuit for the PLC ladder logic diagram displayed. © Goodheart-Willcox Co., Inc.

Creating Logic Gate Circuits from PLC Ladder Logic Diagrams (Cont.) Turn the PLC ladder logic diagram into a Boolean expression as shown in the ladder diagram. © Goodheart-Willcox Co., Inc.

Glossary AND gate: Gate that only generates a logic high output when all inputs are logic high. Boolean algebra: Form of mathematics that uses two conditions or states: true and false. Boolean expression: Names for equations in Boolean algebra. © Goodheart-Willcox Co., Inc.

Glossary Combinational logic gates: Logic devices in which the output of the device is dependent only on the present inputs to the device. There is no dependency on past inputs. Combinational logic gates do not require clock pulses to operate. False state: State represented in digital electronics with a number zero. Gate symbols: Symbols used to display logic gate devices. © Goodheart-Willcox Co., Inc.

Glossary Karnaugh map: A tool that can be used to simplify Boolean expressions. This is an older, difficult method for Boolean expression simplification. Logic high: State in digital electronics that is represented with 5 volts. Also called logic one. Logic low: State in digital electronics that is represented with zero volts. Also called logic zero. © Goodheart-Willcox Co., Inc.

Glossary NAND gate: Gate that does not generate a logic high output when all inputs are logic low. An inverted AND. NOR gate: Gate that generates a logic high output when all inputs are logic low. An inverted OR. NOT gate: Gate that generates a logic high output when all inputs are logic low. © Goodheart-Willcox Co., Inc.

Glossary OR gate: Gate that generates a logic high output in all states except when all inputs are logic low. Quine-McCluskey routine: Tool used as an advanced Boolean expression simplification routine. © Goodheart-Willcox Co., Inc.

Glossary Sequential logic devices: Logic devices in which the output of the device is dependent on the present and past inputs to the device. Sequential logic devices require clock pulses to operate. True state: State in digital electronics that is represented with a number 1. © Goodheart-Willcox Co., Inc.

Glossary Truth table: Table used to map Boolean expressions. Truth tables contain Boolean expression inputs and outputs. XNOR gate: Gate that generates a logic high output when either both inputs are logic high or both inputs are logic low. © Goodheart-Willcox Co., Inc.

Glossary XOR gate: Gate that generates a logic high output when one input is logic high and the other input is logic low or vice versa. © Goodheart-Willcox Co., Inc.