S7-1200: Beginner’s Guide to Siemens PLC and HMI Interface Design Basics

Hey, do you want to create a control system that is both intuitive and practical? Today, we will discuss how to integrate the Siemens S7-1200 PLC with HMI (Human-Machine Interface). Whether you are new to the automation field or looking to upgrade your existing system, this tutorial will help you easily master the basics of human-machine interaction design.

What is HMI? Why use it?

HMI (Human-Machine Interface) is like the “face” of the PLC, allowing operators to intuitively monitor and control equipment. Imagine if you had to modify the PLC program directly to change a parameter—too cumbersome! With HMI, operators can simply tap the screen to adjust set values, view alarm information, or start devices.

Ordinary workers do not need to understand programming to operate complex industrial equipment, which is the charm of HMI.

1// Reminder: Although HMI simplifies operations, a poorly designed interface can increase operational errors! Remember, a good HMI should be as user-friendly as your microwave at home, not as complex as an airplane cockpit.

Preparation: Software and Hardware Requirements

Before we start, make sure you have the following:

  • One S7-1200 PLC (any model will do)
  • A Siemens touch screen (KTP series is good)
  • TIA Portal software version 15 or higher
  • Ethernet cable to connect the devices

Don’t worry about the cost; during the learning phase, you can use the simulator feature of TIA Portal without needing to purchase hardware. I practiced on the simulator when I first started my project, saving a lot of money!

Creating Your First HMI Project

After opening TIA Portal, let’s start from scratch:

  1. Create a new project and add your PLC device
  2. Right-click on the project tree, select “Add New Device” → “HMI”
  3. Select your screen model (or simulator)
1// Although HMI design is mainly graphical, the underlying logic may involve scripting
2// For example, a simple value display logic
3function UpdateValue() {
4    if(PLC_Tag > HighLimit) {
5        DisplayColor = "Red";
6    } else {
7        DisplayColor = "Green";
8    }
9}

After adding the device, TIA Portal will launch the HMI wizard and ask you a series of questions. For beginners, it’s fine to keep the default settings, except for the communication part—make sure to select the correct PLC as the communication partner!

Core Principles for Designing Practical Interfaces

Designing an HMI interface is like decorating a house; it should be both attractive and practical. Here are a few principles to remember:

  1. Simplicity is Key – Don’t overcrowd a screen; information overload can confuse operators.
  2. Consistency – Button sizes, colors, and positions should be uniform; don’t have them scattered all over.
  3. Intuitive Navigation – Related functions should be grouped together; users shouldn’t get lost.

I once saw an HMI interface in a factory where the button arrangement was illogical, and operators took a long time to find what they needed. Remember, good design should feel “natural”!

Creating Tags and Connecting to PLC Variables

To display or control data from the PLC on the HMI, you need to establish a connection between them:

  1. Open the HMI Tag Table
  2. Create a new tag with a meaningful name (e.g., “Motor1_Speed” is much better than “tag1”)
  3. Set it to connect to the corresponding PLC variable
1// Reminder: Naming conventions are important! Developing good habits will save a lot of time in future maintenance. For example, use the "AI_" prefix for analog inputs and "DO_" for digital outputs.

Once the tags are created, you can use them in various HMI objects. For instance, to display the motor temperature, just drag a text box onto the screen and bind it to the “Motor_Temperature” tag.

Designing Practical Screen Elements

HMI is not just about displaying numbers; it can enhance the experience with various graphical elements:

  • Buttons – Used for executing operations; design should be appropriately sized for touch.
  • Indicators – Display device status; green usually indicates normal, while red indicates abnormal.
  • Value Displays – Show key parameters, with configurable upper and lower limit alarm colors.
  • Trend Charts – Display parameter changes over time for easier analysis of operational trends.

Don’t underestimate these basic elements; combined, they can meet 80% of industrial needs. The remaining 20% may require more advanced features, which will be covered in later advanced tutorials.

Get Moving: Adding Animation Effects

A static interface is too boring; let’s add some dynamic effects:

  1. Select a graphical element (like a tank image)
  2. Open the “Animation” tab
  3. Add dynamic changes in visibility, color, or position

For example, the tank height can change with the liquid level, and the motor icon can change color based on its on/off status. This way, operators can quickly see the system status without staring at numbers.

1// The logic behind the animation might look like this
2if(Tank_Level < 10) {
3    Tank_Image.Visible = false;
4    Warning_Text.Visible = true;
5} else {
6    Tank_Image.Visible = true;
7    Warning_Text.Visible = false;
8}

Testing Your HMI Design

Once the design is complete, don’t rush to deploy; first, test it:

  1. Use TIA Portal’s simulation feature (right-click on HMI device → Start Simulation)
  2. Check if each button and display works correctly
  3. Simulate different operating conditions to ensure the interface responds as expected

Have a colleague try it out and see if they can intuitively understand and operate your interface. If they need you to explain how to use it, that indicates room for improvement in the design.

Practical Tips

In actual projects, these small tips can save you a lot of trouble:

  • Create template screens that include common elements (like title bars and navigation buttons) to avoid repetitive work
  • Use global screens to store common elements like alarm displays
  • Set user permissions reasonably to prevent accidental operations
  • Don’t forget to add a simple help screen to guide new operators

Once, while working on a project, I forgot to set permissions, and a maintenance worker accidentally changed a critical parameter, causing the production line to stop for half a day! Lesson learned!

Hands-On Practice

Try creating a simple tank control HMI using TIA Portal:

  • Add a tank graphic and liquid level display
  • Create start/stop buttons to control the pump
  • Design high/low level alarm indicators
  • Add a trend chart to display historical liquid level changes

Don’t be afraid to make mistakes; it’s part of the learning process. Remember, Rome wasn’t built in a day, and mastering HMI design also requires continuous practice.

Get started, and I look forward to seeing your first HMI design!

Leave a Comment