Article overview
1. Demo products
2. Configuration Tool
IOConfigTool
3. Communication Mode
XB6S-C01SP configured as Modbus RTU master
4. Demo slave
Modbus Slave serial debugging software (read/write with Function code 03/06)
5. Core operations
Set serial Communication Parameters → configure Modbus command codes node by node → Download the Configuration → read/write and check status via Upstream Data/Downstream data addresses
6. Key notes
The serial parameters of the master and slave must be exactly the same; for slave devices with slow responses, extend the Response timeout and Poll Delay appropriately
XB6S-EI2002 is a Slice-type EtherNet/IP Coupler from Shidian Technology, and XB6S-C01SP is a Serial Communication Module. When used together, XB6S-EI2002 handles EtherNet/IP Communication with the PLC, while XB6S-C01SP handles the Modbus RTU master function on the serial side — that is, after Configuration is completed in IOConfigTool, XB6S-C01SP acts as the master to actively read from and write to third-party Modbus RTU slave devices. So specifically, how do you set the serial Communication Parameters, configure Modbus commands node by node, and complete read/write control and Communication status judgment via the host computer's Downstream data and Upstream Data addresses?
The overall Configuration process consists of four steps: clarifying the slave's read/write requirements → setting the serial Communication Parameters on the host computer → filling in the Modbus command codes node by node and downloading them → performing read/write operations and status Monitoring via the Downstream data and Upstream Data addresses. This article uses the Modbus RTU-compatible serial debugging software Modbus Slave as the demo slave, demonstrating the entire Configuration process through reading 2 registers with Function code 03 and writing 2 registers with Function code 06.
I. Description of the demo slave
This example uses the Modbus RTU-compatible serial debugging software Modbus Slave as the slave for the case Configuration:
· Function code 03: read 2 registers
· Function code 10: write 2 registers
II. Configuring serial Communication Parameters on the host computer
1. Set Communication Mode to Modbus RTU master
After the module is scanned by the Host Software, click "Set" → "Debug" to enter Debug mode, then select the XB6S-C01SP module, click "Parameter Configuration" → "Communication Mode", and set Communication Mode to "Modbus RTU master".


2. Match serial port parameters
Fill in the baud rate, Stop Bit, Word Format and Parity Mode according to the serial port parameters of the slave, to ensure that the master and slave configurations are fully consistent.

3. Control word parameter setting
If the control word needs to be enabled, it is recommended to set Control Mode to "high level trigger", and set Response timeout to 200 ms and Poll Delay to 100 ms for higher communication stability.

Note: The default parameters result in a relatively fast polling speed, and some slower slave devices may fail to respond in time, causing errors. Appropriately extending Response timeout and Poll Delay can effectively improve communication stability.
4. Frame Interval
The Frame Interval parameter can generally be kept at the default value of 1.5T. If the serial port debugging assistant communicates normally with the module and also normally with the slave device, but the module cannot communicate with the slave device, try gradually increasing the Frame Interval value for testing.
III. Node Parameter Configuration
With Communication Mode set to Modbus RTU master and the control word enabled, fill in the parameters node by node according to the following rules. After configuration, click "Download" to download the parameters to the Coupler. This example configures 2 commands (Function code 03/06), using Node 1 to 3 in total.


Note: For Node 1, Parameter 1 should be filled in with the actual number of Nodes used this time (in this example, Node 2 to 3, 2 Nodes in total). Starting from Node 2, each Node corresponds to one Modbus command, and Parameter 1 is in hexadecimal format.
IV. Address read/write and communication status judgment
1. Read/write operation
Taking reading 2 holding registers starting from address 0000 of slave No. 01 via Function code 03 as an example, simulate the slave in Modbus Slave. The Configuration Results are as follows:

After the Configuration is complete, download control commands via the Downstream address of the host computer, and read status via the Upstream address. In this example, all addresses start from 0:

For Downstream data, enable Node 2 and Node 3 respectively. After writing the data to be sent for Node 3, click "Download":

In the Upstream Data of the host computer, the status word and alarm code of the corresponding set Node can be seen. At the same time, the values of two registers are read from address 0000 of Modbus Slave, and the values of two registers are written to address 0008:


2. Communication status judgment
During normal communication, the status word changes continuously (usually switching between 2 and 5), and the alarm code remains 0. If communication is abnormal, check the alarm code to locate the problem.
