Programmable Logic Controllers
5th Edition
ISBN: 9780073373843
Author: Frank D. Petruzella
Publisher: McGraw-Hill Education
expand_more
expand_more
format_list_bulleted
Concept explainers
Question
Chapter 9, Problem 1RQ
Program Plan Intro
a.
Master Control Reset (MCR) instructions:
- The MCR instruction is used to clear all set outputs within the fenced zone.
- In other words, it turns off all the non-retentive outputs in the fenced zone.
- Non-retentive outputs cannot retain their memory when they are de-energized.
- The MCR instruction within the zone are still scanned, but the scan time is reduced due to the false state of non-retentive outputs.
Expert Solution
Explanation of Solution
- In order to control a program section, two MCR output instructions are programmed.
- The fenced zone which needs to be controlled begins with one MCR instruction and the other MCR instruction at the end.
- An MCR rung with conditional inputs is placed at the beginning of the program section to be controlled.
- An MCR rung with no conditional inputs is placed at the end of the program section to be controlled.
- If the first MCR instruction becomes true, then all the outputs present in between the two MCR instructions will act according to the logic.
- If the MCR instruction becomes false, then all the non-retentive outputs will be de-energized and all the retentive outputs will retain their previous state.
Explanation of Solution
b.
False-to-true transition:
- When the MCR instruction makes a false-to-true transition, all rung outputs within the program section will be controlled by their respective input conditions.
- Initially, when the MCR instruction in the rung is false, all the rungs within the zone are made inactive and de-energizes all non-retentive outputs.
- Hence, all retentive devices such as latches will remain in their previous state.
Explanation of Solution
c.
True-to-false transition:
- When the MCR instruction makes a true-to-false transition, all non-retentive outputs within the program section will be de-energized.
- At the same time, all the retentive outputs within the fenced zone will remain in their previous state.
- Initially, when the MCR instruction in the rung is true, all the rungs within the zone are scanned and the outputs are energized and updated based on their logic.
- When the MCR instruction undergoes a transition from true-to-false, the scan ignores the input and de-energizes all the non-retentive outputs.
- Hence, all the retentive devices like latches, timers will remain in their previous state.
Want to see more full solutions like this?
Subscribe now to access step-by-step solutions to millions of textbook problems written by subject matter experts!
Students have asked these similar questions
The program counter (PC) contains the address of the next instruction -pair to be fetched from memory?
a. True
O b. false
Computer Science - Assembly language code:
Q1. A)
A microprocessor is wired into a sensing control circuit so that the memory locations 42 and 43 each
contain the values 0 or 1.
Memory location 50 is connected to a light switch.
When the value in 50 is 1 the light is on and when it is 0 the light is off.
Write a program to switch on the light on when the values in locations 42 and 43 are both 1, and to
switch off the light when the values in locations 42 and 43 are both 0.
Only use the ARM assembly language instructions, MOV, JMP and JNZ.
Assume that the MOV instruction updates the flags with the status register.
The AAS instruction
adjusts the result of the subtraction of two unpacked BCD values to create an
unpacked BCD result.
O adjusts the result of the addition of two packed BCD values to create an
unpacked BCD result.
O Adjusts the result of the addition or subtraction of two packed BCD values to
create a packed BCD result.
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Similar questions
- The control signal 'ALUSrc' controls the multiplexor whose output goes into the ALU. The inputs to this multiplexor are the 'Read Data 2' from the 'Register' block and the 32-bit wide sign-extended offset from the instruction. If the instruction is a 'load word' (Iw), which of these two inputs will this control signal propagate to the multiplexor output and hence to the ALU input? Choose the best answer. Since the command is a lw, the 'Read Data 2' needs to be propagated to the ALU Since the command is a lw, the offset needs to be propagated to the ALU O This is a trick question. There is no need for the sign-extended offset to be input to the ALU as it only gets data from the registers Since this is a lw instruction, the ALU does not come into the picture at all as this datapath goes directly to the Data Memory bypassing the ALU. This is a 'dont-care' situationarrow_forwardBoth the source and the destination are left unchanged when using a CMP instruction.Decide on one of the following:True \Falsearrow_forward(d) The table below shows the ALUcontrol signal of the datapath we discussed in class. Instruction Funct ALU Орсode ALUop ALU action operation field control Iw 00 load word XXXXXX add 0010 Sw 00 store word XXXXXX add 0010 beq 01 branch equal subtract 0110 XXXXXX R-type 10 add 100000 add 0010 R-type 10 subtract 100010 subtract 0110 R-type 10 AND 100100 AND 0000 R-type 10 OR 100101 OR 0001 R-type 10 set on less than 101010 set on less than 0111 You want to add the bne instruction into the datapath, which already includes the required hardware for the instruction. Write out the ALUop for bne and how you can determine whether the bne results in the branch to be taken.arrow_forward
- Q2/ draw the flowchart for instruction cyclearrow_forwardThe TEST instruction performs the b. OR operation. c. NOT a. AND d. XORarrow_forwardComputer Science A circuit for two output ports (A&C) of the AVR ATmega16 microcontroller each connected to 8 LEDs. Write a program to control the LEDs in a sequence shown by stepping to lit on the LED sequentially as in the figure by toggling the LED at the same time for both ports (500mS) ending at the last state of the figure and looping back inversely to the start. This s done for 3 times back and forth.arrow_forward
- Complete the following statement: With the CMP instruction no operands are modified the source operand is changed O the destination operand is changedarrow_forwardWrite the instruction that allows for returning from an interrupt callarrow_forwardDraw the datapath for store instruction. Give clear explanation too.arrow_forward
- 3. What instruction should be executed to ensure that the carry flag is in the set state ? the reset state?arrow_forward3. Translate the following instruction to the equivalent vertical instruct a. E := A-C b. AC := A- (C+1) c. AC := B – BAND (A, Not (D)arrow_forwardWrite an 8051 asm program to design a voltage level indicator system using potentiometer and LEDS. The system must display the different level of the voltage with the help of 5 LEDS as per following conditions. a) If the voltage is between 0 to 1V glow LED1 b) If the voltage is between 1 to 2V glow LED1 and LED2 c) If the voltage is between 2 to 3V glow LED1 to LED3 d) If the voltage is between 3 to 4V glow LED1 to LED4 e) If the voltage is between 4 to 5V glow LED1 to LED5arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- COMPREHENSIVE MICROSOFT OFFICE 365 EXCEComputer ScienceISBN:9780357392676Author:FREUND, StevenPublisher:CENGAGE LEBK JAVA PROGRAMMINGComputer ScienceISBN:9781337671385Author:FARRELLPublisher:CENGAGE LEARNING - CONSIGNMENTSystems ArchitectureComputer ScienceISBN:9781305080195Author:Stephen D. BurdPublisher:Cengage Learning
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
Computer Science
ISBN:9780357392676
Author:FREUND, Steven
Publisher:CENGAGE L
EBK JAVA PROGRAMMING
Computer Science
ISBN:9781337671385
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT
Systems Architecture
Computer Science
ISBN:9781305080195
Author:Stephen D. Burd
Publisher:Cengage Learning