Download presentation

Presentation is loading. Please wait.

Published byDinah McLaughlin Modified over 2 years ago

2
10 PLC Math Instructions

3
Objectives Program the add instruction in the PLC ladder logic diagram. Program the subtract instruction in the PLC ladder logic diagram. Program the multiply instruction in the PLC ladder logic diagram. Program the divide instruction in the PLC ladder logic diagram. © Goodheart-Willcox Co., Inc.

4
**Addition Add (ADD) instruction has three operands:**

Two operands hold source data (Source A and Source B), which are added together. Either both sources can be registers or one source can be a register while the other one is a number. Third operand is the destination. © Goodheart-Willcox Co., Inc.

5
Addition (Cont.) Add instruction for Allen-Bradley SLC 500 series PLC displayed in block format. © Goodheart-Willcox Co., Inc.

6
**Description of Status Bits**

© Goodheart-Willcox Co., Inc.

7
**Subtraction Subtract (SUB) instruction has three operands:**

Two operands, Source A and Source B, hold the source data. Content of Source B is subtracted from Source A. Result is placed in the destination. © Goodheart-Willcox Co., Inc.

8
Subtraction (Cont.) Subtract instruction for the Allen-Bradley SLC 500 series PLC displayed in block format. © Goodheart-Willcox Co., Inc.

9
**Multiplication Multiply (MUL) instruction has three operands:**

Two operands hold the source data (Source A and Source B). Either both sources can be registers, or one source can be a register while the other one is a number. Destination must be a register. © Goodheart-Willcox Co., Inc.

10
**Multiplication (Cont.)**

Multiply instructions in SLC 500 series PLCs displayed in block format. © Goodheart-Willcox Co., Inc.

11
**Division Divide (DIV) instruction has three registers:**

Two registers hold the source data (Source A and Source B). Either both sources can be registers or one source can be a register while the other one is a number. Destination must be a register. © Goodheart-Willcox Co., Inc.

12
Division (Cont.) Divide instructions in SLC 500 series PLCs displayed in block format. © Goodheart-Willcox Co., Inc.

13
**Advanced Math Instructions**

Advanced math instructions are used to perform mathematical computations. © Goodheart-Willcox Co., Inc.

14
**Advanced Math Instructions (Cont.)**

Compute (CPT) instruction may be used to solve mathematical equations. © Goodheart-Willcox Co., Inc.

15
**Advanced Math Instructions Example**

Given the following equation, you can use the CPT instruction to solve it. Y = (A × (ln B) × eC) + (tan D) © Goodheart-Willcox Co., Inc.

16
**Advanced Math Instructions Example (Cont.)**

First assign floating point register locations for the parameters in the equation. Note that integer registers such as N7:0 hold integer numbers. Floating point registers such as F8:0 hold a real number that has both integer and fractional part. © Goodheart-Willcox Co., Inc.

17
**Advanced Math Instructions Example (Cont.)**

Assigned registers are: A = F8:0 B = F8:1 C = F8:2 D = F8:3 Y = F8:4 © Goodheart-Willcox Co., Inc.

18
**Advanced Math Instructions Example (Cont.)**

Normally open contact I:1/0 is closed, equation in CPT instruction block calculated. Result is placed in floating point register four (F8:4). © Goodheart-Willcox Co., Inc.

19
**PLC Ladder Logic Diagram**

© Goodheart-Willcox Co., Inc.

20
**Commonly Used Math Instructions**

© Goodheart-Willcox Co., Inc.

21
Glossary Add (ADD) instruction - Instruction that calculates the sum of Source A and Source B. Divide (DIV) instruction - Instruction that calculates the quotient that results from dividing Source A by Source B. © Goodheart-Willcox Co., Inc.

22
Glossary Multiply (MUL) instruction - Instruction that calculates the product of Source A and Source B. Subtract (SUB) instruction - Instruction that calculates the difference between Source A and Source B. © Goodheart-Willcox Co., Inc.

Similar presentations

Presentation is loading. Please wait....

OK

PLC Counter Instructions

PLC Counter Instructions

© 2017 SlidePlayer.com Inc.

All rights reserved.

Ads by Google

Ppt on classical economics theory Ppt on acid-base titration lab Ppt on computer graphics and multimedia Ppt on conference call etiquette participants Ppt on product specification file Ppt on bmc remedy user What does appt only mean Ppt on cross cultural differences Ppt on wastage of time energy and money Ppt on question tags rules