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 depending 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.
Given:
- In the given figure, the instruction ADD is executed to add the values accumulated at “C5:0” and “C5:1” and the result will be stored at the address “N7:1”.
- The instruction GREATER THAN OR EQUAL (GEQ) is executed to activate the PL1 output.
- Here, the instruction will become true when the value accumulated at the address “N7:1” is greater than or equal to the constant value “350”.
Explanation of Solution
b.
Status of output PL1:
“No”, the output PL1 will not be energized when the accumulated value of counter “C5:0” and “C5:1” is “148” and “36” respectively.
Reason:
- The accumulated value of counter “C5:0” is “148” and the accumulated value of counter “C5:1” is “36”...
Explanation of Solution
c.
Value of the numbers stored:
Assume that the accumulated value of counter “C5:0” is “250” and the accumulated value of counter “C5:1” is “175”.
(1)
Value stored in “C5:0.ACC”:
Since, the given program stores the accumulated value of counter addressed at “C5:0”, the “C5:0.ACC” contains the value of the number “250”.
(2)
Value stored in “C5:1.ACC”:
Since, the given program stores the accumulated value of counter addressed at “C5:1”, the “C5:1.ACC”contains the value of the number “175”...
Explanation of Solution
d.
Status of output PL1:
“Yes”, the output PL1 will get energized when the accumulated value of counter “C5:0” and “C5:1” is “175” and “250” respectively.
Reason:
- The accumulated value of counter “C5:0” is “250” and the accumulated value of counter “C5:1” is “175”...
Want to see the full answer?
Check out a sample textbook solutionChapter 11 Solutions
Programmable Logic Controllers
- answer shoul avoid using AI and should be basic and please explainarrow_forwardNode A is connected to node B by a 2000km fiber link having a bandwidth of 100Mbps. What is the total latency time (transmit + propagation) required to transmit a 4000 byte file using packets that include 1000 Bytes of data plus 40 Bytes of header.arrow_forwardanswer should avoid using AI and should be basic and explain pleasearrow_forward
- answer should avoid using AI (such as ChatGPT), do not any answer directly copied from AI would and explain codearrow_forwardanswer should avoid using AI (such as ChatGPT), do not any answer directly copied from AI would and explain codearrow_forwardWrite a c++ program that will count from 1 to 10 by 1. The default output should be: 1, 2, 3, 4, 5, 6 , 7, 8, 9, 10 There should be only a newline after the last number. Each number except the last should be followed by a comma and a space. To make your program more functional, you should parse command line arguments and change behavior based on their values. Argument Parameter Action -f, --first yes, an integer Change place you start counting -l, --last yes, an integer Change place you end counting -s, --skip optional, an integer, 1 if not specified Change the amount you add to the counter each iteration -h, —help none Print a help message including these instructions. -j, --joke none Tell a number based joke. So, if your program is called counter, counter -f 10 --last 4 --skip 2 should produce 10, 8, 6, 4 Please use the last supplied argument. If your code is called counter, counter -f 4 -f 5 -f 6 should count from 6. You should…arrow_forward
- Systems ArchitectureComputer ScienceISBN:9781305080195Author:Stephen D. BurdPublisher:Cengage LearningEBK JAVA PROGRAMMINGComputer ScienceISBN:9781337671385Author:FARRELLPublisher:CENGAGE LEARNING - CONSIGNMENTPrinciples of Information Systems (MindTap Course...Computer ScienceISBN:9781285867168Author:Ralph Stair, George ReynoldsPublisher:Cengage Learning
- COMPREHENSIVE MICROSOFT OFFICE 365 EXCEComputer ScienceISBN:9780357392676Author:FREUND, StevenPublisher:CENGAGE LC++ for Engineers and ScientistsComputer ScienceISBN:9781133187844Author:Bronson, Gary J.Publisher:Course Technology PtrEnhanced Discovering Computers 2017 (Shelly Cashm...Computer ScienceISBN:9781305657458Author:Misty E. Vermaat, Susan L. Sebok, Steven M. Freund, Mark Frydenberg, Jennifer T. CampbellPublisher:Cengage Learning