0
0
SCADA systemsdevops~10 mins

Monolithic SCADA architecture in SCADA systems - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to define a monolithic SCADA system main process.

SCADA systems
def main_process():
    system_status = '[1]'
    print(f"System status: {system_status}")
Drag options to blanks, or click blank then click option'
Astopped
Berror
Crunning
Didle
Attempts:
3 left
💡 Hint
Common Mistakes
Choosing 'stopped' or 'idle' which means the system is not active.
2fill in blank
medium

Complete the code to initialize the SCADA data collection loop.

SCADA systems
while system_status == 'running':
    data = collect_data()
    process_data(data)
    if [1]:
        break
Drag options to blanks, or click blank then click option'
Asystem_status == 'stopped'
Berror_detected()
Cdata == None
Ddata.is_empty()
Attempts:
3 left
💡 Hint
Common Mistakes
Using data conditions instead of system status to break the loop.
3fill in blank
hard

Fix the error in the SCADA system shutdown function.

SCADA systems
def shutdown_system():
    global system_status
    system_status = [1]
    print("System shutdown complete.")
Drag options to blanks, or click blank then click option'
A'stopped'
Bstopped
C"running"
D'running'
Attempts:
3 left
💡 Hint
Common Mistakes
Forgetting quotes around string literals.
4fill in blank
hard

Fill both blanks to create a dictionary mapping sensor names to their status in the SCADA system.

SCADA systems
sensor_status = { '[1]': 'active', '[2]': 'inactive' }
Drag options to blanks, or click blank then click option'
Atemperature_sensor
Bpressure_sensor
Chumidity_sensor
Dflow_sensor
Attempts:
3 left
💡 Hint
Common Mistakes
Using variable names without quotes or repeating the same sensor.
5fill in blank
hard

Fill all three blanks to create a function that logs SCADA events with timestamp and message.

SCADA systems
def log_event([1], [2]):
    timestamp = get_current_time()
    log_entry = { '[3]': timestamp, 'message': [2] }
    save_log(log_entry)
Drag options to blanks, or click blank then click option'
Aevent_type
Bmessage
Ctime
Devent
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing up parameter names or dictionary keys.