📖 Scenario: You work in a factory that uses a SCADA system to monitor machines. The factory also uses MES (Manufacturing Execution System) and ERP (Enterprise Resource Planning) software to manage production and inventory. Your job is to create a simple data integration script that prepares machine data for MES and ERP systems.
🎯 Goal: Build a script that creates machine data, sets a configuration for data filtering, processes the data to select only machines with high temperature, and outputs the filtered data ready for MES and ERP integration.
📋 What You'll Learn
Create a dictionary with machine names and their temperature readings
Add a temperature threshold variable for filtering
Filter the dictionary to keep only machines with temperature above the threshold
Print the filtered dictionary as the final output
💡 Why This Matters
🌍 Real World
Factories use SCADA systems to monitor machines and MES/ERP systems to manage production and inventory. Integrating data between these systems helps automate decisions and improve efficiency.
💼 Career
DevOps engineers often write scripts to connect different software systems, ensuring smooth data flow and automation in industrial environments.
Progress0 / 4 steps
1
Create machine temperature data
Create a dictionary called machine_temps with these exact entries: 'MachineA': 75, 'MachineB': 60, 'MachineC': 85, 'MachineD': 55
SCADA systems
Hint
Use curly braces to create a dictionary. Each machine name is a key, and its temperature is the value.
2
Set temperature threshold for filtering
Create a variable called temp_threshold and set it to 70 to filter machines with temperature above this value
SCADA systems
Hint
Just assign the number 70 to the variable named temp_threshold.
3
Filter machines with temperature above threshold
Create a new dictionary called high_temp_machines that contains only the machines from machine_temps with temperature greater than temp_threshold. Use a dictionary comprehension with for machine, temp in machine_temps.items() and a condition.
SCADA systems
Hint
Use a dictionary comprehension with a condition to filter the machines.
4
Print the filtered machine data
Write a print statement to display the high_temp_machines dictionary
SCADA systems
Hint
Use print(high_temp_machines) to show the filtered dictionary.
Practice
(1/5)
1. What is the main purpose of integrating SCADA systems with MES and ERP systems?
easy
A. To manually enter data from SCADA into MES and ERP
B. To replace SCADA systems with MES and ERP systems
C. To enable automatic data sharing between production control and business management
D. To disconnect production data from business processes
Solution
Step 1: Understand the roles of SCADA, MES, and ERP
SCADA controls and monitors production, MES manages manufacturing execution, and ERP handles business processes.
Step 2: Identify the benefit of integration
Integration allows these systems to share data automatically, improving efficiency and accuracy.
Final Answer:
To enable automatic data sharing between production control and business management -> Option C
Quick Check:
Integration purpose = automatic data sharing [OK]
Hint: Integration means automatic data flow between systems [OK]
Common Mistakes:
Thinking integration replaces SCADA
Assuming data entry is manual
Believing systems should stay disconnected
2. Which data format is commonly used for exchanging information between SCADA and ERP systems?
easy
A. JSON
B. CSV
C. Plain text
D. Binary executable
Solution
Step 1: Identify standard data formats for system integration
Common formats include JSON and XML for structured data exchange.
Step 2: Select the most widely used format for SCADA-ERP communication
JSON is popular due to its simplicity and compatibility with web technologies.
Final Answer:
JSON -> Option A
Quick Check:
Data format = JSON [OK]
Hint: JSON is a standard for structured data exchange [OK]
Common Mistakes:
Choosing CSV which is less structured
Using plain text without structure
Confusing binary files with data formats
3. Given this pseudo-code snippet for SCADA to MES data push: