📖 Scenario: You are designing a simple Human-Machine Interface (HMI) screen for a factory machine. The screen will show the machine status and allow the operator to start or stop the machine.
🎯 Goal: Build a basic HMI screen setup with variables for machine status and controls, configure a threshold for an alarm, implement logic to update the status based on input, and display the final status message.
📋 What You'll Learn
Create variables for machine status and control buttons
Add a threshold variable for temperature alarm
Write logic to update machine status based on control inputs and temperature
Display the machine status and alarm message
💡 Why This Matters
🌍 Real World
HMI screens are used in factories to show machine status and allow operators to control machines safely and easily.
💼 Career
Understanding basic HMI screen design is important for automation engineers and technicians who work with PLCs and industrial control systems.
Progress0 / 4 steps
1
Create initial variables for machine status and controls
Create a variable called machine_status and set it to "Stopped". Create two boolean variables called start_button and stop_button and set both to False.
PLC Programming
Hint
Use simple variable assignments. machine_status is a string, start_button and stop_button are booleans.
2
Add a temperature alarm threshold
Create a variable called temperature_alarm_threshold and set it to 75.
PLC Programming
Hint
Set the alarm threshold as an integer variable.
3
Write logic to update machine status based on controls and temperature
Create a variable called current_temperature and set it to 80. Use if statements to update machine_status: if start_button is True, set machine_status to "Running". If stop_button is True, set machine_status to "Stopped". Then create a variable called alarm and set it to True if current_temperature is greater than temperature_alarm_threshold, otherwise False.
PLC Programming
Hint
Use simple if and elif to check buttons. Use a comparison operator to set alarm.
4
Display the machine status and alarm message
Write a print statement to display "Machine status: " followed by the value of machine_status. Then write another print statement that displays "Alarm: ON" if alarm is True, otherwise "Alarm: OFF".
PLC Programming
Hint
Use print with an f-string for the status. Use a conditional expression for the alarm message.
Practice
(1/5)
1. What is the main purpose of an HMI screen in PLC programming?
easy
A. To store machine data permanently
B. To write complex PLC code
C. To replace the PLC hardware
D. To allow users to control and monitor machines easily
Solution
Step 1: Understand HMI function
An HMI (Human-Machine Interface) screen is designed to help users interact with machines.
Step 2: Identify main purpose
The main goal is to make control and monitoring simple and clear for users.
Final Answer:
To allow users to control and monitor machines easily -> Option D
Quick Check:
HMI = control and monitor [OK]
Hint: HMI means user interface for machine control [OK]
Common Mistakes:
Confusing HMI with PLC programming itself
Thinking HMI stores data permanently
Assuming HMI replaces hardware
2. Which of the following is the correct way to label a button on an HMI screen?
easy
A. Use only icons without text
B. Use vague text like 'Click Here'
C. Use clear text like 'Start Motor'
D. Use very long sentences explaining the button
Solution
Step 1: Understand button labeling
Buttons should have clear, simple labels so users know their function immediately.
Step 2: Evaluate options
'Start Motor' clearly tells the user what the button does, unlike vague or overly long labels.
Final Answer:
Use clear text like 'Start Motor' -> Option C
Quick Check:
Clear labels = better usability [OK]
Hint: Label buttons with clear, simple text [OK]
Common Mistakes:
Using unclear or vague labels
Relying only on icons without text
Writing long explanations on buttons
3. Consider this HMI screen design rule: "Use consistent colors for similar controls." What is the likely result if this rule is ignored?
medium
A. Users may get confused about control functions
B. The PLC program will stop working
C. The screen will load faster
D. The machine will run automatically
Solution
Step 1: Understand color consistency
Consistent colors help users recognize similar controls easily.
Step 2: Predict effect of ignoring rule
If colors vary randomly, users may not know which controls do similar things, causing confusion.
Final Answer:
Users may get confused about control functions -> Option A
Quick Check:
Consistent colors = less confusion [OK]
Hint: Consistent colors help users understand controls [OK]
Common Mistakes:
Thinking color affects PLC operation
Assuming color changes speed up screen
Believing color affects machine automation
4. You designed an HMI screen but users report they can't find the navigation buttons easily. What is the most likely design mistake?
medium
A. Navigation buttons are hidden or placed inconsistently
B. Buttons have clear labels and consistent colors
C. Screen title is too large and clear
D. Screen uses standard navigation layout
Solution
Step 1: Analyze user feedback
Users can't find navigation buttons easily means buttons are not visible or confusingly placed.
Step 2: Identify design mistake
Hidden or inconsistent placement of navigation buttons causes difficulty in finding them.
Final Answer:
Navigation buttons are hidden or placed inconsistently -> Option A
Quick Check:
Visible, consistent navigation = easy to find [OK]
Hint: Place navigation buttons clearly and consistently [OK]
Common Mistakes:
Ignoring button placement importance
Assuming large titles improve navigation
Using non-standard layouts without testing
5. You want to design an HMI screen for a machine with multiple steps. Which approach best helps users navigate smoothly between steps?
hard
A. Place all controls on one screen without navigation
B. Use a clear menu with buttons labeled for each step
C. Use random colors for each step's controls
D. Hide navigation buttons to save screen space
Solution
Step 1: Understand multi-step navigation needs
Users need to move easily between steps without confusion.
Step 2: Evaluate navigation methods
A clear menu with labeled buttons helps users know where to go next and jump between steps.
Step 3: Reject poor options
Putting all controls on one screen can overwhelm users; random colors confuse; hiding buttons blocks navigation.
Final Answer:
Use a clear menu with buttons labeled for each step -> Option B
Quick Check:
Clear menus = smooth navigation [OK]
Hint: Label navigation buttons clearly for each step [OK]
Common Mistakes:
Overloading one screen with all controls
Using inconsistent colors that confuse users
Hiding navigation buttons to save space
Recommended
Ready to prove it?
Pass the test and this pattern moves unknownstrongwhile earning +1 Grip toward your certificate.