EBK LOGIXPRO PLC LAB MANUAL FOR PROGRAM
5th Edition
ISBN: 8220102803503
Author: Petruzella
Publisher: YUZU
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# Sharp program to swap two numbers.Test Data:Input the First Number : 5Input the Second Number : 6Expected Output:After Swapping :First Number : 6.
Write a program using signed 8-bit variables that computes finalVal = 2*X + 3*Y - Z. X, Y, and Z should be variables that are created in your .data section. Additionally, start with X = 1; Y should be set to five times the value of X. Z should be two times the value of X. Only X should be set in the data section; Y and Z should start uninitialized and then set in the main procedure as described. Create the program in assembly to compute finalVal. Does the value that is computed make sense (show work). In separate runs of the program double your value of X continuing to set the values for X, Y, and Z such that Y = 5X and Z = 2X until the value stored in finalVal no longer make sense. What are the values of X, Y, and Z before and after the result stored is correct. Show the contents in memory and describe why the value in finalVal no longer makes sense.
Write a C program that calculates Xn and Yn for n = 1 - 12 and that displays the values in three columns: n ,Xn, Yn with correct headings.
Xn = 15(Xn-1) + 120
Yn = 2.5(Xn-1) + 4
Chapter 11 Solutions
EBK LOGIXPRO PLC LAB MANUAL FOR PROGRAM
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
- Please use C++ In this lab, you need to write a program which, given a seven digit binary input given below, it will check to see if there is a single bit error using the Hamming Code method discussed in lab. For a sample of Hamming Code, the input: 1110101 will reveal that ‘110’ is the location of the error (meaning the sixth slot in the input), so the corrected number would be 1010101, and the actual message transmitted, would be 1011, which is 11 in decimal. You can use this example to test your program to ensure it’s working correctly. Create a program which can, given a 7-bit long input, written in Hamming Code style, do the three following tasks, displaying the results as output. (1) Determine if there’s an incorrect bit, and if so, where it is. (2) Display what the CORRECT code should look like (if it needs to be corrected.) (3) Display the decimal form of the message that was sent, after any needed correction. Remember, when using Hamming…arrow_forwardDesign an FA (a DFA or an NFA) that only accepts numbers which are divisibles by 3 over the alphabet E={0,1,2,3,4,5,6,7,8,9} For example , it will accept 0,3,6,9,12,99,180,3120, ETC. But not 1,2,50 or 200arrow_forwardWrite 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.arrow_forward
- Here is the assignment Write a program that prints the multiplication table but inserts a randomly generated incorrect value between 1 and 50 into a cell whose row and column are randomly selected. Make sure the program does insert an incorrect value. For example, if row and column of 3 and 4 are randomly selected, keep generating a random number to print for that location until it's not the right value of 12. Then, ask the user to tell where in the table the incorrect number is located by entering the row and column of the incorrect number. Print whether the user was right or not. If he or she was right, ask for and read the correct value; if not, the program must give the correct location and the correct number. My main issue: is how to set up the multiplication table? I've only learned the basics in C++ (loops and if statements).arrow_forwardCreate a VBA algorithm that calculates the weighted grade of four exams of 10 students. Column 1 – Student’s Name Column 2 –Exam 1 Score Column 3 – Exam 2 Score Column 4 – Exam 3 Score Column 5 – Exam 4 Score Column 6 – Weighted Grade Formula of Weighted Grade: Weighted Grade = 30% Exam 1 + 25% Exam 2 + 25% Exam 3 + 20% Exam 4arrow_forwardSolve the below program in C language. Write a program in C to swap two numbers using function. Test Data :Input 1st number : 2Input 2nd number : 4Expected Output : Before swapping: n1 = 2, n2 = 4 After swapping: n1 = 4, n2 = 2arrow_forward
- Write a program to ask the user to enter one number and store the number in BL. Then check whether the number in BL is a divisible by FIVE (5) or not. If it is, move the number to CL. Otherwise, move the number to DL.arrow_forwardwrite pseudo code following this :arrow_forwardDesign an FA (a DFA or NFA ) that only accept number which are divisible by 3 over the alphabet £ = {0,1,2,3,4,5,6,7,8,9} For example , it will accept 0,3,6,9,12,99,180,3120, ect . But not 1,2,5 or 200 .arrow_forward
- Write a C Code program that performs the following • Prints your name And student number Reads number of positive integers, finds and prints the smallest even integer of them and counts its occurrences. Assume that the input end when the user enters-1 E.g:- if you entered 6 2 1 2 2 2 -1; the program find the smallest even integer is 2 and occurence count for 2 is 4arrow_forward(Statistical) In many statistical analysis programs, data values considerably outside the range of the majority of values are simply dropped from consideration. Using this information, write a C++ program that accepts up to 10 floating-point values from a user and determines and displays the average and standard deviation of the input values. All values more than four standard deviations away from the computed average are to be displayed and dropped from any further calculation, and a new average and standard deviation should be computed and displayed.arrow_forward(Program) Write a program that tests the effectiveness of the rand() library function. Start by initializing 10 counters, such as zerocount, onecount, twocount, and so forth, to 0. Then generate a large number of pseudorandom integers between 0 and 9. Each time 0 occurs, increment zerocount; when 1 occurs, increment onecount; and so on. Finally, display the number of 0s, 1s, 2s, and so on that occurred and the percentage of time they occurred.arrow_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