Presentation is loading. Please wait.

Presentation is loading. Please wait.

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

Similar presentations


Presentation on theme: "Chapter 11 & 13 PLC Math Instructions Permission granted to reproduce for educational use only. 11 PLC Compare, Jump, and MCR Instructions."— Presentation transcript:

1

2 Chapter 11 & 13 PLC Math Instructions

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

4 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.

5 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.

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

7 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.

8 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.

9 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.

10 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.

11 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.

12 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.

13 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.

14 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.

15 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.

16 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.

17 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.

18 Permission granted to reproduce for educational use only.

19 13 PLC Logic and Bit Shift Instructions

20 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.

21 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.

22 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.

23 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

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

25 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.

26 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.

27 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.

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

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

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

31 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)

32 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.

33 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.

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

35 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.

36 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

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

38 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.

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

40 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.

41 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.


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

Similar presentations


Ads by Google