How to integrate Siemens PLC with HMI and printer for data display?

2026-09-18

1. How Are the Three Devices Connected Physically and Logically?

The physical connection between a Siemens PLC and an HMI is typically Ethernet or PROFINET. The PLC and HMI are connected to the same network, with IP addresses in the same subnet. The printer can be connected in one of two ways. If the HMI supports direct printing (as WinCC Comfort and Advanced panels do), the printer can be connected to the HMI via USB or Ethernet. If the HMI does not support direct printing, a communication module (such as a CP 340 or CP 341) is added to the PLC, and the printer is connected to that module via RS232 or RS485. The logical connection is the HMI connection, which defines how the HMI reads and writes data from the PLC. In TIA Portal, this is configured in the “Devices & Networks” editor by dragging a connection between the PLC interface and the HMI interface.

Network requirement: The PLC and HMI must be on the same subnet. For example, if the PLC is 192.168.0.1, the HMI can be 192.168.0.2. The printer, if networked, should also be on the same subnet. This simplifies configuration and troubleshooting.

Yueyang Tongtu E-commerce Co., Ltd. supplies Siemens PLC and HMI components for industrial automation projects. Our factory works with system integrators who configure these connections daily, and we understand the practical challenges of getting three devices to communicate reliably.

Siemens ET200SP


2. How Do You Create the HMI Connection and Map Variables in TIA Portal?

The HMI connection is created in the “Devices & Networks” editor. First, both the PLC and the HMI must be added to the project and their interfaces configured. Then, click the “Connections” button and select “HMI connection” as the connection type. Drag from the PLC’s PROFINET interface to the HMI’s interface to create the connection. Once the connection is established, the next step is variable mapping. In the HMI’s “HMI variable table,” you create variables that reference PLC tags. The table below shows the typical variable mapping for a data display application.

HMI variable name Data type PLC tag reference Display object
Motor_Speed Real DB10.DBD0 (Speed) IO Field (numeric)
Product_Count Int DB10.DBW4 (Count) IO Field (numeric)
Batch_Number String DB10.DBB8 (Batch) IO Field (text)
Alarm_Active Bool M10.0 (Alarm) Indicator Light

After the variables are created, they are linked to display objects on the HMI screen. For a data display application, the most common objects are IO Fields (for numeric and text values) and Trend Views (for historical data). In our factory, we recommend using a structured data block in the PLC for all HMI data. This keeps the data organized and makes it easier to update the HMI when the PLC program changes.


3. How Does the Printer Receive Data from the PLC or HMI?

The method for printing depends on the HMI platform and the printer type. There are two common approaches. The first approach uses the HMI’s built-in printing capability. WinCC Comfort and Advanced panels can print reports directly to a connected printer. The print job is configured in the “Report Designer” within TIA Portal. You create a report layout, define the data sources, and then create a print job that links the layout to a printer. The print job can be triggered by a button on the HMI screen. The second approach uses a communication module on the PLC. If the HMI does not support printing, or if the printer needs to receive data directly from the PLC, a CP 340 or CP 341 module is used. The PLC program sends data to the module using the ASCII driver, and the module transmits the characters to the printer via RS232. The table below compares these two approaches.

Approach Hardware required Configuration location Best for
HMI direct printing HMI with USB/Ethernet port WinCC Report Designer Simple reports, operator-triggered
PLC communication module CP 340/341 module PLC program + module parameters Continuous data logging, custom formats

Yueyang Tongtu E-commerce Co., Ltd. supplies both HMI panels with direct printing capability and CP 340/341 communication modules for PLC-based printing. Our factory can provide the configuration files and sample programs for both approaches.


4. What Are the Common Configuration Issues and How Are They Resolved?

The most common issue is that the HMI connection is created, but the variables do not update. This is usually caused by a mismatch in the access point settings. The HMI connection uses an access point (typically S7ONLINE), and the PG/PC interface on the engineering station must be set to the same access point. Another common issue is that the printer prints garbled characters. This is caused by a mismatch in the character encoding or the baud rate between the PLC and the printer. The ASCII driver parameters must match the printer’s settings exactly: baud rate, data bits, parity, and stop bits. A third issue is that the print job does not trigger. This is usually caused by the trigger variable not being set correctly, or the print job not being linked to the correct button event. In our factory, we recommend testing the print function with a simple text output before adding complex report layouts.


Frequently Asked Questions About Siemens PLC, HMI, and Printer Integration

Question 1: Can I connect multiple HMIs to one Siemens PLC for data display?
Answer: Yes, a Siemens PLC can support multiple HMI connections simultaneously. The number of connections depends on the PLC model. An S7-1200 typically supports up to 8 HMI connections, while an S7-1500 supports up to 16 or more. Each HMI connection uses communication resources on the PLC. When configuring multiple HMIs, ensure that the PLC’s communication load does not exceed its capacity. In our factory, we recommend checking the “Communication Resources” in the PLC properties to verify the maximum number of connections. For systems with more than 4 HMIs, we recommend using a SCADA system or a higher-performance PLC.
Question 2: What is the difference between an integrated HMI connection and a non-integrated connection?
Answer: An integrated HMI connection is created within the same TIA Portal project, where both the PLC and HMI are configured together. This allows automatic variable mapping and consistent project management. A non-integrated connection is used when the HMI and PLC are in separate projects, or when connecting to a third-party PLC. In this case, the connection parameters (IP address, rack, slot) must be entered manually. Integrated connections are easier to configure and maintain, but non-integrated connections are necessary for multi-vendor systems. In our factory, we recommend using integrated connections whenever possible to reduce configuration errors.
Question 3: How do I ensure that printed data matches the values displayed on the HMI screen?
Answer: The key is to use the same data source for both the display and the print output. In WinCC, the report layout should reference the same HMI variables that are used in the screen display. If the report uses archived data (from the Tag Logging archive) while the screen uses live data, there can be a difference if the archive update cycle is slower than the screen update cycle. To ensure consistency, configure the archive cycle to match the screen update cycle, or use the “current value” option in the report layout. In our factory, we recommend testing the print output against the screen display after any configuration change. A simple verification is to print a report immediately after reading a value from the screen and compare the two.

Summary for Automation Engineers

Integrating a Siemens PLC with an HMI and printer involves three steps: establishing the physical network connection, creating the logical HMI connection and mapping variables, and configuring the print job. The HMI connection is created in the “Devices & Networks” editor and uses PROFINET or Ethernet. Variables are mapped from the PLC to the HMI variable table and then linked to display objects. Printing can be done directly from the HMI or through a PLC communication module. The most common issues are access point mismatches and baud rate mismatches, both of which are resolved by verifying the configuration parameters. Yueyang Tongtu E-commerce Co., Ltd. supplies Siemens PLC, HMI, and communication modules for these integration projects.

Yueyang Tongtu E-commerce Co., Ltd. provides Siemens automation components including PLCs, HMI panels, and CP 340/341 communication modules. We offer technical support for connection configuration and sample programs.

Need help integrating Siemens PLC with HMI and printer for your project? Contact Yueyang Tongtu E-commerce Co., Ltd. for a consultation. We will review your requirements and recommend the optimal configuration.
Previous:No News
Next:No News

Leave Your Message

  • Click Refresh verification code