Disadvantage: faults, power cuts and hacking

Tip: Choose Save as PDF in the print dialog to download. Use A4 paper size.

Disadvantage: faults, power cuts and hacking

Name:
Date:
Class:

Quick Questions

Shade in the A or B circle for each question.

1. A temperature sensor in a greenhouse is faulty and always reads 10°C. What is the most likely result?
A The microprocessor repairs the sensor by itself
B The heater may stay on and overheat the plants
2. Which statement about power cuts and automated systems is correct?
A No power means the system cannot work
B Automated systems keep working without power
3. Which is a risk of connecting an automated system to a network such as the internet?
A Hackers could take control of it or stop it
B The sensors will always give wrong readings
4. Which is the best way to reduce harm when an automated system fails?
A Have a backup system or manual control
B Remove all human workers from the site
5. A power cut stops an automated factory line. Which type of problem is this?
A A hacking attack on the microprocessor
B A power failure that stops the whole process

Match the Pairs

Draw a line connecting each item on the left to its match on the right.

Left columnRight column
1IF sensor_reading = 999 THEN AThe microprocessor only sees what the sensor sends. A faulty sensor gives wrong data, so wrong decisions are made.
2IF mains_power = OFF THEN BConnected systems can be hacked. A cyber attack can change settings or stop the system, so security is needed.
3A backup power supply keeps the automated system working during a power cut CIF system_fault = TRUE THEN SWITCH TO manual_control ENDIF
4Manual control lets a person take over when the automated system fails DA faulty sensor is sending a wrong reading, so the system may react incorrectly
5A hacker cannot harm a system that is connected to a network EIF mains_power = OFF THEN USE battery_backup ENDIF
6A faulty sensor is not a problem because the microprocessor always knows the right reading FA power cut has happened, so the system may stop working unless there is a backup

Definitions

system failure

Fill in the Blanks

Complete each line of code by filling in the missing parts.

1.
__ sensorValue < 0 THEN OUTPUT "Sensor fault" ENDIF
2.
IF mainPower _ FALSE THEN backupOn ← TRUE ENDIF
3.
IF attempts _ 3 THEN OUTPUT "Possible hacking" ENDIF
4.
IF autoFailed = TRUE THEN mode ← "MANUAL" _____
5.
IF temp < -50 __ temp > 150 THEN OUTPUT "Faulty sensor" ENDIF

Spot the Error

Shade in the letter of the line that contains an error.

Question 1
A temp ← READ_SENSOR()
B IF temp = -999 THEN
C fault ← FALSE
D ENDIF
Question 2
A IF mainPower = OFF THEN
B alarm ← TRUE
C SWITCH OFF backupBattery
D ENDIF
Question 3
A attempts ← 0
B WHILE attempts > 3
C INPUT password
D attempts ← attempts + 1
E ENDWHILE
Question 4
A IF autoFailed = TRUE THEN
B DISABLE autoControl
C ENABLE manualControl
D MUTE alarm
E ENDIF
Question 5
A IF sensorOK = TRUE THEN
B USE lastGoodValue
C LOG fault
D ENDIF

Answer Key

Disadvantage: faults, power cuts and hacking
Section A: Quick Questions
Q1
B — The heater may stay on and overheat the plants
Q2
A — No power means the system cannot work
Q3
A — Hackers could take control of it or stop it
Q4
A — Have a backup system or manual control
Q5
B — A power failure that stops the whole process
Section B: Match the Pairs
Q1
IF sensor_reading = 999 THEN → A faulty sensor is sending a wrong reading, so the system may react incorrectly
Q2
IF mains_power = OFF THEN → A power cut has happened, so the system may stop working unless there is a backup
Q3
A backup power supply keeps the automated system working during a power cut → IF mains_power = OFF THEN USE battery_backup ENDIF
Q4
Manual control lets a person take over when the automated system fails → IF system_fault = TRUE THEN SWITCH TO manual_control ENDIF
Q5
A hacker cannot harm a system that is connected to a network → Connected systems can be hacked. A cyber attack can change settings or stop the system, so security is needed.
Q6
A faulty sensor is not a problem because the microprocessor always knows the right reading → The microprocessor only sees what the sensor sends. A faulty sensor gives wrong data, so wrong decisions are made.
Section C: Definitions
Q1
system failure — When an automated system stops working or is harmed, for example by a faulty sensor, a power cut or hacking, so the whole process may fail. A backup or manual control helps.
Section D: Fill in the Blanks
Q1
IF sensorValue < 0 THEN OUTPUT "Sensor fault" ENDIF
Q2
IF mainPower = FALSE THEN backupOn ← TRUE ENDIF
Q3
IF attempts > 3 THEN OUTPUT "Possible hacking" ENDIF
Q4
IF autoFailed = TRUE THEN mode ← "MANUAL" ENDIF
Q5
IF temp < -50 OR temp > 150 THEN OUTPUT "Faulty sensor" ENDIF
Section E: Spot the Error
Q1
C — A reading of -999 means the sensor is giving a wrong value. The fault flag must be set to TRUE so the system knows the sensor is faulty.
Q2
C — When the main power is cut, the system should switch to the backup battery. Switching the battery off means no power at all, so the system fails.
Q3
B — The loop should run while attempts is LESS than 3. With > 3 it never runs, so the password check that limits hacking attempts is skipped.
Q4
D — If the automatic system fails, staff must be warned. The alarm should be sounded, not muted, so people can use manual control.
Q5
A — The backup action is for a faulty sensor, so the test should be sensorOK = FALSE. With TRUE it would ignore the sensor even when it works.