Programmable Logic Controllers
Programmable Logic Controllers
5th Edition
ISBN: 9780073373843
Author: Frank D. Petruzella
Publisher: McGraw-Hill Education
Question
Book Icon
Chapter 11, Problem 4P
Program Plan Intro

Math instruction:

  • Math instructions refer to all output instructions that uses the data of two words or registers and perform the desired function.
  • Math instructions are programmed based on the type of processor used.
  • The data manipulation instructions are almost similar to math instructions.
  • Math instructions are normally used to perform arithmetic functions on the values stored in memory words or registers.

Math functions:

The basic math functions performed by PLCs are as follows:

  • Addition
    • This function is used to add one piece of data to another.
    • It is also called as ADD.
  • Subtraction
    • This function is used to subtract one piece of data from another.
    • It is also called as SUB.
  • Multiplication
    • This function is used to multiply one piece of data by another.
    • It is also called as MUL.
  • Division
    • This function is used to divide one piece of data from another.
    • It is also called as DIV.

Terms used:

The following terms are used in the instruction.

  • Source A
    • Source A refers to the address of the first piece of data that is used in the instruction.
  • Source B:
    • Source B refers to the address of the second piece of data that is used in the instruction.
  • Destination
    • Destination refers to the address where the results of the instruction are stored.

Explanation of Solution

b.

Value stored in “N7:0”:

  • Consider the given word “N7:0”.
  • In the given program, the word “N7:0” addresses the destination of the “MUL” instruction.
  • Here, “Source A” and “Source B” of “MUL...

Explanation of Solution

c.

Value stored in “N7:1”:

  • Consider the given word “N7:1”.
  • In the given program, the word “N7:1” addresses the destination of the “DIV” instruction.
  • Here, “Source A” and “Source B” of “DIV...

Explanation of Solution

d.

Value stored in “O:013”:

  • Consider the given word “O:013”.
  • In the given program, the word “O:013” addresses the destination of the “ADD” instruction.
  • Here, “Source A” and “Source B” of “AD...

Blurred answer
Students have asked these similar questions
PROBLEM 2: Print the first five even numbers where: ctr = 0.
Answer asap code and output
For the following program line, perform the intermediate code conversion a) with short-circuit evaluation b) without short-circuit evaluation.
Knowledge Booster
Background pattern image
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
C++ for Engineers and Scientists
Computer Science
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Course Technology Ptr
Text book image
C++ Programming: From Problem Analysis to Program...
Computer Science
ISBN:9781337102087
Author:D. S. Malik
Publisher:Cengage Learning