Skip to main content

Secondary Development Protocol

Function Code Introduction

Function CodeDescription
03Read Holding Registers
06Write Single Holding Register
10Write Multiple Holding Registers

Register Address Description

Address (HEX)Address Storage ContentRegister ValueAccessModbus Function Code
4x0000
4x0001
Channel 1 Frequency High 16-bit
Channel 1 Frequency Low 16-bit
Value is unsigned 32-bit hexadecimal, unit 0.01 Hz, range: 100~20000000, i.e., 1 Hz~200 kHzRead/Write0x03,0x06,0x10
4x0002Channel 1 Duty CycleValue is unsigned 16-bit hexadecimal, unit 0.01%, range 0~1000, i.e., 0~100%Read/Write0x03,0x06,0x10
4x0003
4x0004
Channel 2 Frequency High 16-bit
Channel 2 Frequency Low 16-bit
Value is unsigned 32-bit hexadecimal, unit 0.01 Hz, range: 100~20000000, i.e., 1 Hz~200 kHzRead/Write0x03,0x06,0x10
4x0005Channel 2 Duty CycleValue is unsigned 16-bit hexadecimal, unit 0.01%, range 0~1000, i.e., 0~100%Read/Write0x03,0x06,0x10
4x0006
4x0007
Channel 3 Frequency High 16-bit
Channel 3 Frequency Low 16-bit
Value is unsigned 32-bit hexadecimal, unit 0.01 Hz, range: 100~20000000, i.e., 1 Hz~200 kHzRead/Write0x03,0x06,0x10
4x0008Channel 3 Duty CycleValue is unsigned 16-bit hexadecimal, unit 0.01%, range 0~1000, i.e., 0~100%Read/Write0x03,0x06,0x10
4x0009
4x000A
Channel 4 Frequency High 16-bit
Channel 4 Frequency Low 16-bit
Value is unsigned 32-bit hexadecimal, unit 0.01 Hz, range: 100~20000000, i.e., 1 Hz~200 kHzRead/Write0x03,0x06,0x10
4x000BChannel 4 Duty CycleValue is unsigned 16-bit hexadecimal, unit 0.01%, range 0~1000, i.e., 0~100%Read/Write0x03,0x06,0x10
4x2000Serial Port ParametersHigh byte: parity mode: 0x00~0x02
Low byte: baud rate mode: 0x00~0x07
Read/Write0x03,0x06
4x4000Device AddressStores Modbus address directly
Device address: 0x0001-0x00FF
Read/Write0x03,0x06
4x8000Software VersionConvert to decimal, then shift decimal point two places left for version
0x0064 = 100 = V1.00
Read0x03
  • Note: It is recommended to use function code 10 to set frequency with multiple registers simultaneously. Using function code 06 to operate a single register may output an unknown frequency.

Operation Command Description

Set Channel Output Command

Transmission Code: 01 10 00 00 00 03 06 00 01 86 A0 13 88 FF 7C

FieldDescriptionNote
01Device Address0x00 indicates broadcast address; 0x01-0xFF indicate device address
10Write Multiple Registers Command
00 00Register Start AddressChannel start register
00 03Number of RegistersNumber of registers to set
06Byte CountNumber of output bytes
00 01
86 A0
13 88
Register Data
Frequency High 16-bit
Frequency Low 16-bit
Duty Cycle
Frequency is unsigned 32-bit hexadecimal, unit 0.01 Hz, range: 100~20000000, i.e., 1 Hz~200 kHz
Duty Cycle is unsigned 16-bit hexadecimal, unit 0.01%, range 0~1000, i.e., 0~100%
FF 7CCRC16CRC16 checksum of the first 6 bytes of data

Return Code: 01 10 00 00 00 03 80 08

FieldDescriptionNotes
01Device Address0x00 indicates broadcast address; 0x01-0xFF indicate device address
10Write Multiple Registers Command
00 00Register Start Address0x0000 - 0x0007 correspond to output channels 1~8
00 03Number of RegistersNumber of registers set, cannot exceed maximum channel count
80 08CRC16CRC16 checksum of the first 6 bytes of data

Example: Device address 1

Set channel 2 output 200 Hz 10% duty cycle : 01 10 00 00 00 03 06 00 00 4E 20 03 E8 F0 DC
Set channels 1\~4 output 1 kHz 50% duty cycle : 01 10 00 00 00 0C 18 00 01 86 A0 13 88 00 01 86 A0 13 88 00 01 86 A0 13 88 00 01 86 A0 13 88 6E E5

Set Channel Frequency Command

Transmission Code: 01 10 00 00 00 02 04 00 01 86 A0 C0 77

FieldDescriptionNotes
01Device Address0x00 indicates broadcast address; 0x01-0xFF indicate device address
10Write Multiple Registers Command
00 00Register Start AddressChannel start register, 00 00 indicates channel 1 start register
00 02Number of RegistersNumber of registers to set, value is unsigned 32-bit hexadecimal, each register is 16-bit
04Byte CountNumber of output bytes
00 01
86 A0
Register Data
Frequency High 16-bit
Frequency Low 16-bit
Frequency is unsigned 32-bit hexadecimal, unit 0.01 Hz, range: 100~20000000, i.e., 1 Hz~200 kHz
C0 77CRC16CRC16 checksum of the first 6 bytes of data

Return Code: 01 10 00 00 00 02 41 C8

FieldDescriptionNotes
01Device Address0x00 indicates broadcast address; 0x01-0xFF indicate device address
10Write Multiple Registers Command
00 00Register Start Address0x0000 - 0x0007 correspond 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 channel 2 output 200 Hz : 01 10 00 00 00 02 04 00 00 4E 20 C7 D7

Set Channel Duty Cycle Command

Transmission Code: 01 06 00 02 07 D0 2B A6

FieldDescriptionNotes
01Device Address0x00 indicates broadcast address; 0x01-0xFF indicate device address
0606 CommandWrite Single Holding Register
00 02Register AddressChannel 1 duty cycle register
07 D0Register DataDuty cycle is unsigned 16-bit hexadecimal, unit 0.01%, range 0~1000, i.e., 0~100%
2B A6CRC16CRC16 checksum of the first 6 bytes of data

Return Code: 01 06 00 02 07 D0 2B A6

FieldDescriptionNotes
01Device Address0x00 indicates broadcast address; 0x01-0xFF indicate device address
0606 CommandWrite Single Holding Register
00 02Register addressChannel duty cycle register
07 D0Register DataDuty cycle is unsigned 16-bit hexadecimal, unit 0.01%, range 0~1000, i.e., 0~100%
2B A6CRC16CRC16 checksum of the first 6 bytes of data

Example: Device with address 1

Set channel 1 duty cycle 20% : 01 06 00 02 07 D0 2B A6
Set channel 2 duty cycle 50% : 01 06 00 05 13 88 94 9D
Set channel 4 duty cycle 20% : 01 06 00 0B 23 28 E1 26

Read Channel Output Command

Transmission Code: 01 03 00 00 00 0C 45 CF

FieldDescriptionNotes
01Device Address0x00 indicates broadcast address; 0x01-0xFF indicate device address
0303 CommandRead Holding Registers
00 00Register Start Address0x0000 - 0x0007 correspond to input channels 1~8
00 0CNumber of RegistersNumber of registers to read, cannot exceed maximum channel count
45 CFCRC16CRC16 checksum of the first 6 bytes of data

Return Code: 01 03 18 00 01 86 A0 13 88 00 01 86 A0 13 88 00 01 86 A0 13 88 00 01 86 A0 13 88 90 CE

FieldDescriptionNotes
01Device Address0x00 indicates broadcast address; 0x01-0xFF indicate device address
0303 CommandRead Holding Registers
18Byte CountTotal bytes of returned status information
00 01 86 A0 13 88
……
Output ValuesSequentially frequency and duty cycle for channels 1~4
Frequency is unsigned 32-bit hexadecimal, unit 0.01 Hz, range: 100~20000000, i.e., 1 Hz~200 kHz
Duty Cycle is unsigned 16-bit hexadecimal, unit 0.01%, range 0~1000, i.e., 0~100%
90 CECRC16CRC16 checksum of the first 6 bytes of data

Example: Device with address 1

Read channel 1 data : 01 03 00 00 00 03 05 CB
Read channel 1 duty cycle : 01 03 00 02 00 01 25 CA
Read channel 3 data : 01 03 00 06 00 03 E5 CA

Set Baud Rate Command

Transmission Code: 00 06 20 00 00 05 43 D8

FieldDescriptionNotes
00Device Address0x00 indicates broadcast address; 0x01-0xFF indicate device address
0606 CommandSet baud rate, set device address
20 00Command Register0x2000 for setting baud rate, 0x4000 for setting device address
00Parity Mode0x00 for no parity, 0x01 for odd parity, 0x02 for even parity
05Baud Rate ValueBaud rate value mapping:
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 indicates broadcast address; 0x01-0xFF indicate device address
0606 CommandSet baud rate, set device address
20 00Command Register0x2000 for setting baud rate, 0x4000 for setting device address
00Parity Mode0x00 for no parity, 0x01 for odd parity, 0x02 for even parity
05Baud RateBaud rate value mapping:
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 115200 : 00 06 20 00 00 05 43 D8

Set Device Address Command

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

FieldDescriptionNotes
00Device Address0x00 indicates broadcast address; 0x01-0xFF indicate device address
0606 CommandSet baud rate, set device address
40 00Command Register0x2000 for setting baud rate, 0x4000 for setting device address
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 indicates broadcast address; 0x01-0xFF indicate device address
0606 CommandSet baud rate, set device address
40 00Command Register0x2000 for setting baud rate, 0x4000 for setting device address
00 01Device AddressDevice address set, 0x0001-0x00FF
5C 1BCRC16CRC16 checksum of the first 6 bytes of data

Example: Device with address 1

Set device address to 0x01 : 00 06 40 00 00 01 5C 1B
Set device address to 0x02 : 00 06 40 00 00 02 1C 1A
Set 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 indicates broadcast address; 0x01-0xFF indicate device address
0303 CommandRead device address command
40 00Command Register0x4000 for reading device address, 0x8000 for reading 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
01Device Address0x00 indicates broadcast address; 0x01-0xFF indicate 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
Return Code : 02 03 02 00 02 7D 85 //Address 0x02

Read Software Version Command

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

FieldDescriptionNotes
00Device Address0x00 indicates broadcast address; 0x01-0xFF indicate device address
0303 CommandRead software version, read device address command
80 00Command Register0x4000 for reading device address, 0x8000 for reading software version
00 01Byte CountFixed 0x0001
AC 1BCRC16CRC16 checksum of the first 6 bytes of data

Return Code: 01 03 02 00 64 B9 AF

FieldDescriptionNotes
01Device Address0x00 indicates broadcast address; 0x01-0xFF indicate device address
0303 CommandRead software version, read device address command
02Byte CountReturned byte count
00 64Software VersionConvert to decimal, then shift decimal point two places left for version
0x0064 = 100 = V1.00
B9 AFCRC16CRC16 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: 01 03 02 00 64 B9 AF //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