Chapter 11 & 13 PLC Math Instructions Permission granted to reproduce for educational use only. 11 PLC Compare, Jump, and MCR Instructions.

Slides:



Advertisements
Similar presentations
PLC Selection, Components, and Communication
Advertisements

Programming Logic Gate Functions in PLCs
Unit 7 Discrete Controllers
Combinational Circuits
02/24/97 1 Rockwell Automation Hands-On Seminar Series.
PLC Timer Instructions
Flip-Flops, Registers, Counters, and a Simple Processor
10 PLC Math Instructions. 10 PLC Math Instructions.
Chapter 6 Introduction to Logic.
Creating Relay Logic Diagrams
Switchgears Control Using SCADA System Based on PLC
Programming Logic Controllers
Chapter 19 Fundamental PLC Programming
In a not gate, if the input is on(1) the output is off (0) and vice versa.
Timers.
6 PLC Programming. 6 PLC Programming Objectives List the rules for creating a PLC ladder logic diagram. Convert a relay logic diagram to a PLC ladder.
Number Systems and Codes
Programmable Logic Controllers
Advanced Instructions Most PLCs now support more advanced functions such as Floating point math, Boolean operations, Shifting, Sequencing, Program control.
Programmable Logic Controllers
MOV,MOVM,COP,FLL,BSL,BSR, FRD,TOD
Introduction to PLC Operation
Chapter 10 PLC Processors.
Program Control Instructions:
Memory Layout and SLC500™ System Addresses. Processor Memory Division An SLC 500 processor's memory is divided into two storage areas. Like two drawers.
Memory Layout and SLC500 System Addresses. Processor Memory Division An SLC 500 processor's memory is divided into two storage areas. Like two drawers.
Chapter 8.
©2008 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved. This material is protected under all copyright laws as they currently exist.
PLC Counter Instructions
Chapter 10 Advanced Programming, PLC Interfacing, and Troubleshooting
Chapter 33 Basic Logic Gates. 2 Objectives –After completing this chapter, the student should be able to: Identify and explain the function of the basic.
Exclusive OR Gate. Logically, the exclusive OR (XOR) operation can be seen as either of the following operations:exclusive OR (XOR) 1. A AND NOT B OR.
Copyright © 2002 Delmar Thomson Learning Chapter 10 PLC Processors.
Chapter 3 Digital Logic Structures. 3-2 Combinational vs. Sequential Combinational Circuit always gives the same output for a given set of inputs  ex:
Logic Functions and Symbols
CHAPTER-2 Fundamentals of Digital Logic. Digital Logic Digital electronic circuits are used to build computer hardware as well as other products (digital.
Timers and Counters by Dr. Amin Danial Asham. References  Programmable Controllers-Theory and Implementation, 2nd Edition, L.A. Bryan and E.A. Bryan.
Programmable Logic Controller (PLC)
PLC PROGRAMMING.
LADDER PROGRAMMING LANGUAGE by Dr. Amin Danial Asham.
Introduction to PLC Operation
Chapter 3 Digital Logic Structures. Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 3-2 Transistor: Building.
PROGRAMMABLE LOGIC CONTROLLER (PLC) AND AUTOMATION
Programmable Logic Controllers
CHAPTER 6 ARITHMETIC, LOGIC INSTRUCTIONS, AND PROGRAMS.
SHIFT REGISTERS A number of internal relays are grouped together to form a register. Provides storage area for a series sequence of individual bits. A.
MICROPROCESSOR DETAILS 1 Updated April 2011 ©Paul R. Godin prgodin gmail.com.
Microprocessor & Assembly Language
MECH 1500 Chapter 4. MECH 1500 The Binary Concept 4.1.
Chapter 33 Basic Logic Gates. Objectives After completing this chapter, you will be able to: –Identify and explain the function of the basic logic gates.
Programmable Logic Controller
Actuators and Control, Part 4 Grant Agreement No LLP UK-LEONARDO-LMP Project acronym: CLEM Project title: Cloud services for E-Learning.
Chapter 5.
1 Introduction to PLCs: Programming Counters ELMT Basic Programmable Logic Controllers Chapter 0x_W Source: www Based on Ch 8 of Frank D. Petruzella.
6 CHAPTER PLC Programming. 6 CHAPTER PLC Programming.
9 CHAPTER PLC Counter Instructions. 9 CHAPTER PLC Counter Instructions.
Exclusive OR Gate.
Chapter 10 © 2011, The McGraw-Hill Companies, Inc.
Chapter 12 © 2011, The McGraw-Hill Companies, Inc.
Comparison and Data-handling Instructions
Comparison and Data-Handling Instructions
Program Control Instructions.
Advanced Math Functions
Logic Gates.
S RAJARAJAN_ASST PROF, BSARCIS&T
Logic Gates.
Discussion D5.1 Section Sections 13-3, 13-4
Data manipulation Instructions
Presentation transcript:

Chapter 11 & 13 PLC Math Instructions

Permission granted to reproduce for educational use only. 11 PLC Compare, Jump, and MCR Instructions

Permission granted to reproduce for educational use only.© Goodheart-Willcox Co., Inc. Objectives Use a compare instruction to energize a coil. Cascade compare instructions to set upper and lower limits in a control system. Use the jump (JMP) instruction to skip over rungs in a PLC ladder logic diagram. Use multiple jump (JMP) instructions with multiple label (LBL) instructions in a PLC ladder logic diagram.

Permission granted to reproduce for educational use only.© Goodheart-Willcox Co., Inc. Objectives Use compare instructions to energize the jump (JMP) instructions. Use a master control reset (MCR) instruction to halt the operation of a section of a PLC ladder logic diagram.

Permission granted to reproduce for educational use only.© Goodheart-Willcox Co., Inc. Compare Instructions

Permission granted to reproduce for educational use only.© Goodheart-Willcox Co., Inc. Compare Instructions (Cont.) When a PLC is scanning a ladder logic diagram, sometimes one or more rungs should not be scanned. When a rung is not scanned, state of the instructions on the rung remains the same. Condition for skipping over rungs can be generated either by state of an input/contact or as result of a compare instruction.

Permission granted to reproduce for educational use only.© Goodheart-Willcox Co., Inc. Equal to (EQU) Source A must be a register. Source B can be either a register or a number.

Permission granted to reproduce for educational use only.© Goodheart-Willcox Co., Inc. Not Equal to (NEQ) Source A must be a register. Source B can be either a register or a number.

Permission granted to reproduce for educational use only.© Goodheart-Willcox Co., Inc. Less Than (LES) Source A must be a register. Source B can be either a register or a number.

Permission granted to reproduce for educational use only.© Goodheart-Willcox Co., Inc. Greater Than (GRT) Source A must be a register. Source B can be either a register or a number.

Permission granted to reproduce for educational use only.© Goodheart-Willcox Co., Inc. Less Than or Equal to (LEQ) Source A must be a register. Source B can be either a register or a number.

Permission granted to reproduce for educational use only.© Goodheart-Willcox Co., Inc. Greater Than or Equal to (GEQ) Source A must be a register. Source B can be either a register or a number.

Permission granted to reproduce for educational use only.© Goodheart-Willcox Co., Inc. Glossary Compare instructions: PLC instructions used to compare numerical values. Equal to (EQU): Instruction that lets current pass through when Source A is equal to Source B. Greater than (GRT): Instruction that lets current pass through when Source A is greater than Source B.

Permission granted to reproduce for educational use only.© Goodheart-Willcox Co., Inc. Glossary Greater than or equal to (GEQ): Instruction that lets current pass through when Source A is greater than or equal to Source B. Jump (JMP) instruction: When current flows through the JMP instruction (i.e., JMP is energized) rungs between the JMP and its similarly addressed LBL will not be scanned.

Permission granted to reproduce for educational use only.© Goodheart-Willcox Co., Inc. Glossary Less than (LES): Instruction that lets current pass through when Source A is less than Source B. Less than or equal to (LEQ): Instruction that lets current pass through when Source A is less than or equal to Source B.

Permission granted to reproduce for educational use only.© Goodheart-Willcox Co., Inc. Glossary Master control reset (MCR) instruction: When current stops flowing through the MCR instruction (i.e., MCR is de-energized), outputs on the rungs between the two MCR instructions will turn off. Not equal to (NEQ): Instruction that lets current pass through when Source A is not equal to Source B.

Permission granted to reproduce for educational use only.

13 PLC Logic and Bit Shift Instructions

Permission granted to reproduce for educational use only.© Goodheart-Willcox Co., Inc. Objectives Use the NOT instruction in PLC ladder logic diagrams. Use the AND instruction in PLC ladder logic diagrams. Use the OR instruction in PLC ladder logic diagrams. Use the XOR instruction in PLC ladder logic diagrams.

Permission granted to reproduce for educational use only.© Goodheart-Willcox Co., Inc. Objectives Cascade the NOT instruction to AND, OR, and XOR instructions to create NAND, NOR, and XNOR instructions. Create a PLC ladder logic diagram that uses the bit shift left (BSL) instruction. Create a PLC ladder logic diagram that uses the bit shift right (BSR) instruction.

Permission granted to reproduce for educational use only.© Goodheart-Willcox Co., Inc. Objectives Open a data file bit dialog box to monitor the operation of a bit shift right or a bit shift left instruction. Reset the bit shift left or the bit shift right instruction to its starting bit position.

Permission granted to reproduce for educational use only.© Goodheart-Willcox Co., Inc. Logic Gate Instructions Allen-Bradley SLC 500 series PLCs have four logic gate instructions: –NOT –AND –OR –XOR

Permission granted to reproduce for educational use only.© Goodheart-Willcox Co., Inc. Logic Gate Instructions (Cont.)

Permission granted to reproduce for educational use only.© Goodheart-Willcox Co., Inc. Logic Gate Instructions (Cont.) NOT, or invert, instruction: –Converts a logic high (1) to a logic low (0) and vice versa. AND instruction: –Generates a logic low (0) whenever one of the corresponding bits is 0.

Permission granted to reproduce for educational use only.© Goodheart-Willcox Co., Inc. Logic Gate Instructions (Cont.) OR instruction: –Generates a logic high (1) whenever at least one of the corresponding bits is 1. XOR instruction: –Generates a logic high (1) whenever the two corresponding bits in the word do not match.

Permission granted to reproduce for educational use only.© Goodheart-Willcox Co., Inc. Logic Gate Instructions (Cont.) Input words and the result of the logic instructions’ operations.

Permission granted to reproduce for educational use only.© Goodheart-Willcox Co., Inc. NAND Instruction Built by inverting the AND instruction.

Permission granted to reproduce for educational use only.© Goodheart-Willcox Co., Inc. NOR Instruction Built by inverting the OR instruction.

Permission granted to reproduce for educational use only.© Goodheart-Willcox Co., Inc. XNOR Instruction Built by inverting XOR instruction.

Permission granted to reproduce for educational use only.© Goodheart-Willcox Co., Inc. Status Bits In word S2:0 bits 0-3 in the processor status file (S2): Status Bit Description S2:0/0 Carry (C) S2:0/1 Overflow (O) S2:0/2 Zero (Z) S2:0/3 Sign (S)

Permission granted to reproduce for educational use only.© Goodheart-Willcox Co., Inc. Exclusive OR Instruction Output is high if one input is low and the second one is high.

Permission granted to reproduce for educational use only.© Goodheart-Willcox Co., Inc. Shift Left Instruction PLC shift instructions: –Often used to control display signs in a plant or outside. –Flashing arrow display showing that one lane in a highway is closed due to construction. –Can be constructed with a PLC bit shift instruction.

Permission granted to reproduce for educational use only.© Goodheart-Willcox Co., Inc. Shift Left Instruction (Cont.)

Permission granted to reproduce for educational use only.© Goodheart-Willcox Co., Inc. Bit Shift Left (BSL) Instruction When energized, shifts a bit to the left for every program scan. Control register must be used to hold the status flag bits. PLCs use the status flag bits in control registers to monitor and control the shift instruction.

Permission granted to reproduce for educational use only.© Goodheart-Willcox Co., Inc. Bit Address For a BSL instruction, bit in the starting position. Number of bits that are shifted determines the length. Unload bit: –Bit where the last shifted bit exits. Length

Permission granted to reproduce for educational use only.© Goodheart-Willcox Co., Inc. Bit Data File B3:0

Permission granted to reproduce for educational use only.© Goodheart-Willcox Co., Inc. Bit Shift Right (BSR) Instruction When energized, shifts a bit to the right for every program scan. Operation similar to operation of the bit shift left instruction.

Permission granted to reproduce for educational use only.© Goodheart-Willcox Co., Inc. Shift Right Instruction

Permission granted to reproduce for educational use only.© Goodheart-Willcox Co., Inc. Glossary Bit address: Parameter in the BSL and BSR instructions that indicate the starting bit position. Bit shift left (BSL) instruction: Instruction that shifts the bits in the data file to the left once for every low-to-high transition on its input.

Permission granted to reproduce for educational use only.© Goodheart-Willcox Co., Inc. Glossary Bit shift right (BSR) instruction: Instruction that shifts the bits in the data file to the right once for every low-to-high transition on its input. Control register (R6): Holds status flag bits. Length: Parameter in the BSL and BSR instructions that indicate the number of bits to be shifted.