LogixPro PLC Lab Manual for Programmable Logic Controllers
LogixPro PLC Lab Manual for Programmable Logic Controllers
5th Edition
ISBN: 9781259680847
Author: Frank D. Petruzella
Publisher: McGraw-Hill Education
Question
Book Icon
Chapter 11, Problem 5P
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.

MOV instruction:

  • Move (MOV) instruction is used to copy the data of the source register into destination register.
  • Here, the contents of the source register will not be altered.
  • In other words, it is used to copy the value in one word or register to another word or register.

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.

Blurred answer
Students have asked these similar questions
Write a C program that reads an integer n from the keyboard and prints out the factorial of n. Test data and expected output: Enter an integer:6 Factorial of 6 is 720 Enter an integer:-3 n must be non-negative
Write a program that checks the initial value in memory location x4000 to see if it is a valid ASCII code and if it is a valid ASCII code, print the character. If the value in x4000 is not a valid ASCII code, the problem prints nothing.
Using only sll and srl, implement a program to check if a user input value is even or odd.The program should read a user input integer, and print out "The number is even" if thenumber is even, or "The number is odd", if the number is odd.
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
Programming Logic & Design Comprehensive
Computer Science
ISBN:9781337669405
Author:FARRELL
Publisher:Cengage