Share this

M Series Tutorial (Basic Course) | Hechuan TP2000 Series Touch Screen and M Controller - Modbus RTU Communication

2026-04-06 04:17:53 · · #1

Let's embark on a new chapter in M-series controller programming education, starting with the fundamental course – Hechuan TP2000 series touchscreen and M-controller Modbus RTU communication – and begin our learning journey!

01. Preliminary Preparations

Software: Sysctrl Studio (PLC programming software)

HCTDesigner 2 (HMI programming software)

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

Touchscreen (taking TP2507-E as an example)

02. Sysctrl Studio Project Configuration

Step 1: New Construction Project

Double-click to open the software Sysctrl Studio, select 【File】→【New】. Click 【Hardware Settings】 and make the following settings in the serial port interface. The station number is 1 by default, and the baud rate and protocol must be consistent with the touch screen settings. Select slave mode (touch screen as master) here.

Step 2: Establish 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.

After successful compilation, the program will be downloaded to the controller.

03. HCTDesigner 2 Project Configuration

Step 1: New Construction Project

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

(2) Select TP2507/TP2510 and click [Next].

(3) In the 【COM1】 interface, select the connected device (HMI as the master device), select Modbus compatible device for 【Manufacturer】, select Modbus RTUExtend for 【Device Type】, and enter Modbus_Serial for 【Device Alias】. In the communication settings, select RS485-2 for 【Communication Type】, and the baud rate, data bits, and parity bits must be consistent with the settings in the sysctrl project.

(4) Change the address base setting to 0

Click on [Advanced Settings] → [Address Base Setting] and change it to 0. If the address base is not changed to 0, address offset will occur.

In the project, the Modbus addresses of variables and touch screen components must correspond one-to-one for communication to be successful.

There are two ways to map addresses: one is the HMI symbol table (Part 4), and the other is standard Modbus address calculation (Part 5).

You can choose any method to map addresses.

04. HMI Symbol Table

Step 1: Generate the HMI symbol table (Sysctrl Studio project)

(1) Select "Tools" from the menu bar and click "HMI Symbol".

(2) The HMI symbol interface appears at the bottom. Click on "Add Project Symbol...", select the variable to be added in the pop-up window, and click "OK".

(3) Click on [Check Engineering Symbols] and the variables will be automatically assigned Modbus addresses.

(4) Click on 【Generate HMI Symbol Table…】, select Hechuan TP2000 series, select serial port for communication method, select Modbus_Serial for connection path, and the communication station number is 1 by default.

Note: In the HMI symbol table generation window, the name before the colon in the connection path must be consistent with the device alias.

(5) Save to computer. The generated CSV file will be used in the touch screen project.

Step 2: Import the HMI symbol table (HCTDesigner 2 project)

(1) Select [Library] from the top menu bar, then select [Address Tag Library].

(2) Select "CSV file" in "Import/Export File Format", click "Import", find the exported HMI symbol table, and click "Open".

(3) A pop-up window indicates that the import was successful. Click [Close].

(4) A pop-up window indicates that the save was successful.

Step 3: Create a new component

(1) Add a "switch" component. Right-click and select 【Add Component】→【Switch】→【Bit Setting】.

(2) In the pop-up window, select "Press" for "Action" and "Invert" for "Execution Settings". In the address field, check "Use address label", select the imported "data_bool" label, and click "OK".

(3) Add a "Number Input" component. Right-click and select 【Add Component】→【Number and Character Display】→【Number Input】.

(4) In the general properties interface, select numerical input for 【Operation Properties】, check 【Use Address Labels】, select the imported “data_int” label, and click 【OK】.

(5) Number format interface. Since the bound “data_int” label is of type int, select [16-bit signed number] as the data type.

(6) Similarly, create other components and bind the relevant variable labels. Text is added here for easy distinction.

Step 4: Download the program

(1) Click the “Download” icon in the top menu bar, select USB or Ethernet as the communication method, and click “Download”.

(2) A pop-up window displays "Download successful".

05. Standard Modbus Address Calculation

Address calculation relationship explanation:

The HCTDesigner2 software will have corresponding bit address symbols depending on the different connected devices.

In the M-series PLC, %IX represents the address of the input coil, and the corresponding touchscreen address is 1X; %QX represents the address of the output coil, and the corresponding touchscreen address is 0X; %MW represents the address of the intermediate register, and the corresponding touchscreen address is 4X.

The table below only applies to the address correspondence between M-series controllers and TP2000 series touchscreens.

The Modbus address conversion method is as follows:

Step 1: Create a new component

(1) Add a "switch" element. In the execution conditions, select "press" for [Action], select "invert" for [Execution Settings], select "Modbus_Serial" for [Device], select "4X_BIT" for [Address Type], and enter 0.0 in the [Address] field.

(%MX0.0 → 0/2 (round to the nearest integer). 0 = 0.0)

(2) Add a "Numerical Input" component. In the general properties interface, select Numerical Input for [Operation Properties], Modbus_Serial for [Device], 4X for [Address Type], and enter 1 in the [Address] field. (%MW1→ 1)

(3) Number format interface. Since the bound “data_int” label is of type int, select [16-bit signed number] as the data type.

(4) Similarly, create other components and bind the relevant variable labels.

Step 2: Create New Components. After setting up the components and variables, you can download the program to the touchscreen.

06. Communication Testing

Step 1: Device Connection

The touchscreen comes with a communication cable; cut off the rounded end. Strip the cable; 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 (DB9) to the touchscreen's COM port.

Step 2: Engineering Testing

In the Sysctrl Studio interface, put the program into monitoring mode and assign values ​​to the variables.

Meanwhile, the touchscreen displays the image below.

✦Control Technology Product Line✦

Read next

CATDOLL 123CM LuisaTPE

Height: 123cm Weight: 23kg Shoulder Width: 32cm Bust/Waist/Hip: 61/54/70cm Oral Depth: 3-5cm Vaginal Depth: 3-15cm Anal...

Articles 2026-02-22
CATDOLL 138CM Ya TPE

CATDOLL 138CM Ya TPE

Articles
2026-02-22