---
title: "HMI dla sterownika S7-1200"
url: "https://maker.wiznet.io/jaden/projects/hmi-dla-sterownika-s7-1200/"
markdown_url: "https://maker.wiznet.io/jaden/projects/hmi-dla-sterownika-s7-1200/md"
type: "UCC: User Created Content"
author: "Krzysztof Cyganek"
author_url: "https://www.youtube.com/watch?v=47APedSWce8"
editor: "WIZnet"
editor_url: "https://maker.wiznet.io/"
original_author: "Krzysztof Cyganek"
original_url: "https://www.youtube.com/watch?v=47APedSWce8"
published: "2026-01-04"
language: "en"
likes: 0
views: 360
comments: 0
source: "WIZnet Makers (https://maker.wiznet.io/)"
---

# HMI dla sterownika S7-1200

> HMI dla sterownika S7-1200

Original author: Krzysztof Cyganek (source: https://www.youtube.com/watch?v=47APedSWce8)

## Article

## How to Control Siemens S7-1200 PLC via Ethernet Using W5500? Project Summary

This project demonstrates an industrial Ethernet control system that allows a custom STM32H5-based touch controller to send LAN commands to a Siemens S7-1200 PLC. By using the WIZnet W5500 hardware TCP/IP Ethernet controller, the system achieves reliable, deterministic PLC control over wired Ethernet, enabling precise relay actuation without relying on proprietary Siemens HMI panels.

![](https://maker.wiznet.io/upload/ckeditor5/1122383%5F1767967676%2Epng)

### Project Overview and Industrial Context

In industrial automation environments, Siemens S7-1200 PLCs are commonly controlled through dedicated Siemens HMI panels. While these HMIs are robust, they often introduce limitations in terms of customization cost, UI flexibility, and system scalability.

![](https://maker.wiznet.io/upload/ckeditor5/1122383%5F1767967695%2Epng)

This project presents an alternative architecture:
a **custom Ethernet-based HMI/control node** built around an **STM32H5 MCU**, an **XPT2046 touch display**, and a **WIZnet W5500 Ethernet controller**.

The system operates entirely within a local LAN. When a user touches the display, the STM32H5 interprets the input and generates a predefined LAN command. This command is transmitted via the W5500 to a Siemens S7-1200 PLC on the same network. The PLC then executes deterministic control logic, such as opening and closing a specific relay a defined number of times.

From an industrial perspective, this architecture preserves the PLC’s core logic and reliability while enabling flexible, cost-effective, and highly customizable external control interfaces.

---

### Why WIZnet W5500 Is Technically Essential

In this project, the W5500 is not a generic Ethernet interface—it is a **critical industrial transport component**.

#### Key Technical Role

Acts as the **hardware TCP/IP transport layer** between STM32H5 and Siemens S7-1200

Offloads all TCP/IP processing from the MCU

Ensures predictable, low-jitter Ethernet communication

#### Why Hardware TCP/IP Matters Here

PLC control over Ethernet is sensitive to:

Latency variation (jitter)

Packet loss

Unpredictable CPU load

Using a software TCP/IP stack (such as LwIP) on the MCU would introduce:

Increased CPU utilization

Timing variability during UI and protocol handling

More complex real-time scheduling

By contrast, the W5500 provides:

A fully hardwired TCP/IP stack

8 independent hardware sockets

32 KB internal buffer memory

Deterministic Ethernet behavior suitable for industrial LANs

This allows the STM32H5 to focus on:

Touch input processing (XPT2046)

Command logic and protocol framing

System-level reliability

While the W5500 handles Ethernet communication independently.

---

### System Architecture Explanation

#### Input Layer

**XPT2046 resistive touch controller**

Connected to STM32H5 via SPI

Provides precise user input suitable for industrial environments (gloves, noise immunity)

#### Control & Logic Layer

**STM32H5 MCU**

Translates touch events into predefined PLC commands

Maintains application logic without networking overhead

#### Network Transport Layer

**WIZnet W5500 Ethernet Controller**

SPI-connected to STM32H5

Handles all TCP/IP and socket management in hardware

#### PLC Execution Layer

**Siemens S7-1200**

Receives LAN commands

Executes deterministic relay control logic

Maintains safety and sequencing within PLC program

This separation of responsibilities aligns well with industrial design principles: deterministic control, predictable communication, and clear functional boundaries.

---

### Industrial Value Proposition

This project highlights several important industrial advantages:

**HMI Cost Reduction**
Custom MCU-based HMIs can be significantly cheaper than proprietary panels while still maintaining industrial-grade Ethernet communication.

**UI and Function Customization**
The STM32-based interface allows rapid changes to UI layout, workflows, and command mapping without modifying PLC hardware.

**Ethernet Reliability Over Wi-Fi**
In electrically noisy factory environments, wired Ethernet provides stable, interference-free communication essential for control systems.

**IT/OT Network Integration**
Ethernet-based PLC control simplifies integration with higher-level monitoring systems and industrial networks.

---

### Author Background

The project is developed by **microtronics.pl**, a company and technical team specializing in professional electronics and industrial automation solutions.

![](https://maker.wiznet.io/upload/ckeditor5/1122383%5F1767967803%2Epng)

According to their published scope of work, microtronics.pl provides:

**Industrial Electronics Design**
Designing industrial-grade electronic circuits using leading-edge technologies, with a focus on reliability and long-term operation.

**Consumer Electronics Design**
Development of consumer electronics circuits for various device categories, balancing performance and manufacturability.

**Electronics Production and Drivers**
Providing electronic drivers and circuit production services for embedded and industrial devices.

**Industrial Automation Design**
Designing industrial automation systems based on **Siemens solutions**, including PLC-based control architectures.

This background explains the project’s strong alignment with real industrial requirements, particularly its integration with Siemens S7-1200 PLCs and emphasis on wired Ethernet reliability.

---

### FAQ

**Q: Why use WIZnet W5500 instead of a software TCP/IP stack?**
A: The W5500 provides a fully hardwired TCP/IP stack, eliminating CPU load and timing variability associated with software stacks like LwIP. This is critical for deterministic PLC control where communication jitter can affect relay sequencing and system reliability.

**Q: How is the STM32H5 connected to the Siemens S7-1200?**
A: The STM32H5 communicates with the S7-1200 over wired Ethernet using the W5500. Both devices are connected to the same LAN, allowing direct TCP/IP-based command exchange.

**Q: What role does the W5500 play in this project?**
A: The W5500 acts as the Ethernet transport layer, handling socket management and TCP/IP communication in hardware so the MCU can focus on UI input and control logic.

**Q: Why is Ethernet preferred over Wi-Fi in this industrial setup?**
A: Ethernet provides predictable latency, immunity to wireless interference, and stable long-term connections, all of which are essential in factory and automation environments.

**Q: Could this system be simplified using W55RP20?**
A: Yes. W55RP20 integrates an RP2040 MCU and W5500 Ethernet controller into a single chip, reducing BOM cost and PCB complexity for similar industrial control nodes.

---

Korean version

**W5500과 STM32H5로 Siemens S7-1200 PLC를 LAN 제어하는 방법**

![](https://maker.wiznet.io/upload/ckeditor5/1122383%5F1767967676%2Epng)

프로젝트 요약 (Project Summary)

이 프로젝트는 STM32H5 기반의 커스텀 터치 컨트롤러가 LAN 명령어를 통해 Siemens S7-1200 PLC를 제어하는 산업용 이더넷 제어 시스템을 보여줍니다. WIZnet W5500 하드웨어 TCP/IP 이더넷 컨트롤러를 사용함으로써, 전용 Siemens HMI 패널에 의존하지 않고도 신뢰성과 결정론적 동작을 갖춘 PLC 제어를 구현합니다.

프로젝트 개요 및 산업적 배경

산업 자동화 환경에서 Siemens S7-1200 PLC는 일반적으로 전용 Siemens HMI 패널을 통해 제어됩니다. 이러한 HMI는 높은 신뢰성을 제공하지만, UI 커스터마이징, 비용, 시스템 확장성 측면에서는 제약이 따르는 경우가 많습니다.

이 프로젝트는 이러한 구조에 대한 대안으로,

![](https://maker.wiznet.io/upload/ckeditor5/1122383%5F1767967695%2Epng)
**STM32H5 MCU**, **XPT2046 터치 디스플레이**, **WIZnet W5500 이더넷 컨트롤러**로 구성된
**커스텀 이더넷 기반 HMI / 제어 노드 아키텍처**를 제시합니다.

시스템은 동일한 로컬 LAN 환경에서 동작합니다. 사용자가 터치 디스플레이를 통해 입력을 하면, STM32H5는 해당 입력을 PLC가 인식할 수 있는 사전 정의된 LAN 명령어로 변환합니다. 이 명령어는 W5500을 통해 같은 네트워크에 연결된 Siemens S7-1200 PLC로 전송되며, PLC는 이에 대응하는 제어 로직을 실행합니다.

PLC 측에서는 특정 릴레이를 정해진 횟수와 시퀀스로 On/Off 하는 등, **결정론적 제어 동작**을 수행합니다.

산업적 관점에서 볼 때, 이 구조는 PLC의 핵심 제어 로직과 안정성은 그대로 유지하면서도, 비용 효율적이고 유연한 외부 제어 인터페이스를 추가할 수 있는 실용적인 접근 방식입니다.

---

### 왜 WIZnet W5500이 중요한가

이 프로젝트에서 W5500은 단순한 “이더넷 인터페이스 칩”이 아닙니다.
**산업용 이더넷 통신을 위한 핵심 전송 계층(Transport Layer)** 역할을 수행합니다.

#### 핵심 기술적 역할

STM32H5와 Siemens S7-1200 사이의 **하드웨어 TCP/IP 전송 계층**

MCU에서 TCP/IP 처리를 완전히 오프로딩

지연 시간과 지터가 예측 가능한 안정적인 Ethernet 통신 제공

---

### 시스템 아키텍처 설명

#### 입력

**XPT2046 저항막 방식 터치 컨트롤러**

STM32H5와 SPI 인터페이스로 연결

장갑 착용, 노이즈 환경에서도 안정적인 입력 제공

#### 제어 및 로직

**STM32H5 MCU**

터치 이벤트를 PLC 제어 명령으로 변환

네트워크 처리 부담 없이 애플리케이션 로직 수행

#### 네트워크 전송

**WIZnet W5500 이더넷 컨트롤러**

SPI 인터페이스로 STM32H5와 연결

TCP/IP 및 소켓 관리 기능을 하드웨어에서 처리

#### PLC 실행

**Siemens S7-1200 PLC**

LAN 명령어 수신

릴레이 제어 등 결정론적 제어 로직 수행

안전성과 시퀀스 제어는 PLC 내부 로직으로 유지

이와 같은 역할 분리는 산업 제어 시스템에서 요구되는
결정론성, 신뢰성, 명확한 기능 분리를 잘 충족합니다.

---

### 산업적 가치 (Industrial Value Proposition)

이 프로젝트는 다음과 같은 산업적 장점을 명확히 보여줍니다.

**HMI 비용 절감**
MCU 기반 커스텀 HMI는 전용 패널 대비 비용을 크게 절감하면서도 산업용 이더넷 통신을 유지할 수 있습니다.

**UI 및 기능 커스터마이징 용이성**
STM32 기반 구조를 통해 UI 레이아웃과 제어 시퀀스를 빠르게 변경할 수 있으며, PLC 하드웨어 변경이 필요 없습니다.

**Wi-Fi 대비 유선 Ethernet의 신뢰성**
공장 환경의 전기적 노이즈와 간섭 조건에서 유선 Ethernet은 안정적이고 예측 가능한 통신을 제공합니다.

**IT/OT 네트워크 통합 용이성**
Ethernet 기반 제어 구조는 상위 모니터링 시스템 및 산업 네트워크와의 통합을 단순화합니다.

---

### 저자 소개

저자는 **Krzysztof Cyganek**라는 폴란드 국적의 개발자로 [microtronics.pl](https://microtronics.pl) 라는 웹 페이지를 운영하고 있습니다.

![](https://maker.wiznet.io/upload/ckeditor5/1122383%5F1767967809%2Epng)

microtronics.pl는 다음과 같은 서비스를 제공하고 있습니다.

**저자 웹사이트**:

**산업용 전자 회로 설계**
최신 기술을 활용한 산업용 전자 회로 설계, 장기 신뢰성과 안정성에 중점

**소비자 전자 회로 설계**
다양한 디바이스를 위한 소비자 전자 제품 회로 설계

**전자 회로 생산 및 드라이버 제공**
임베디드 및 산업용 장치를 위한 전자 드라이버 및 회로 생산

**산업 자동화 설계**
Siemens 솔루션 기반의 산업 자동화 시스템 설계

이러한 배경은 본 프로젝트가 단순한 데모가 아니라, 실제 산업 환경 요구사항을 충실히 반영하고 있음을 잘 보여줍니다.

---

### FAQ

**Q: 왜 소프트웨어 TCP/IP 대신 WIZnet W5500을 사용하나요?**
A: W5500은 하드웨어 TCP/IP 스택을 제공하여 LwIP와 같은 소프트웨어 스택 대비 CPU 부하와 타이밍 변동을 제거합니다. 이는 릴레이 시퀀스 제어와 같은 결정론적 PLC 제어에 매우 중요합니다.

**Q: STM32H5는 Siemens S7-1200과 어떻게 연결되나요?**
A: STM32H5는 W5500을 통해 유선 Ethernet으로 S7-1200과 연결되며, 동일한 LAN 환경에서 TCP/IP 기반 명령어를 주고받습니다.

**Q: 이 프로젝트에서 W5500의 역할은 무엇인가요?**
A: W5500은 Ethernet 전송 계층을 담당하며, 소켓 관리와 TCP/IP 처리를 하드웨어에서 수행합니다.

**Q: 산업 환경에서 Wi-Fi 대신 Ethernet을 사용하는 이유는 무엇인가요?**
A: Ethernet은 지연 시간 예측이 가능하고 무선 간섭에 영향을 받지 않기 때문에, 장시간 안정적인 제어가 요구되는 산업 환경에 적합합니다.

**Q: W55RP20으로도 구현이 가능한가요?**
A: 가능합니다. W55RP20은 RP2040 MCU와 W5500을 단일 칩으로 통합한 솔루션으로, 유사한 제어 노드에서 BOM 비용과 PCB 복잡도를 줄일 수 있습니다.

---

Source: https://maker.wiznet.io/jaden/projects/hmi-dla-sterownika-s7-1200/
