EBK ACTIVITIES MANUAL FOR PROGRAMMABLE
EBK ACTIVITIES MANUAL FOR PROGRAMMABLE
5th Edition
ISBN: 8220102795983
Author: Petruzella
Publisher: YUZU
Question
Book Icon
Chapter 11, Problem 1P
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 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”...

Blurred answer
Students have asked these similar questions
Explian this C program  #include <stdio.h> unsigned int rotateRight(unsigned int num, unsigned int bits) { unsignedint bit_count =sizeof(unsignedint) *8; bits = bits % bit_count; // Handle cases where bits >= bit_count return (num >> bits) | (num << (bit_count - bits)); } int main() { unsignedint num, bits; printf("Enter a number: "); scanf("%u", &num); printf("Enter the number of bits to shift: "); scanf("%u", &bits); printf("After rotation: %u\n", rotateRight(num, bits)); return0; }
Explian thiS C program #include<stdio.h> int countSetBits(int n) {    int count = 0;    while (n) {        count += n & 1;        n >>= 1;    }    return count;} int main() {    int num;    printf("Enter a number: ");    scanf("%d", &num);    printf("Output: %d units\n", countSetBits(num));    return 0;}
Please provide the Mathematica code
Knowledge Booster
Background pattern image
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
Systems Architecture
Computer Science
ISBN:9781305080195
Author:Stephen D. Burd
Publisher:Cengage Learning
Text book image
EBK JAVA PROGRAMMING
Computer Science
ISBN:9781337671385
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT
Text book image
Principles of Information Systems (MindTap Course...
Computer Science
ISBN:9781285867168
Author:Ralph Stair, George Reynolds
Publisher:Cengage Learning
Text book image
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
Computer Science
ISBN:9780357392676
Author:FREUND, Steven
Publisher:CENGAGE L
Text book image
C++ for Engineers and Scientists
Computer Science
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Course Technology Ptr
Text book image
Enhanced Discovering Computers 2017 (Shelly Cashm...
Computer Science
ISBN:9781305657458
Author:Misty E. Vermaat, Susan L. Sebok, Steven M. Freund, Mark Frydenberg, Jennifer T. Campbell
Publisher:Cengage Learning