Use this P4 reference for Xinje PLC/HMI communication questions, Modbus RTU/ASCII/TCP setup, XDPPro connection, HMI-to-PLC communication, status diagnosis, and troubleshooting.
Source anchors:
PLC 通讯 -> Modbus TCP graphic configuration, model/firmware support, slave nodes, instruction rows, trigger modes.soft-elements-and-special-relays.md: serial communication status relays such as SM140~SM193 and communication result registers such as SD140~SD199.Clarify:
| Item | Examples |
|---|---|
| Link type | PC-to-PLC, HMI-to-PLC, PLC-to-device, PLC-to-PLC. |
| Physical layer | USB, RS232, RS485, Ethernet. |
| Protocol | Xinje protocol, Modbus RTU, Modbus ASCII, Modbus TCP, XNET, Ethernet/IP, CANopen, EtherCAT. |
| Role | Master/client or slave/server. |
| Parameters | Station ID, IP, port, baud rate, data bits, stop bits, parity, timeout, retry count. |
| Data map | Coil/register address, function code, word width, signed/unsigned, float, byte/word order. |
| Version | PLC model, firmware, XDPPro version, HMI model/TouchWin version. |
Common paths:
选项 -> 通讯方式设置 for communication mode.选项 -> TCP/IP 设备设置 for Ethernet devices.选项 -> 软件串口设置 for serial settings.Troubleshooting:
In TouchWin project creation:
PLC 口 to the correct PLC/device type and communication parameters.下载口 to unused or to the correct communication device if it will communicate with lower devices.Common symptoms:
| Symptom | Checks |
|---|---|
| HMI shows “正在通讯” | Protocol, station, serial port, cable, COM occupancy, PLC port setting. |
| Values display wrong | Address notation, word width, signed/unsigned, float, scaling, byte order. |
| HMI button does not work | Button object address, station, PLC double-coil conflict, HMI permission/enable control. |
| Download port cannot communicate | Confirm download port is configured for communication mode, not only program download. |
Required parameters:
| Parameter | Notes |
|---|---|
| Station | Must match slave ID. |
| Baud rate | Match all devices on the bus. |
| Data bits / stop bits / parity | Must match exactly. |
| Wiring | RS485 A/B polarity, shield/grounding, termination for long/high-speed networks. |
| Function code | Coil/register read/write must match target map. |
| Register map | Confirm 0-based vs 1-based addressing and device-specific offsets. |
PLC-side concepts:
Diagnosis:
XDPPro path:
工程 -> PLC 通讯 -> Modbus TCP
The software manual describes model/firmware support and a graphic table with:
Use this when the PLC model/firmware supports graphical Modbus TCP. Otherwise route to the Ethernet communication manual or use instruction/socket method as appropriate.
From the current soft-element reference:
| Range | Use |
|---|---|
SM140~SM193 |
Serial-port communication status flags. |
SD140~SD199 |
Communication result registers. |
Example pattern:
SM140 Modbus executing, SM141 X-NET executing, SM142 free-format sending, SM143 free-format receive complete.SD140 is the Modbus read/write result for serial port 0 in the referenced XD/XL manual.Always verify the exact port group and model table before writing production diagnostics.