Share this

M Series Tutorial (Basic Course) | Hechuan TP3000 Series Touch Screen and M Controller Modbus TCP/RTU Communication

2026-04-06 04:51:22 · · #1

Let's embark on a new chapter in M-series controller programming education, starting with the fundamental course: Modbus TCP/RTU communication between the Hechuan TP3000 series touchscreen and the M-controller!

01

Preliminary preparations

Software: Sysctrl Studio (PLC programming software)

HCT_Designer_3 (HMI programming software)

Hardware: M-series controller (taking M312 as an example)

Touchscreen (taking TP3107-D as an example)

The TP3000 series touchscreen software provides a communication protocol specific to Hechuan controllers, which can directly correspond to addresses without calculation.

02

Modbus TCP communication

Sysctrl Studio Project Configuration

Step 1: New Construction Project

Double-click to open the software Sysctrl Studio and create a new project. In the default POU, create a new variable and assign it to the corresponding address.

Step 2: After successful compilation, download the program to the controller.

HCT_Designer_3 Project Configuration

Step 1: New Construction Project

(1) Open the HCT_Designer_3 software, select "File" in the upper left corner, and click "New Project". Enter the project name in the pop-up window, select the storage location, and click "OK".

(2) Click on [HMI Settings] to modify the touch screen IP address and ensure that the touch screen IP and the controller IP are in the same network segment.

(3) Right-click on [Network] and click [Open]. In the Network PLC interface, click [New]. Select HCFA (Hechuan) for [Manufacturer], select HCM-M300_Ethernet for [Series], and change the [IP Address] to 192.168.1.1 (this is the controller IP address).

Step 2: Create new variables

(1) Create a new switch element. In the [Controls] interface, click on the [Switch] element in the top menu bar, and draw the switch element in the editing screen.

(2) Switch Address Binding. Click the switch element and select the red box number 2. In the bit switch properties interface, select Invert for [Operation Type], and click the button to the right of the bit address. In the address input interface, select [Network], and enter 0.0 according to the address set in the Sysctrl project (here, select MX).

(3) Create a new numerical element. In the [Controls] interface, click the [Number] element in the top menu bar, and draw the numerical element in the editing screen.

(4) Click the numerical input element, and then click the button to the right of the monitoring address. In the 【Address Input】 pop-up window, select 【Network】, and according to the Sysctrl project settings, select MW for the address range, enter 1 below, and select 16-bit integer for the data type.

(5) Check the "Allow Input Address" box to indicate that values ​​can be assigned to components directly through the touchscreen interface. The input address setting is the same as the monitoring address; check the "Same as Monitoring Address" box here.

(6) Similarly, create other components and bind their corresponding addresses. To make them easier to distinguish, add text and modify the component background color.

(7) Download the program to the touchscreen. Click on [Tools], then select [Download Project].

Communication testing

Step 1: Device Connection

This tutorial uses the M controller HCM312-32MT6-D and the touch screen HC-TP3107-D. The Modbus TCP communication connection method is shown in the figure below.

Step 2: Engineering Testing

The Sysctrl project enters monitoring mode, and values ​​are assigned to variables.

At the same time, the touchscreen displays the corresponding values.

03

Modbus RTU communication

Sysctrl Studio Project Configuration

Step 1: New Construction Project

Double-click to open the software Sysctrl Studio and create a new project. Click on "Hardware Settings" and make the following settings in the serial port interface. The station number is 1 by default, the baud rate is 9600bps, the protocol is (8,E,1)RTU, and the master/slave mode is set to slave (the touchscreen acts as the master).

Step 2: Create new variables

Open the default POU, right-click in the variable declaration area and select "Add Variable" to create a new variable and assign it to the corresponding address.

HCT_Designer_3 Project Configuration

Step 1: New Construction Project

(1) Open the HCT_Designer_3 software, select "File" in the upper left corner, and click "New Project". Enter the project name in the pop-up window, select the storage location, and click "OK".

(2) Right-click on [COM1] and click [Open]. In the pop-up window, in the Network COM1 interface, select [HMI as Master Device]. Select HCFA (Hechuan) for [Manufacturer] and HCM-M300 _Serial for [Series]. In the protocol settings, the baud rate, parity, data bits, and stop bits must be consistent with the Sysctrl project.

Step 2: Create new variables

(1) Create a new switch element and bind its address. Click on the switch element and select the red box number 2. In the bit switch properties interface, select Invert for [Operation Type] and click the button to the right of the bit address. In the address input pop-up window, select [COM1]. Based on the address set in the Sysctrl project, select MX here and enter 0.0.

(2) Create a new numerical element. Click on the numerical input element, and then click the button to the right of the monitoring address. In the 【Address Input】 pop-up window, select 【COM1】. According to the Sysctrl project settings, select MW for the address range, enter 1 below, and select 16-bit integer for the data type.

(3) Check the "Allow Input Address" box to indicate that you can directly assign values ​​to components through the touchscreen interface. The input address setting is the same as the monitoring address; here, check "Same as Monitoring Address".

(4) Similarly, create other components and bind their corresponding addresses. After the components are created, download the program to the touchscreen.

Communication testing

Step 1: Device Connection

This tutorial uses the M controller HCM312-32MT6-D and the touch screen HC-TP3107-D. The Modbus RTU communication connection method is shown in the figure below.

The pin definitions for the DB9 male connector of the COM1 interface for the touchscreen are shown in the table below.

Cut off the rounded end of the communication cable, strip the wires, and the red wire represents 485+, the green wire represents 485-, and the yellow wire represents GND. Connect the red, green, and yellow wires to the controller ports D+, D-, and SG respectively. Connect the other end of the communication cable, the DB9 female connector, to the touchscreen's COM port.

Note: You can provide your own communication cable or purchase a Hechuan HMI serial cable separately (specifications: TP16-R4-8P-3.0M/TP16-R4-8P-5M).

Step 2: Engineering Testing

The Sysctrl project enters monitoring mode, and values ​​are assigned to variables.

At the same time, the touchscreen displays the corresponding values.

✦Control Technology Product Line✦


Read next

CATDOLL 135CM Laura

Crafted with attention to detail, this 135cm doll offers a well-balanced and realistic body shape that feels natural in...

Articles 2026-02-22