PROGRAMMABLE LOGIC CONTROLLERS (LL)
5th Edition
ISBN: 9781260844146
Author: Petruzella
Publisher: MCG
expand_more
expand_more
format_list_bulleted
Question
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.
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents 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.
Chapter 11 Solutions
PROGRAMMABLE LOGIC CONTROLLERS (LL)
Ch. 11 - Explain the function of math instructions as...Ch. 11 - Prob. 2RQCh. 11 - What standard format is used for PLC math...Ch. 11 - Prob. 4RQCh. 11 - Prob. 5RQCh. 11 - Prob. 6RQCh. 11 - Prob. 7RQCh. 11 - Prob. 8RQCh. 11 - Prob. 9RQCh. 11 - Prob. 10RQ
Ch. 11 - With reference to the instruction of Figure 11-34,...Ch. 11 - With reference to the instruction of Figure 11-35,...Ch. 11 - Prob. 1PCh. 11 - Prob. 4PCh. 11 - Prob. 5PCh. 11 - Prob. 7PCh. 11 - Prob. 8PCh. 11 - With reference to math instruction program shown...Ch. 11 - With reference to the math instruction program...Ch. 11 - Prob. 11PCh. 11 - Prob. 12P
Knowledge Booster
Similar questions
- Write a C# Sharp program to read the value of an integer m and display the value of n is 1 when m is larger than 0, 0 when m is 0 and -1 when m is less than 0. Test Data : -5Expected Output:The value of n = -1arrow_forwardWrite a computer program that produces the desired output from the given input. Input: Positive integer nOutput: Tables for addition and multiplication modulo narrow_forwardWrite the equivalent infix expression for the following postfix expressions.a. x y * z + t -b. x y z + * w u / - c. x y - z u / * t s + -d. x y z w + - *arrow_forward
- using c program Ask the user to input three decimal values, x, y, and z. Then, check if the value of z is within the range of x and y (inclusive). If it is, print "{z} is within {x} and {y}" on the next line, otherwise print "{z} is outside {x} and {y}".arrow_forwardConstruct a truth table for the statements belowa. (p ∧ q) ∧ (~r ∨ q).b. ~[~p ∧ (q ∧ r)]c. [p ∧ (q ∨ ~p)] → ~p then find the truth value of the statement givena. p is a false statement, q is a true statement and r is a true statement.b. p is a false statement, q is a false statement and r is a false statement.c. p is a false statement, q is a false statement and r is a true statement.arrow_forwardWhat is the postfix form of the expression ((x + y) 2) + ((x - 4)/3)arrow_forward
- Write a program in Python that accepts two integer inputs. One input will serve as the starting point and the other one serves as the ending point. Run a number through the range of starting and ending point. If the current number is a factor for the ending number, break it. Starting point is exclusive in factoring. Inputs 1. One line containing an integer for starting point 2. One line containing an integer for ending pointarrow_forwardWrite a C++ program that would ask a user to input time in seconds and then it prints this time duration in hours, minutes and seconds. Sample output Input time in seconds: 3672 Hours: 1 Minutes: 1 Seconds: 12 Input time in seconds: 61 Hours: 0 Minutes: 1 Seconds: 1arrow_forwardWrite C++ program to read Input x from user and print the value of : x2 + 3x -100.arrow_forward
- Write a C++ program to calculate Fubanaci numbers Xn, n=1,2,...,100 Xn+1 = Xn+ Xn-1, X0=1,, X1=1, n=1,2,...arrow_forwardWrite a Java program with Counter-Controlled Loop to output the following: N 10*N 100*N 1000*N1 10 100 10002 20 200 20003 30 300 30004 40 400 40005 50 500 5000 The output should look as shown above. The columns should be properly aligned.arrow_forwardWrite a program MIPS that asks the user to enter a signed number and read it. Then display the content of multiplying this number by 24.5arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- C++ for Engineers and ScientistsComputer ScienceISBN:9781133187844Author:Bronson, Gary J.Publisher:Course Technology PtrProgramming Logic & Design ComprehensiveComputer ScienceISBN:9781337669405Author:FARRELLPublisher:Cengage
C++ for Engineers and Scientists
Computer Science
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Course Technology Ptr
Programming Logic & Design Comprehensive
Computer Science
ISBN:9781337669405
Author:FARRELL
Publisher:Cengage