Computer Science homework help

1. Assuming all timers start with an accumulated value of 0, for which of the following
would the DN bit be activated the moment after the timer is energized for 10 seconds
and then de-energized for 20 seconds?
a.) ControlLogix TOF with preset of 8000
b.) ControlLogix RTO with preset of 8000
c.) ControlLogix TOF with preset of 80000
d.) ControlLogix TON with preset of 8000
2. Answer the questions about the ladder logic program shown below.
a.) If Switch_1 was turned on and 5 seconds later Switch_2 was turned on, what
would the following values be 12 seconds after Switch_2 was first turned on?
i. Accumulated value of My_Timer?
ii. Accumulated value of My_Counter?
b.) How would your previous answer be different if the ONS instruction were
removed?
3. State the instruction that is best suited to each of the following situations.
a.) __________ Instruction used to reset the accumulated value of a counter to zero.
b.) __________ An MCR instruction is placed at the beginning of a master control
relay fenced zone and this instruction is placed at the end of the zone.
c.) __________ Instruction is used at the end of a subroutine to return a value to the
routine that called it.
d.) __________ A JMP instruction causes the execution to jump to this instruction.
e.) __________ Instruction is used with a CTU instruction to create an up-down
counter.
f.) __________ This is the only timer instruction that requires a reset instruction.
4. Answer the questions about the following instructions.
a.) For the instruction shown, what would the accumulated value be if the rung had
continuity 6 different times? Afterwards, would the DN bit be on or off?
CTU
Count Up Counter
Counter My_Counter
Preset 15
Accumulated 11
b.) For the instruction shown, what would the accumulated value be if the rung had
continuity 6 different times? Afterwards, would the DN bit be on or off?
CTD
Count Down Counter
Counter My_Counter
Preset 15
Accumulated 3
c.) For the instruction shown, what would the accumulated value be if the rung had
continuity for 6 seconds? At the 6 seconds, would the DN bit be on or off?
TON
Timer On Delay
Counter My_Timer
Preset 8000
Accumulated 0
a.) For the instruction shown, what would the accumulated value be if the rung had
continuity for 6 seconds? At the 6 seconds, would the DN bit be on or off?
TOF
Timer Off Delay
Counter My_Timer
Preset 8000
Accumulated 0
5. Consider the ladder logic program shown below. Assume Switch_1 is closed for 50
seconds before re-opening.
a.) How many seconds after Switch_1 first closes will Lamp_1 turn on?
b.) How many seconds will Lamp_1 stay on?
c.) If the TON instruction were replaced with a TOF instruction, how many seconds
after Switch_1 first closes will Lamp_1 turn on?
d.) If the TON instruction were replaced with a TOF instruction, how many seconds
will Lamp_1 stay on?
6. List 4 instructions that we have covered so far that are retentive.
7. Which of the following statements are true? (Circle the letter of each true statement)
a.) In a PLC5 or SLC500, a timer instruction must have a time base specified.
b.) The accumulated value of a counter in a CTD instruction can get no lower than zero,
c.) The scan time of a program has a significant effect on how many items per second
can be counted with a standard counter instruction.
8. Answer the questions about the ladder diagram below. Unless stated otherwise,
assume all lamps and all switches are off prior to each step below.
a.) If all switches are off, what order
with the rungs be evaluated?
b.) If only Switch_1 and Switch_5 are
on, what order will the rungs be
evaluated?
c.) If only Switch_5 is on, what order
will the rungs be evaluated?
d.) If Switch_4 is turned on and then
Switch_3 is turned on and then
Switch_1 is turned on, what lamps
are on?
e.) If Switch_4 is turned on and then
Switch_3 is turned on and then
Switch_2 is turned on, what lamps
are on?
f.) If Switch_4 is turned on and then Switch_5 is turned on and then Switch_6 is turned
on and then Switch_7 is turned on, what lamps are on?
g.) If Switch_4 is turned on and then Switch_6 is turned on and then Switch_1 is turned
on and then Switch_7 is turned on, what lamps are on?
9. Consider a PLC system with the following inputs and outputs. Design a ladder
diagram that does the following:
• A timer counts up to 1.5 seconds, resets itself, and then repeats
• Every time S1 is on and the timer makes it to 1.5 seconds, a counter
increments its accumulated value.
• PL1 turns on any time that the count of the counter is 20 or higher.
• The counter should be reset whenever PL1 is first turned on (i.e. transitions
from off to on)
• PL2 should blink on and off any time that S2 is on. The blink should be on for
0.5 seconds and off for 0.5 seconds.
• PL3 should turn on whenever S1 and S2 are both on and PL3 should remain on
for 8 seconds after either S1 or S2 turn off.