Skip to main content

Development Protocol

Function Code Introduction

Function CodeDescription
01Read Output Status
02Read Input Status
03Read Holding Registers
05Write Single Output Channel
06Write Single Register
0FWrite Multiple Output Channels
10Write Multiple Registers

Register Address Description

Address (HEX)Content StoredRegister ValueAccessModbus Function Code
0x0000 ~ 0x0001Output Channel 1 ~ Output Channel 2 Address0xFF00: ON;
0x0000: OFF;
0x5500: Toggle
R/W0x01, 0x05, 0x0F
0x00FFOperate All Registers0xFF00: All Output ON;
0x0000: All Output OFF;
0x5500: All Output Toggle
W0x05, 0x0F
0x0100 ~ 0x0101Output Channel 1 ~ Output Channel 2 Address0xFF00: Toggle;
0x0000: No Change
W0x05
0x0200 ~ 0x0201Output Channel 1 ~ Output Channel 2 Flash ONDelay time = data × 100 ms
Value: 0x0007, delay: 7 × 100 ms = 700 ms
W0x05
0x0400 ~ 0x0401Output Channel 1 ~ Output Channel 2 Flash OFFDelay time = data × 100 ms
Value: 0x0007, delay: 7 × 100 ms = 700 ms
W0x05
1x0000 ~ 1x0001Input Channel 1 ~ Input Channel 2 AddressStatus of input channels 1~2R0x02
3x0000 ~ 3x0001Analog Input Channel 1 ~ Analog Input Channel 2 DataUnsigned hexadecimal valueR0x04
4x0000 ~ 4x0001Analog Output Channel 1 ~ Analog Output Channel 2 DataUnsigned hexadecimal valueR/W0x03, 0x06, 0x10
4x1000 ~ 4x1001Output Channel 1 ~ Output Channel 2 Control Mode0x0000~0x0003 Four control modesR/W0x03, 0x06, 0x10
4x3000 ~ 4x3001Analog Input Channel 1 ~ Analog Input Channel 2 Data Type0x0000~0x0004 Five rangesR/W0x03, 0x06, 0x10
4x2000Serial ParametersHigh byte: parity (0x000x02)
Low byte: baud rate (0x00
0x07)
R/W0x03, 0x06
4x4000Device AddressDirectly stores Modbus address
Device address: 0x0001~0x00FF
R/W0x03, 0x06
4x8000Software VersionConvert to decimal and shift decimal point left two places
0x0064 = 100 = V1.00
R0x03

Modbus RTU Digital Channel Commands

Control a Single Output Channel

Transmission Code: 01 05 00 00 FF 00 8C 3A

FieldDescriptionNotes
01Device Address0x00: broadcast; 0x01-0xFF: device address
05Command 05Write single output channel
00 00AddressRegister address of output channel to control, 0x0000-0x0001
FF 00Command0xFF00: ON;
0x0000: OFF;
0x5500: Toggle
8C 3ACRC16CRC16 checksum of the first 6 bytes of data

Return Code: 01 05 00 00 FF 00 8C 3A

FieldDescriptionNotes
01Device Address0x00: broadcast; 0x01-0xFF: device address
05Command 05Write single output channel
00 00AddressRegister address of output channel to control, 0x0000-0x0001
FF 00Command0xFF00: ON;
0x0000: OFF;
0x5500: Toggle
8C 3ACRC16CRC16 checksum of the first 6 bytes of data

Example: Device with address 1

Output channel 0 ON : 01 05 00 00 FF 00 8C 3A
Output channel 0 OFF : 01 05 00 00 00 00 CD CA
Output channel 1 ON : 01 05 00 01 FF 00 DD FA
Output channel 1 OFF : 01 05 00 01 00 00 9C 0A

Control All Relay Output Channels

Transmission Code: 01 05 00 FF FF 00 BC 0A

FieldDescriptionNotes
01Device Address0x00: broadcast; 0x01-0xFF: device address
05Command 05Write single output channel
00 FFAddressFixed 0x00FF
FF 00Command0xFF00: ON;
0x0000: OFF;
0x5500: Toggle
BC 0ACRC16CRC16 checksum of the first 6 bytes of data

Return Code: 01 05 00 FF FF 00 BC 0A

FieldDescriptionNotes
01Device Address0x00: broadcast; 0x01-0xFF: device address
05Command 05Write single output channel
00 FFAddressFixed 0x00FF
FF 00Command0xFF00: ON;
0x0000: OFF;
0x5500: Toggle
BC 0ACRC16CRC16 checksum of the first 6 bytes of data

Example: Device with address 1

All output channels ON : 01 05 00 FF FF 00 BC 0A
All output channels OFF : 01 05 00 FF 00 00 FD FA
All output channels TOGGLE: 01 05 00 FF 55 00 C2 AA

Read Relay Output Channel Status

Transmission Code: 01 01 00 00 00 02 BD CB

FieldDescriptionNotes
01Device Address0x00: broadcast; 0x01-0xFF: device address
01Command 01Query output channel status
00 00Output start addressRegister address of output channel, 0x0000-0x0001
00 08Number of output channelsNumber of output channels to read, cannot exceed max
3D CCCRC16CRC16 checksum of the first 6 bytes of data

Return Code: 01 01 01 00 51 88

FieldDescriptionNotes
01Device Address0x00: broadcast; 0x01-0xFF: device address
01Command 01Query output channel status
00 00Output start addressRegister address of output channel, 0x0000-0x0001
00 08Number of output channelsNumber of output channels to read, cannot exceed max
3D CCCRC16CRC16 checksum of the first 6 bytes of data

Example: Device with address 1

Transmit: 01 01 00 00 00 02 BD CB
Receive: 01 01 01 00 51 88 // All output channel OFF
Transmit: 01 01 00 00 00 02 BD CB
Receive: 01 01 01 01 90 48 // Output channel 0 ON, others OFF

Write Relay Output Channel Status

Transmission Code: 01 0F 00 00 00 02 01 03 9E 96

FieldDescriptionNotes
01Device Address0x00: broadcast; 0x01-0xFF: device address
0FCommand 0FWrite output channel status
00 00Output start addressRegister address of output channel to control, 0x0000-0x0001
00 08Number of output channelsNumber of output channels to operate, cannot exceed max
01Byte countNumber of status bytes
03Output statusBit0: start output channel;
Bit1: next output channel;
high bits zero if idle
9E 96CRC16CRC16 checksum of the first 6 bytes of data

Return Code: 01 0F 00 00 00 02 D4 0A

FieldDescriptionNotes
01Device Address0x00: broadcast; 0x01-0xFF: device address
0FCommand 0FWrite multiple relay status command
00 00Output addressRegister address of output channel, 0x0000-0x0007
00 02Number of outputsNumber of output channels operated
D4 0ACRC16CRC16 checksum of the first 6 bytes of data

Example: Device with address 1

All output channels ON : 01 0F 00 00 00 02 01 FF 9E D7
All output channels OFF : 01 0F 00 00 00 02 01 00 DE 97
Channel 0 ON; Channel 1 OFF: 01 0F 00 00 00 02 01 01 1F 57

Relay Output Channel Flash ON/OFF Commands

Transmission Code: 01 05 02 00 00 07 8D B0

FieldDescriptionNotes
01Device Address0x00: broadcast; 0x01-0xFF: device address
05Command 05Single control command
02Sub-command02 = Flash ON, 04 = Flash OFF
00Output channel addressOutput channel address, 0x00~0x07
00 07Interval timeDelay time = data × 100 ms
Value: 0x0007, delay: 7 × 100 ms = 700 ms
Max flash ON/OFF time 0x7FFF
8D B0CRC16CRC16 checksum of the first 6 bytes of data

Return Code: 01 05 02 00 00 07 8D B0

FieldDescriptionNotes
01Device Address0x00: broadcast; 0x01-0xFF: device address
05Command 05Single control command
02Sub-command02 = Flash ON, 04 = Flash OFF
00Output channel addressOutput channel address, 0x00~0x07
00 07Interval timeDelay time = data × 100 ms
Value: 0x0007, delay: 7 × 100 ms = 700 ms
Max flash ON/OFF time 0x7FFF
8D B0CRC16CRC16 checksum of the first 6 bytes of data

Example: Device with address 1

Output channel 0 flash ON: 01 05 02 00 00 07 8D B0 //700MS = 7*100MS = 700MS
Output channel 1 flash ON: 01 05 02 01 00 08 9C 74 //800MS
Output channel 0 flash OFF: 01 05 04 00 00 05 0C F9 //500MS
Output channel 1 flash OFF: 01 05 04 01 00 06 1D 38 //600MS

Read Digital Input Channel Status

Transmission Code: 01 02 00 00 00 02 F9 CB

FieldDescriptionNotes
01Device Address0x00: broadcast; 0x01-0xFF: device address
02Command 02Read input status command
00 00Input start addressInput register address, 0x0000-0x0001
00 02Number of registersNumber of input channels to read, cannot exceed max
F9 CBCRC16CRC16 checksum of the first 6 bytes

Return Code: 01 02 01 00 A1 88

FieldDescriptionNotes
01Device Address0x00: broadcast; 0x01-0xFF: device address
02Command 02Read input status command
01Byte countTotal number of bytes in the status information
00Query statusInput channel status:

Bit0 = start input channel,
Bit1= next channel status, etc.
high bits zero if idle
A1 88CRC16CRC16 checksum of the first 6 bytes of data

Example: Device with address 1

Transmit: 01 02 00 00 00 02 F9 CB
Return: 01 02 01 00 A1 88 //Inputs are all untriggered
Transmit: 01 02 00 00 00 02 F9 CB
Return: 01 02 01 01 60 48 //Channel 1 input is triggered, and the rest of channels are not triggered

Read Relay Output Channel Control Mode

Transmit: 01 03 10 00 00 02 C0 CB

FieldDescriptionNotes
01Device Address0x00 indicates broadcast address; 0x01-0xFF indicate device address
0303 CommandRead Holding Registers
10 00Register start address0x1000-0x1007 corresponds to output channels 1~8
00 02Number of registersNumber of registers to read, maximum 8 channels
C0 CBCRC16CRC16 checksum of the first 6 bytes

Return code: 01 03 04 00 00 00 00 FA 33

FieldDescriptionNotes
01Device Address0x00: broadcast; 0x01-0xFF: device address
03Command 03Read holding registers
04Byte countTotal number of bytes in the status information
00 00
......
00 00
Control modeControl mode for output channels 12, 0x00000x0003 indicate four control modes:

0x0000: Normal mode – output controlled directly by command;
0x0001: Linkage mode – output follows corresponding input;
0x0002: Toggle mode – output toggles on each input pulse;
0x0003: Edge Trigger Mode – output toggles on each input level change
FA 33CRC16CRC16 checksum of the first 6 bytes
Note

Except for Link mode, all other modes also support command control of output channels.

Example: Device with address 1

Read output channel 1 control mode : 01 03 10 00 00 01 80 CA
Read output channel 2 control mode : 01 03 10 01 00 01 D1 0A

Set Single Output Channel Control Mode

Transmission Code: 01 06 10 00 00 01 4C CA

FieldDescriptionNotes
01Device Address0x00: broadcast; 0x01-0xFF: device address
06Command 06Write single register command
10 00Register start address0x1000-0x1007 corresponds to output channels 1~8 control mode
00 01Control modeControl modes for output channels 18, 4 control modes (0x00000x0003):

0x0000: Normal mode – output controlled directly by command;
0x0001: Linkage mode – output follows corresponding input;
0x0002: Toggle mode – output toggles on each input pulse;
0x0003: Edge Trigger Mode – output toggles on each input level change
4C CACRC16CRC16 checksum of the first 6 bytes of data
Note

Except for Linkage mode, all other modes also support command control of output channels.

Return Code: 01 06 10 00 00 01 4C CA

FieldDescriptionNotes
01Device Address0x00: broadcast; 0x01-0xFF: device address
06Command 06Write single register command
10 00Register start address0x1000-0x1001 corresponds to output channels 1~2 control mode
00 01Control modeOutput channel control modes, 0x0000~0x0003 indicate four control modes
4C CACRC16CRC16 checksum of the first 6 bytes of data

Example: Device with address 1

Set output channel 1 to Linkage mode: 01 06 10 00 00 01 4C CA
Set output channel 2 to Toggle mode: 01 06 10 01 00 02 5D 0B

Set Multiple Output Channel Control Modes

Transmit: 01 10 10 00 00 02 04 00 01 00 01 AE 6F

FieldDescriptionNotes
01Device Address0x00: broadcast; 0x01-0xFF: device address
10Write Multiple Registers Command
10 00Register start address0x1000-0x1001 corresponds to output channels 1~2 control mode
00 02Number of registersNumber of registers to set, up to 2 channels
04Byte CountNumber of output bytes
00 01
......
00 01
Control modeControl mode for output channels 12, 0x00000x0003 indicate four control modes:

0x0000: Normal mode – output controlled directly by command;
0x0001: Linkage mode – output follows corresponding input;
0x0002: Toggle mode – output toggles on each input pulse;
0x0003: Edge Trigger Mode – output toggles on each input level change
AE 6FCRC16CRC16 checksum of the first 6 bytes
Note

Except for Linkage mode, all other modes also support command control of output channels.

Return Code: 01 10 10 00 00 02 45 08

FieldDescriptionNotes
01Device Address0x00: broadcast; 0x01-0xFF: device address
10Write Multiple Registers Command
10 00Register start address0x1000-0x1007 corresponds to output channels 1~8 control mode
00 02Number of registersNumber of registers to set, up to 8 channels
45 08CRC16CRC16 checksum of the first 6 bytes of data

Example: Device with address 1

Set channels 1-2 output as Linkage mode: 01 10 10 00 00 02 04 00 01 00 01 AE 6F
Set channels 1-2 output as Normal mode: 01 10 10 00 00 02 04 00 00 00 00 3E 6F

Modbus RTU Analog Channel Commands

Set Single Analog Output Channel

Send code: 01 06 00 00 03 E8 89 74

FieldDescriptionNotes
01Device Address0x00: broadcast; 0x01-0xFF: device address
06Command 06Write single register command
00 00Register address0x0000-0x0007 corresponds to output channels 1~8
03 E8Set ValueHex value, unit μA, high byte first
0x03E8 = 1000 μA = 1 mA
89 74CRC16CRC16 checksum of the first 6 bytes of data

Return Code: 01 06 00 00 03 E8 89 74

FieldDescriptionNotes
01Device Address0x00: broadcast; 0x01-0xFF: device address
06Command 06Write single register command
00 00Register address0x0000-0x0007 corresponds to output channels 1~8
03 E8Set ValueHex value, unit μA, high byte first
0x03E8 = 1000 μA = 1 mA
89 74CRC16CRC16 checksum of the first 6 bytes of data

Example: Device with address 1

Set channel 1 output 1mA : 01 06 00 00 03 E8 89 74
Set channel 2 output 5mA : 01 06 00 01 13 88 D5 5C

Set Multiple Analog Output Channels

Transmit: 01 10 00 00 00 02 04 03 E8 03 E8 73 61

FieldDescriptionNotes
01Device Address0x00: broadcast; 0x01-0xFF: device address
10Write Multiple Registers Command
00 00Register Start Address0x0000 - 0x0002 correspond to output channels 1~2
00 02Number of RegistersNumber of registers set, cannot exceed maximum channel count
04Byte CountNumber of output bytes
03 E8
......
03 E8
ValuesStart channel analog output
……
Final channel analog output
Hex, μA, high byte first,
0x03E8 = 1000 μA = 1 mA
73 61CRC16CRC16 checksum of the first 6 bytes of data

Return Code: 01 10 00 00 00 02 41 C8

FieldDescriptionNotes
01Device Address0x00: broadcast; 0x01-0xFF: device address
10Write Multiple Registers Command
00 00Register start address0x0000-0x0007 corresponds to output channels 1~8
00 02Number of RegistersNumber of registers set, cannot exceed maximum channel count
41 C8CRC16CRC16 checksum of the first 6 bytes of data

Example: Device with address 1

Set channels 1-2 output 1mA : 01 10 00 00 00 02 04 03 E8 03 E8 73 61
Set channels 1-2 output 2mA : 01 10 00 00 00 02 04 07 D0 07 D0 F0 8E

Read Analog Output

Transmit: 01 03 00 00 00 02 C4 0B

FieldDescriptionNotes
01Device Address0x00: broadcast; 0x01-0xFF: device address
03Command 03Read holding registers
00 00Starting register address0x0000 - 0x0001 correspond to relay control mode for channels 1~2
00 02Number of registersNumber of registers to read, cannot exceed maximum channel count
C4 0BCRC16CRC16 checksum of the first 6 bytes of data

Return Code: 01 03 04 03 E8 03 E8 7A FD

FieldDescriptionNotes
01Device Address0x00: broadcast; 0x01-0xFF: device address
03Command 03Read holding registers
04Byte countTotal number of bytes in the status information
03 E8
......
03 E8
Output valuesStart channel analog output
……
Final channel analog output
Hex, μA, high byte first,
0x03E8 = 1000 μA = 1 mA
7A FDCRC16CRC16 checksum of the first 6 bytes

Example: Device with address 1

Read channel 1 data type : 01 03 00 00 00 01 84 0A
Read channel 2 data type : 01 03 00 01 00 01 D5 CA

Read Analog Input

Transmission Code: 01 04 00 00 00 02 71 CB

FieldDescriptionNotes
01Device Address0x00: broadcast; 0x01-0xFF: device address
0404 CommandRead Input Registers
00 00Starting register address0x0000 - 0x0001 correspond to relay control mode for channels 1~2
00 02Number of registersNumber of registers to read, cannot exceed maximum channel count
71 CBCRC16CRC16 checksum of the first 6 bytes of data

Return Code: 01 04 04 00 00 00 00 FB 84

FieldDescriptionNotes
01Device Address0x00: broadcast; 0x01-0xFF: device address
0404 CommandRead Input Registers
04Byte CountData length
00 00
......
00 00
Register dataIndicates the analog values from channels 0 - 2
Unsigned 16-bit per channel, high byte first
Data range depends on the data type
FB 84CRC16CRC16 checksum of the first 6 bytes

Example: Device with address 1

Read analog input channel 1: 01 04 00 00 00 01 31 CA
Read analog input channel 2: 01 04 00 01 00 01 60 0A

Read Analog Input Channel Data Type

Transmit: 01 03 30 00 00 02 CB 0B

FieldDescriptionNotes
01Device Address0x00: broadcast; 0x01-0xFF: device address
03Command 03Read holding registers
30 00Register start address0x3000-0x3001 corresponds to input channels 1~2
00 02Number of registersNumber of registers to read, cannot exceed maximum channel count
CB 0BCRC16CRC16 checksum of the first 6 bytes

Return: 01 03 04 00 02 00 02 DA 32

FieldDescriptionNotes
01Device Address0x00: broadcast; 0x01-0xFF: device address
03Command 03Read holding registers
04Byte countTotal number of bytes in the status information
00 02
......
00 02
Data typeData type for channels 01, 0x0000 ~ 0x0004 0x00000x0004 represents five ranges:

0x0000: **Range 05V** (output 05000) or **010V** (output 010000) unit mV;
0x0001: **Range 15V** (10005000) or **210V** (200010000) mV;
0x0002: **Range 020mA** (020000) μA;
0x0003: **Range 420mA** (400020000) μA;
0x0004: Raw code output 0~4096, requires linear conversion
DA 32CRC16CRC16 checksum of the first 6 bytes

Example: Device with address 1

Read analog input channel 1 data type : 01 03 10 00 00 01 80 CA
Read analog input channel 2 data type : 01 03 10 01 00 01 D1 0A

Set Single Analog Input Channel Data Type

Transmit: 01 06 30 00 00 03 C6 CB

FieldDescriptionNotes
01Device Address0x00: broadcast; 0x01-0xFF: device address
06Command 06Write single register command
30 00Register start address0x3000-0x3001 corresponds to input channels 1~2 data type
00 03Channel data typeData type for channels, 0x0000 ~ 0x0004 represents five ranges:

0x0000: **Range 05V** (output 05000) or **010V** (output 010000) unit mV;
0x0001: **Range 15V** (10005000) or **210V** (200010000) mV;
0x0002: **Range 020mA** (020000) μA;
0x0003: **Range 420mA** (400020000) μA;
0x0004: Raw code output 0~4096, requires linear conversion
C6 CBCRC16CRC16 checksum of the first 6 bytes

Return Code: 01 06 30 00 00 03 C6 CB

FieldDescriptionNotes
01Device Address0x00: broadcast; 0x01-0xFF: device address
06Command 06Write single register command
30 00Register start address0x3000-0x3001 corresponds to input channels 1~2 data type
00 03Channel data typeData type for channels, 0x0000 ~ 0x0004 represents five ranges:

0x0000: **Range 05V** (output 05000) or **010V** (output 010000) unit mV;
0x0001: **Range 15V** (10005000) or **210V** (200010000) mV;
0x0002: **Range 020mA** (020000) μA;
0x0003: **Range 420mA** (400020000) μA;
0x0004: Raw code output 0~4096, requires linear conversion
C6 CBCRC16CRC16 checksum of the first 6 bytes

Example: Device with address 1

Set channel 1 data type to 0~20mA : 01 06 30 00 00 02 07 0B
Set channel 2 data type to 4~20mA : 01 06 30 00 00 03 C6 CB

Set Multiple Analog Input Channel Data Type

Transmit: 01 10 30 00 00 02 04 00 03 00 03 17 AF

FieldDescriptionNotes
01Device Address0x00: broadcast; 0x01-0xFF: device address
10Write Multiple Registers Command
30 00Register start address0x3000-0x3001 corresponds to input channels 1~2 data type
00 02Number of RegistersNumber of registers set, cannot exceed maximum channel count
04Byte CountNumber of output bytes
00 03
......
00 03
Data typeData types for channels 07, 0x0000 ~ 0x0004 represents five ranges:

0x0000: **Range 0
5V** (output 05000) or **010V** (output 010000) unit mV;
0x0001: **Range 1
5V** (10005000) or **210V** (200010000) mV;
0x0002: **Range 0
20mA** (020000) μA;
0x0003: **Range 4
20mA** (400020000) μA;
0x0004: Raw code output 0
4096, requires linear conversion
17 AFCRC16CRC16 checksum of the first 6 bytes

Return Code: 01 10 30 00 00 02 4E C8

FieldDescriptionNotes
01Device Address0x00: broadcast; 0x01-0xFF: device address
10Write Multiple Registers Command
30 00Register start address0x3000-0x3001 corresponds to input channels 1~2 data type
00 02Number of RegistersNumber of registers set, cannot exceed maximum channel count
4E C8CRC16CRC16 checksum of the first 6 bytes of data

Example: Device with address 1

Set channels 1-2 data type to 4~20mA : 01 10 30 00 00 02 04 00 03 00 03 17 AF
Set channels 1-2 data type to 1~5V : 01 10 30 00 00 02 04 00 01 00 01 37 AE

Modbus RTU Communication Commands

Set Baud Rate Command

Transmission Code: 00 06 20 00 00 05 43 D8

FieldDescriptionNotes
00Device Address0x00: broadcast; 0x01-0xFF: device address
06Command 06Set baud rate, device address
20 00Command register0x2000: set baud rate; 0x4000: set device address; 0x8000: read software version
00Parity Mode0x00 for no parity, 0x01 for odd parity, 0x02 for even parity
05Baud rate valueCorresponding baud rates:
0x00:4800,
0x01:9600,
0x02:19200,
0x03:38400,
0x04:57600, 0x05:115200,
0x06:128000,
0x07:256000
43 D8CRC16CRC16 checksum of the first 6 bytes of data

Return Code: 00 06 20 00 00 05 43 D8

FieldDescriptionNotes
00Device Address0x00: broadcast; 0x01-0xFF: device address
06Command 06Set baud rate, device address
20 00Command register0x2000: set baud rate; 0x4000: set device address; 0x8000: read software version
00Parity Mode0x00 for no parity, 0x01 for odd parity, 0x02 for even parity
05Baud rate valueCorresponding baud rates:
0x00:4800,
0x01:9600,
0x02:19200,
0x03:38400,
0x04:57600, 0x05:115200,
0x06:128000,
0x07:256000
43 D8CRC16CRC16 checksum of the first 6 bytes of data

Example: Device with address 1

Set baud rate 4800 : 00 06 20 00 00 00 83 DB
Set baud rate 9600 : 00 06 20 00 00 01 42 1B
Set baud rate 19200 : 00 06 20 00 00 02 02 1A
Set baud rate 38400 : 00 06 20 00 00 03 C3 DA
Set the baud rate as 57600: 00 06 20 00 00 04 82 18
Set the baud rate as 115200: 00 06 20 00 00 05 43 D8
Set the baud rate as 128000: 00 06 20 00 00 06 03 D9
Set the baud rate as 256000: 00 06 20 00 00 07 C2 19

Set Device Address Command

Transmission Code: 00 06 40 00 00 01 5C 1B

FieldDescriptionNotes
00Device Address0x00: broadcast; 0x01-0xFF: device address
06Command 06Set baud rate, device address
40 00Command register0x2000: set baud rate; 0x4000: set device address; 0x8000: read software version
00 01Device addressDevice address set, 0x0001-0x00FF
5C 1BCRC16CRC16 checksum of the first 6 bytes of data

Return Code: 00 06 40 00 00 01 5C 1B

FieldDescriptionNotes
00Device Address0x00: broadcast; 0x01-0xFF: device address
06Command 06Set baud rate, device address
40 00Command register0x2000: set baud rate; 0x4000: set device address; 0x8000: read software version
00 01Device addressDevice address set, 0x0001-0x00FF
5C 1BCRC16CRC16 checksum of the first 6 bytes

Example: Device with address 1

Set the device address to 0x01: 00 06 40 00 00 01 5C 1B
Set the device address to 0x02: 00 06 40 00 00 02 1C 1A
Set the device address to 0x03: 00 06 40 00 00 03 DD DA

Read Device Address Command

Transmission code: 00 03 40 00 00 01 90 1B

FieldDescriptionNotes
00Device Address0x00: broadcast; 0x01-0xFF: device address
0303 CommandRead device address command
40 00Command register0x2000: set baud rate; 0x4000: set device address; 0x8000: read software version
00 01Byte CountFixed 0x0001
90 1BCRC16CRC16 checksum of the first 6 bytes of data

Return code: 01 03 02 00 01 79 84

FieldDescriptionNotes
00Device Address0x00: broadcast; 0x01-0xFF: device address
0303 CommandRead software version, read device address command
02Byte countReturned byte count
00 01Device addressDevice address set, 0x0001-0x00FF
79 84CRC16CRC16 checksum of the first 6 bytes of data

Example: Device with address 2

Transmission Code: 00 03 40 00 00 01 90 1B
Receive: 00 03 02 00 02 04 45 //Address: 0x02

Read Software Version Command

Transmission Code: 00 03 80 00 00 01 AC 1B

FieldDescriptionNotes
00Device Address0x00: broadcast; 0x01-0xFF: device address
0303 CommandRead software version, read device address command
80 00Command register0x2000: set baud rate; 0x4000: set device address; 0x8000: read software version
00 01Byte CountFixed 0x0001
AC 1BCRC16CRC16 checksum of the first 6 bytes of data

Return Code: 00 03 02 00 C8 84 12

FieldDescriptionNotes
00Device Address0x00: broadcast; 0x01-0xFF: device address
0303 CommandRead software version, read device address command
02Byte CountReturned byte count
00 C8Software versionConvert to decimal and shift decimal point left two places:
0x00C8 = 200 = V2.00
84 12CRC16CRC16 checksum of the first 6 bytes of data

Example: Device with address 1

Transmission Code: 00 03 80 00 00 01 AC 1B
Return Code: 00 03 02 00 64 84 6F //0x0064 = 100 =V1.00

Exception Function Code Introduction

If the received command is incorrect or an exception occurs, the device will return an exception response. The exception response format is as follows:

Return Code: 01 85 03 02 91

FieldDescriptionNotes
01Device Address0x00 indicates broadcast address; 0x01-0xFF indicate device address
85Exception Function CodeException function code = Request function code + 0x80
03Byte CountException code
02 91CRC16CRC16 checksum of the first 6 bytes of data

The exception code is a single-byte value indicating the type of error. Several common exception codes defined by the Modbus protocol:

Exception CodeNameDescription
0x01Illegal FunctionThe requested function code is not supported
0x02Illegal Data AddressThe requested data address is incorrect
0x03Illegal Data ValueThe requested data value or operation cannot be performed
0x04Server FailureServer device failure
0x05AcknowledgeRequest received and processing
0x06Device BusyDevice is busy and cannot execute the requested operation