HomeKnowledgeXB6-C01SP feedback Modbus fault code details and troubleshooting methods

XB6-C01SP feedback Modbus fault code details and troubleshooting methods

2024-06-11
XB6-C01SP feedback Modbus fault code details and troubleshooting methods

↑ Solidot Slice serial communication moduleXB6-C01SP


The Modbus fault code, as the name implies, is the status code fed back by the Solidot Slice serial communication module XB6-C01SP during read/write operations in Modbus master mode. This fault code is mapped to the first byte of the upstream data. The following sections explain in detail the specific meanings of the fault codes that occur during actual use of the XB6-C01SP and the corresponding troubleshooting methods.

XB6-C01SP feedback Modbus fault code details and troubleshooting methods


1. Fault codes and notes

fault code

Note

0 x 00

No error

0 x 01

Illegal function code

0 x 02

Illegal data address

0 x 03

Illegal data

0 x 04

Slave device fault

0 x 10

Wrong station number

0 x 11

Wrong function code response

0 x 12

Wrong request length

0 x 13

Wrong response length

0 x 14

CRC check error

0 x 15

Invalid data frame

0xFF

Unknown error


2. Troubleshooting common Modbus fault codes


1. 0 x 00

1) The status word is 0 x 00 and the fed-back station number, function code, Register address, number of Registers, etc. all contain data. This indicates that data exchange between the module and the Modbus slave device was successful.

2) The status word is 0 x 00 and the fed-back station number, function code, Register address and number of Registers values are all 0. This indicates that the Downstream control word is not enabled, and does not mean that data exchange between the module and the Modbus slave device was successful.


2. 0 x 01, 0 x 02, 0 x 03, 0 x 04, 0 x 10, 0 x 11, 0 x 12, 0 x 13, 0 x 14, 0 x 15

If these fault codes occur, you can quickly locate and resolve them using the fault code notes above.


3. 0xFF

This is the most common fault code encountered in actual use. You can troubleshoot it in the following four areas:

1) RS485/RS232/RS422 wiring error

Check the wiring. Disconnect the wires at the module end and connect them to a USB-to-serial converter to test whether the same fault occurs. Refer to the following figure for correct wiring:

XB6-C01SP feedback Modbus fault code details and troubleshooting methods

note: Do not run a separate cable from the device to the USB-to-serial converter for testing; the test result would be meaningless


2) Polling time set too short

The default Modbus slave response Delay is 50 ms. In Modbus master mode, it sets the master polling time; once the downstream control word is enabled, the module continuously sends communication commands at the interval set by the parameter. In most cases, 0xFF is caused by leaving the default of 50 ms, so it is recommended to first increase the polling time to 300 ms or more for testing, as shown below:

XB6-C01SP feedback Modbus fault code details and troubleshooting methods


3) slave device fault

First use a USB-to-serial cable to establish communication with the slave device and make sure the slave device is fault-free.


4) parameter settings inconsistent with the slave

The communication mode, baud rate, stop bit, parity bit, character format, etc. do not match the slave. Correct parameters are as follows:

Parameter name

Description

Value range

Notes

Communicate
Mode

Communication Mode

0 

MRM

Modbus RTU master, i.e. RTU master mode

1 

MRS

Modbus RTU slave, i.e. RTU slave mode

2 

MAM

Modbus ASCII master, i.e. ASCII master mode

3 

MAS

Modbus ASCII slave, i.e. ASCII slave mode

4 

FP

Freeport, i.e. Freeport mode

5 

PT

PassThrough means Transparent Transmission mode

Serial Baud

Serial Baud

0 

1200 bps

1 

2400 bps

2 

4800 bps

3 

9600 bps

4 

19200 bps

5 

38400 bps

6 

57600 bps

7 

115200 bps

Serial Stop Bit

Stop Bit

0 

1 Bit

1 

2 Bits

Serial Parity

Parity

0 

None

1 

Odd

2 

Even

Serial
WordFormat

Word Format

0 

8 Bits

1 

7 Bits

Modbus Slave ID

Modbus slave station number [1]

1 ... 247

Valid in slave mode; default 1

Modbus slave
Respond Delay

Slave response delay/master polling
polling delay/FP output data trans
Send interval [2]

0 ... 65535

Unit: ms, default: 50


The above information is taken from the user manual of the Solidot Slice serial communication module XB6-C01SP. For more information, you can also download the full version from the official website. Quick link: https://www.solidotech.com/cn/products/xb6-c01sp