MODBUS-RTU full-color RGB light strip controller user manual

freeFree Technical Resource

This content is free to read, suitable for basic learning and search traffic.

MODBUS-RTU full-color RGB light strip controller user manual缩略图

I. Technical Parameters

Operating Temperature: -20-60 ℃

Operating Voltage: DC12V-DC24V

Output Current: 16A (per circuit)

Rated Power: 12V:<500W 24V:<1000W

Output Circuit: Three Channels: Red (R), Green (G), Blue (B)

Output Color: 16777216 (256 * 256 * 256) types

output connections: common anode

static power consumption:<0.3W

external dimensions: 88mm * 54mm * 59mm (length, width, height)

communication methods: RS485

baud rate: 4800 9600 19200 38400 57600 115200

communication protocol: proprietary protocol, MODBUS-RTU protocol, custom protocol

2, Functional Features

Multiple scenarios​:

  • Color control, infinite automatic dimming
  • Timer switch, full-color flashing, 7-color breathing

Flexible instructions​:

  • Custom instruction association control
  • Comes with IO control and remote IO control
  • Special instruction for color temperature adjustment of two-color tube lamp
  • Single loop and multi loop timed switch control
  • RGB light color control (up to 16 million colors)
  • Configurable baud rate, power on memory function, and recovery enable

Rich input and output functions​:

  • 2 programmable input IO
  • 6 programmable automatic scenarios
  • Delay control, delay input technology (convenient for docking with human body sensing)

Multiple load docking capabilities​:

  • Standard Gongyang RGB LED strip/lamp
  • Independent monochrome light strip, dual color temperature tube light

3, Seamless Multi Protocol

  • Our company's self defined agreement (recommended)
  • Industrial standard MODBUS protocol system
  • Up to 6 user customizable protocols (to be used in conjunction with our company's customized protocols)

4, Reliable security performance

  • RS485 communication control
  • 55A original imported MOS
  • Anti reverse power supply function, wide voltage 7-28V power supply
  • For applications in strong interference environments, high-speed isolated communication version can be selected
  • All use original components from large factories, with high cost-effectiveness. Industrial grade imported MCU has strong anti-interference ability

V. Terminal Description

V+: Module power supply positive pole (wide voltage 7-26V power supply) V -: Module power supply negative pole A: RS485 A terminal B: RS485 B terminal V+: Common positive RGB lamp positive pole (connected to the power supply V+) R: LED red (negative pole) G: LED green (negative pole) B: LED blue (negative pole)

MODBUS-RTU full-color RGB light strip controller user manual插图

VI. Controller Options Table

ModelCommunication InterfaceCommunication IsolationLoad CapacitySingle Loop Load CapacityPower Supply
WE102RS485None15A5A-
WE102ARS485None20A5A-
WE102BRS485have have None15A5A-
WE102CRS485None20A5A-
WE102DRS485None6A2A-
WE102ERS485Value8A2A-
WE102FRS485Debugging assistant download6A2A-

Explanation:

  1. The controller is a low-voltage DC controller, with a default supply voltage of DC: 7-28V.Suggest 12V or 24V. When applied to a power supply voltage greater than 28V, it is necessary to contact customer service personnel in advance for customization. The output port of the controller is a high-power MOS transistor, and it is strictly prohibited to short-circuit the load (output and V+). To prevent short circuit of the load, please choose a fuse tube that is suitable for the load power for protection. The load voltage of the controller should be consistent with the supply voltage.
  2. The output port of the controller is a high-power MOS transistor, and it is strictly prohibited to short-circuit the load (output and V+). To prevent short circuit of the load, please choose a fuse tube that is suitable for the load power for protection.
  3. The load voltage of the controller should be consistent with the supply voltage.

7. Communication Protocol Description

Self owned Protocol

This protocol is used to configure the RS485 communication parameters of the device. All commands start with 0xA5 and end with 0x5A.checksumstarts fromlength byteStart, toBefore checksum byteThe cumulative sum of all bytes (usually the lower 8 bits).


1. Set communication address (0xB0)

  • Function:Change the communication address of the device.
  • Important note:

o If there is anaddress dip switchon the device, this commandis invalidand will return a failure (0xB3). The address must be set using a dip switch.

o​Dial switch operation:

  • Factory default: All switches are on the non numeric side (1), with an address of 0xFF.
  • Set Address: Turn the switch to the digital side to indicate that the bit is 0, otherwise it is 1.
  • Power off operation is required!Live operation may damage the controller. After setting the dip switch
  • ,will be powered on again andwill take effect.

o Use this command to set the address:No need to power off, immediate effect, the new address will be saved.

  • Send Command (Host ->Device):
Byte PositionFieldValue (Hexadecimal)Description
1Starting Code0xA5Fixed Starting Symbol
2Length0x04The length of the command data portion (old address+command word+new address=3 bytes)
3Old Address0xXXCurrentAddress used for device communication (0x00-0FF)
4Command word0xB0Address setting command
5New address0xXXTo be setNew address(0x00-0FF)
6Checksum0xXXAccumulated sum fromlength (0x04)tonew address(SUM (0x04, old address, 0xB0, new address))
7End code0x5AFixed end symbol

·

  • Receive response (device ->host):
Byte positionFieldValue (hexadecimal)Description
1Starting code0xA5Fixed starting character
2Length0x03This response data part length (new address+command word=2 bytes)
3New address0xXXThe address currently used by the device (i.e. the set address)
4Command word0xB2/0xB30xB2=Successful Setting
0xB3=Failed Setting(usually caused by the presence of a dip switch)
5Checksum0xXXAccumulated Sum fromLength (0x03)toCommand Word(SUM (0x03, new address, command word))
6End Code0x5AFixed End Symbol

·


2. Query Communication Address (0xB1)

·Function:Query the current communication address of the device.

·Send Command (Host ->Device):

Byte PositionFieldValue (Hexadecimal)Description
1Start Code0xA5Fixed starting symbol
2Length0x03The length of the data portion of this command (address+command word=2 bytes)
3Address0xXX / 0xFFLocal address(Single query) or​0xFF​(Broadcast query, all devices will respond to the address)
4command word0xB1Address query command
5checksum0xXXFromLength (0x03)Go toCommand word (0xB1)Sum of Accumulation (SUM (0x03, Address, 0xB1))
6End code0x5AFixed End Symbol

·

·​Receive response (device ->host):

Byte positionfieldValue (hexadecimal)Explanation
1Starting code0xA5Fixed starting symbol
2Length0x03The length of this response data section (address+command word=2 bytes)
3Address0xXXDeviceCurrentCommunication Address
4Command Word0xB2Address Query Reply Command (Fixed as Successful Reply)
5Checksum0xXXLength from(0x03)Go toCommand word (0xB2)Sum of Accumulation (SUM (0x03, Address, 0xB2))
6End code0x5AFixed End Symbol

·


3. Set the communication baud rate (0xB4)

  • Function:Change the RS485 communication baud rate of the device.
  • Send Command (Host ->Device):
Byte PositionFieldValue (hexadecimal)Explanation
1Starting code0xA5Fixed starting symbol
2Length0x04The length of the data portion of this command (address+command word+baud rate=3 bytes)
3Address0xXXCurrentlyAddress used for communication with the device (0x00-0FF)
4Command Word0xB4Baud Rate Setting Command
5Baud Rate0x01-0x051=4800, 2=19200, 3=38400, 4=57600, 5=115200, Other=9600
6Checksum0xXXLength (0x04) fromtoGo toBaud RateSum of Sum (0x04, Address, 0xB4, Baud Rate)
7End code0x5AFixed End Symbol

·

  • Receive response (device ->host):
Byte positionfieldValue (hexadecimal)Explanation
1Starting code0xA5Fixed starting symbol
2Length0x04This response data part length (address+command word+baud rate=3 bytes)
3Address0xXXDevice Address
4Command Word0xB6/0xB70xB6=Setting Successful
0xB7=Setting Failed
5Baud rate0x01-0x05The baud rate currently being used by the device(1=4800, 2=19200, 3=38400, 4=57600, 5=115200, others=9600)
6checksum0xXXFromLength (0x04)Go toBaud rateSum of Sum (0x04, Address, Command Word, Baud Rate)
7End code0x5AFixed End Symbol

·


4. Query communication baud rate (0xB5)

·Function:Query the current RS485 communication baud rate of the device.

·​Send command (Host ->Device):

Byte positionfieldValue (hexadecimal)Explanation
1Starting code0xA5Fixed starting symbol
2Length0x03The length of the data portion of this command (address+command word=2 bytes)
3Address0xXX / 0xFFLocal address(Single query) or​0xFF​(Broadcast inquiry)
4command word0xB5Baud rate query command
5checksum0xXXFromLength (0x03)Go toCommand word (0xB5)Sum of Accumulation (SUM (0x03, Address, 0xB5))
6End code0x5AFixed End Symbol

·

·​Receive response (device ->host):

Byte positionfieldValue (hexadecimal)Explanation
1Starting code0xA5Fixed starting symbol
2Length0x04The length of this response data section (address+command word+baud rate=3 bytes)
3Address0xXXDevice address
4command word0xB6 / 0xB70xB6=query successful
0xB7=query failed(uncommon)
5Baud rate0x01-0x03The baud rate currently being used by the device​ (​1=19200, 2=57600, 3=115200, others=9600​)
6checksum0xXXFromLength (0x04)Go toBaud rateSum of Sum (0x04, Address, Command Word, Baud Rate)
7End code0x5AFixed End Symbol

·

o​Attention:Define the baud rate values in the query response (1=19200, 2=57600, 3=115200) and set commands (1=4800, 2=19200, 3=38400...)DifferentAnd the scope is smaller. Other=9600 is the same.


5. Set whether to reply with ACK (0xB8)

·Function:Set whether the device responds with an acknowledgement (ACK) after receiving a command.

o0x00 (default):replies withACK.

o0x01: ​does not reply withACK.

·Send Command (Host ->Device):

Byte PositionFieldValue (Hexadecimal)Description
1Start Code0xA5Fixed Start Symbol
2Length0x04The length of the data portion of this command (address+command word+reply to close=3 bytes)
3Address0xXXThe currentaddress used for communication with the device (0x00-0FF)
4Command word0xB8ACK reply setting command
5Reply to close0x00/0x010=Reply ACK (default)
1=No ACK Reply
6Checksum0xXXAccumulated Sum fromLength (0x04)toReply Close(SUM (0x04, Address, 0xB8, Reply Close))
7End Code0x5AFixed Bundle Symbol

·

·Receive response (device ->host):

Byte positionfieldValue (hexadecimal)Explanation
1Starting code0xA5Fixed starting symbol
2Length0x04The length of this response data section (address+command word+reply closed=3 bytes)
3Address0xXXDevice address
4command word0xBA / 0xBB0xBA=successfully set
0xBB=Setting failed
5Reply to Close0x00 / 0x01The current ACK reply status of the device(0=reply, 1=no reply)
6checksum0xXXFromLength (0x04)Go toReply to CloseSum of Sum (0x04, Address, Command Word, Reply Close)
7End code0x5AFixed End Symbol

·


6. Check if an ACK (0xB9) has been replied to

  • Function:Check if the device is currently responding with an ACK.
  • Important Notice:If the device has been set to not reply with ACK (0x01), after sending this query command, the deviceI won't replyAny data (communication light may flash, but there is no output from the serial port).
  • Send command (Host ->Device):
Byte positionfieldValue (hexadecimal)Explanation
1Starting code0xA5Fixed starting symbol
2Length0x03The length of the data portion of this command (address+command word=2 bytes)
3Address0xXX / 0xFFLocal address(Single query) or​0xFF​(Broadcast inquiry)
4command word0xB9ACK reply query command
5checksum0xXXAccumulated sum oflength (0x03)tocommand word (0xB9)(SUM (0x03, address, 0xB9))
6End code0x5AFixed end symbol

·

  • Receive response (device ->host):(only received when device is set to reply ACK) 
Byte positionFieldValue (Hexadecimal)Description
1Starting Code0xA5Fixed Starting Symbol
2Length0x04This Response Data Part Length (Address+Command Word+Reply Close=3 bytes)
3Address0xXXDevice Address
4command word0xBA / 0xBB0xBA=query successful
0xBB=query failed(uncommon)
5Reply to Close0x00 / 0x01The current ACK reply status of the device(0=reply, 1=no reply)
6checksum0xXXFromLength (0x04)toReply to closeAccumulated sum (SUM (0x04, address, command word, reply to close)
7End code0x5AFixed end symbol

·


7. Set the power-off output state memory function (0xBC)

  • Function:Control whether the device remembers and restores the output state before power-off.

o0x00 (default):Do not remember. The next power on output will be in default state.

o0x01: ​Memory. Restore the output state before the power outage during the next power on.

  • Explanation:After activating the memory function (0x01), the device willAfter receiving and executing a valid output control command next time, willThe output status at that timeSave it. After a power outage, the next power on will restore this state.
  • Send Command (Host ->Device):
Byte PositionFieldValue (Hexadecimal)Explanation
1Starting code0xA5Fixed starting symbol
2Length0x04The length of the data portion of this command (address+command word+memory function=3 bytes)
3Address0xXXCurrentlyAddress used for communication with the device (0x00-0FF)
4command word0xBCMemory function setting command
5memory function0x00 / 0x010=No memory (default)
1=Memory
6checksum0xXXFromLength (0x04)Go toMemory functionSum of Accumulation (SUM (0x04, Address, 0xBC, Memory Function))
7End code0x5AFixed End Symbol

·

  • Receive response (device ->host):
Byte positionfieldValue (hexadecimal)Explanation
1Starting code0xA5Fixed Start Symbol
2Length0x04This response data part length (address+command word+memory function=3 bytes)
3Address0xXXDevice Address
4Command Word0xBE/0xBF0xBE=Setting Successful
0xBF=Setting Failed
5Memory Function0x00/0x01Current Memory Function Status of Device(0=Not Memory, 1=Memory)
6Checksum0xXXAccumulated Sum fromLength (0x04)toMemory Function(SUM (0x04, Address, Command Word, Memory Function))
7End Code0x5AFixed End Symbol

·


8. Query Power Off Output Status Memory Function (0xBD)

  • Function:Query the current power off output status memory function status of the device.
  • Send Command (Host ->Device):
Byte PositionFieldValue (Hexadecimal)Description
1Start Code0xA5Fixed Start Symbol
2Length0x03The length of the data portion of this command (address+command word=2 bytes)
3Address0xXX/0xFFLocal Address(single query) or0xFF(broadcast query)
4Command Word0xBDMemory Function Query Command
5Checksum0xXXAccumulated Sum fromLength (0x03)toCommand Word (0xBD)(SUM (0x03, Address, 0xBD)
6End Code0x5AFixed Bundle Symbol

·

  • Receive Response (Device ->Host):
Byte positionfieldValue (hexadecimal)Explanation
1Starting code0xA5Fixed starting symbol
2Length0x04The length of this response data section (address+command word+memory function=3 bytes)
3Address0xXXDevice Address
4Command Word0xBE/0xBF0xBE=Query Successful
0xBF=Query Failed(uncommon)
5Memory Function0x00/0x01Current Memory Function Status of the Device(0=Not Memory, 1=Memory)
6Checksum0xXXAccumulated sum fromlength (0x04)tomemory function(SUM (0x04, address, command word, memory function)]
7End code0x5AFixed end symbol

·


Summary key:

  1. Start/End code:All commands start with 0xA5 and end with 0x5A.
  2. Length:refers to the number of data bytes fromtoafter the length byte of.before the checksum byte of
  3. checksum:The calculation range is fromlength byteto all bytes beforeBefore checksum byteAll the bytes. Be sure to calculate correctly.
  4. Address:
  5. Use it when setting/querying specific devicesCurrent address.
  6. The broadcast address 0xFF can be used to query commands (address, baud rate, ACK status, memory function), and all devices will respond (note conflicts). When
  7. dip switch is present, the address setting command is invalid and dangerous (power off operation is required).When present, the address setting command is invalid and dangerous (requiring power-off operation).
  8. ACK Reply:If the device is set to not reply to ACK (0x01), sending a query ACK status command (0xB9) will not receive any response from..
  9. Memory function: Afteris turned on, it needs to be sentAn effective output control command, will the device save the current output state ofThe output status at that timeUsed for power outage recovery.

Complete documentation of communication protocol for WE-10x series LED controller

1. Overview

The WE-10x series LED controller is mainly used to control the color and brightness of low-voltage RGB lamps and single/dual color lamps. Supports standard RS485 communication interface, and data exchange adopts hexadecimal protocol. In the specific command format, each part is measured in bytes. Other baud rates can be configured through software. After configuration, it will respond to commands at the latest baud rate.

Factory default parameters

  • Communication baud rate​: 9600bps
  • Data bits: 8 digits
  • Stop Bit: 1 Bit
  • Check Bit: None
  • Device Address: 0x000-0xFE (Broadcast Address 0xFF)

2. Instruction Format Description

Basic Instruction Format

[起始码] [长度] [地址] [命令字] [有效数据] [校验和] [结束码]

Field Description

FieldDescriptionResource pricesRemarks
Starting codeData frame start flag0xA5fixed value
LengthThe sum of bytes for all communication content except for the start code, length, and end code0xXXThe sum of byte lengths from 'address' to' checksum '
AddressController address0x00-0xFEBroadcast address 0xFF does not respond
command wordFunction code of command0xA0-0xA1Refer to each instruction protocol for details
valid dataEffective data in communication-The data content definitions of each instruction are detailed in the respective instruction protocols
checksumArithmetic accumulation of length, address, command word, and valid data0xXXIgnore the overflow part and take the lower 8 bits; Can be replaced with 0xEE (without verification)
termination codeEnd flag of data frame0x5Afixed value

3. Specific instruction instructions

3.1 Setting RGB (RGBW) values

FunctionAccording to the principle of three primary colors, set the values of RGB, and the W value is an optional brightness value.

Sending instruction format

A5 [长度] [地址] A0 [R值] [G值] [B值] [W值] [校验和] 5A

Length description​:

  • RGB type controller: 0x06 (6 bytes)
  • RGBW type controller: 0x07 (7 bytes)

Parameter Range​:

  • R value: 0x00-0FF (red output value)
  • G-value: 0x00-0FF (green output value)
  • B value: 0x00-0FF (blue output value)
  • W value: 0x00-0FF (white output value, only valid for RGBW type)

Receive instruction format

A5 [长度] [地址] A2 [R值] [G值] [B值] [W值] [校验和] 5A

Length description​:

  • RGB type controller:0x06(6 bytes)
  • RGBW type controller:0x07(7 bytes)

Example

RGBW type controller, red and white lights on​:

  • send out:A5 07 FF A0 FF 00 00 FF EE 5A
  • receive:A5 06 00 A2 FF 00 00 A7 5A

3.2 Querying RGB (RGBW) Values

FunctionQuery the current RGB (W) output value of the controller.

Sending Instruction Format

A5 03 [地址] A0 [校验和] 5A

Receive Instruction Format

A5 [长度] [地址] A2 [R值] [G值] [B值] [W值] [校验和] 5A

Example

  • Send:A5 03 FF A0 EE 5A
  • Receive:A5 06 00 A2 FF 00 00 A7 5A

3.3 Controller Scene Function Settings

Function: Set various scene effects, including breathing, flashing, dimming, single step dimming, switches, etc.

Instruction Format

A5 [长度] [地址] A1 [场景码] [功能码] [场景内容] [校验和] 5A

Parameter Description:

  • Scene Code:0x01 (breathing light), 0x02 (flashing), 0x03 (dimming), 0x04 (single step dimming), 0x05 (switch)
  • Function code: Please refer to the corresponding scene command table
  • Scene content: Please refer to the corresponding scene command table

Receiving instruction format

is the same as the receiving command format in 3.1.

3.3.1 Breathing Light Scene Content Table

Function Code: 0x01Scene Content Format:

[颜色码] [速度] [亮度]

Color Code Description:

  • 0x01: Red Light Breathing
  • 0x02: Green light breathing
  • 0x03: Blue light breathing
  • 0x04: White light breathing (RGB type is RGB synthesized white breathing, RGBW type is W output breathing)
  • 0x05: RGB respiration
  • 0x06: Yellow light breathing
  • 0x07: Purple Lamp Breathing

Example

  • Red light breathing​: A5 08 FF A1 01 01 01 00 FF EE 5A
  • Green light breathing​: A5 08 FF A1 01 02 01 00 FF EE 5A
  • Blue light breathing​: A5 08 FF A1 01 03 01 00 FF EE 5A
  • White light breathing​: A5 08 FF A1 01 04 01 00 FF EE 5A
  • RGB respiration​: A5 08 FF A1 01 05 01 00 FF EE 5A
  • Yellow light breathing​: A5 08 FF A1 01 06 01 00 FF EE 5A
  • Purple lamp breathing​: A5 08 FF A1 01 07 01 00 FF EE 5A

3.3.2 Flash Scene Content Table

Function code​: 0x02 ​Scene content format:

[颜色码] [速度] [亮度] [其他参数]

Example

  • Red light flashing:A5 08 FF A1 02 01 01 02 FF EE 5A
  • Green light flashing:A5 08 FF A1 02 02 01 02 FF EE 5A
  • Blue light flashing:A5 08 FF A1 02 03 01 02 FF EE 5A
  • White light flashing:A5 08 FF A1 02 04 01 02 FF EE 5A
  • 7-color flashing​: A5 0B FF A1 02 06 01 02 FF FF FF FF EE 5A
  • Yellow light flashing​: A5 0B FF A1 02 07 01 02 FF FF FF EE 5A
  • Purple light flashing​: A5 0B FF A1 02 08 01 02 FF FF FF FF EE 5A

3.3.3 Dimming Scene Content Table

Function code​: 0x03 ​Scene content format​:

[颜色码] [目标亮度] [速度]

Example

  • Red light dimming​: A5 07 FF A1 03 01 FF 01 EE 5A
  • Green light dimming​: A5 07 FF A1 03 02 FF 01 EE 5A
  • Blue light dimming​: A5 07 FF A1 03 03 FF 01 EE 5A
  • White light dimming​: A5 07 FF A1 03 04 FF 01 EE 5A(Valid only for RGBW output models)
  • Synchronous dimming (full brightness)​: A5 0A FF A1 03 05 FF FF FF FF 01 EE 5A
  • Synchronous dimming (fully off)​: A5 0A FF A1 03 05 00 00 00 00 01 EE 5A

3.3.4 Single Step Dimming Scene Content Table

Function code​: 0x04 ​Scene content format​:

[操作码]

Operation code description​:

  • 0x01: Red light brightness plus 1
  • 0x81: Red light brightness reduced by 1
  • 0x02: Green light brightness plus 1
  • 0x82: Green light brightness reduced by 1
  • 0x03: Blue light brightness plus 1
  • 0x83: Blue light brightness minus 1
  • 0x04: White light brightness plus 1 (RGBW effective)
  • 0x84: White light brightness minus 1 (RGBW effective)
  • 0x05: RGBW brightness plus 1 (RGBW effective)
  • 0x85: RGBW brightness reduced by 1 (RGBW effective)

Example

  • Red light brightness plus 1​: A5 05 FF A1 04 01 EE 5A
  • Reduce the brightness of the red light by 1​: A5 05 FF A1 04 81 EE 5A
  • Green light brightness plus 1​: A5 05 FF A1 04 02 EE 5A
  • Green light brightness minus 1:A5 05 FF A1 04 82 EE 5A
  • Blue light brightness plus 1:A5 05 FF A1 04 03 EE 5A
  • Blue light brightness minus 1:A5 05 FF A1 04 83 EE 5A
  • White light brightness plus 1:A5 05 FF A1 04 04 EE 5A
  • White light brightness minus 1:A5 05 FF A1 04 84 EE 5A
  • RGBW brightness plus 1:A5 05 FF A1 04 05 EE 5A
  • RGBW Brightness Decrease 1:A5 05 FF A1 04 85 EE 5A

3.3.5 Switch Scene Content Table

Function Code: 0x05Scene Content Format:

[颜色码] [延时] [操作类型] [状态值]

Operation Type Description:

  • 0x01: Single Channel Control
  • 0x05: GBW Simultaneous Control

State Value Description​:

  • 0x01: Open
  • 0x00: Off
  • 0x02: Switch switching (send once to turn on, next time to turn off, loop)

Example

  • Red light on​: A5 08 FF A1 05 01 00 01 01 EE 5A
  • Red light off​: A5 08 FF A1 05 01 00 01 00 EE 5A
  • Red light switch switching​: A5 08 FF A1 05 01 00 01 02 EE 5A
  • White light on​: A5 08 FF A1 05 04 00 01 01 EE 5A
  • White light off​: A5 08 FF A1 05 04 00 01 00 EE 5A
  • White light switch switching​: A5 08 FF A1 05 04 00 01 02 EE 5A
  • RGBW on​: A5 0B FF A1 05 05 00 01 01 01 01 01 EE 5A
  • RGBW off​: A5 0B FF A1 05 05 00 01 00 00 00 00 EE 5A
  • RGBW switch switching​: A5 0B FF A1 05 05 00 01 02 02 02 02 EE 5A

4. Precautions

  1. Broadcast address 0xFF is used to send commands to all devices, but the devices do not respond to broadcast commands
  2. Checksum calculation: the accumulated sum from the "length" byte to the byte before the "checksum", taking the lower 8 bits
  3. Using 0xEE as the checksum can skip the verification calculation
  4. RGB type controllers ignore the W value parameter
  5. The white effect in scene functions is implemented differently on RGB and RGBW type controllers

LED controller MODBUS protocol complete document

1. Overview

The WE-10x series LED controller is mainly used to control the color and brightness of low-voltage RGB lamps and single/dual color lamps. It supports standard RS485 communication interface and data exchange adopts standard MODBUS RTU protocol. For detailed instruction generation and parsing methods, you can refer to the register table in this article in conjunction with the "MODBUS Protocol Chinese Version".

1.1 Register Address Table

Note:Keep the corresponding addressing address of register 1 as 0x0000, keep the corresponding addressing address of register 2 as 0x0001, and so on.

Register NameAddressing addressFunctional Descriptionvalue rangeaccess permissionRemark
Output value R0x0000Red channel output value0x0000-0x00FFread and writeRGB value range 0-255
Output value G0x0001Green channel output value0x0000-0x00FFread and writeRGB value range 0-255
Output value B0x0002Blue channel output value0x0000-0x00FFread and writeRGB value range 0-255
Output value W0x0003White channel output value0x0000-0x00FFread and writeW value range 0-255
Device address0x0004Device communication address0x0001-0x00FFRead and write1-255
Baud rate0x0005Communication baud rate0-5read and writeSee baud rate description
Prohibit response0x0006Do you prohibit response0-1Read and write0: Allow, 1: Prohibit
Power off memory0x0007Power off state memory0-1Read and write0: No Memory, 1: Memory
Scene Function0x0008Scene Function Settings-Read/WriteSee Scene Function Description

Baud Rate Setting Value Description:

  • 0: 4800bps
  • 1: 9600bps (default value)
  • 2: 19200bps
  • 3: 38400bps
  • 4: 57600bps
  • 5: 115200bps

2. Instruction List

2.1 Controller Parameter Settings

Function Code:0x06 (Write to Single Register) Controller parameters include device address, baud rate, disable response, power-off memory, and other parameters. When the device address is unclear, parameter settings can be made through the broadcast address.Instruction format:

[设备地址] [功能码0x06] [寄存器地址高8位] [寄存器地址低8位] [数据高8位] [数据低8位] [CRC校验低8位] [CRC校验高8位]

Example: Controller original address is 0x01, change address to 0x03

  • Send command:01 06 00 04 00 03 88 0A
  • Receive response:01 06 00 04 00 03 88 0A

Explanation:

  • When setting the address, the slave address returned by the command is the same as the received command, both are 0x01
  • The new slave address will be valid for the next communication. After setting, please use the new slave address 0x03
  • Device address initialization settings can be performed using broadcast address 0x00

2.2 Controller parameter query

Function code:0x03 (read and hold register)Note:When the "disable response" function is enabled, the query does not return.Instruction format:

[设备地址] [功能码0x03] [起始地址高8位] [起始地址低8位] [寄存器数量高8位] [寄存器数量低8位] [CRC校验低8位] [CRC校验高8位]

Example: Query controller address

  • Send command:01 03 00 04 00 01 C5 CB
  • Receive response:01 03 02 00 01 79 84

Response description:

  • 01: Device address
  • 03: Function code
  • 02: Return data byte count
  • 00 01: Query parameter value (here device address 0x0001)
  • 79 84: CRC verification

2.3 Controller output value setting

Function code:0x10 (write multiple registers) Set the values of four output circuits. When the load is an RGB light fixture, the corresponding color can be displayed. When the load is a monochrome light fixture, the corresponding brightness value of each output will be displayed. This command is for RGBW format setting. When the controller is set to 'No W output model', the W value will be ignored by the controller.Instruction format:

[设备地址] [功能码0x10] [起始地址高8位] [起始地址低8位] [寄存器数量高8位] [寄存器数量低8位] [数据字节数] [数据1高8位] [数据1低8位] ... [CRC校验低8位] [CRC校验高8位]

Example 1: Set R circuit output to 0xFF

  • Send command:01 10 00 00 00 04 08 00 FF 00 00 00 00 00 00 B9 75
  • Receive response:01 10 00 00 00 04 C1 CA

Example 2: Set G circuit output to 0xFF

  • Send command:01 10 00 00 00 04 08 00 00 00 FF 00 00 00 00 A2 6E
  • Receive response:01 10 00 00 00 04 C1 CA

Example 3: Set B circuit output to 0xFF

  • Send command:01 10 00 00 00 04 08 00 00 00 00 00 FF 00 00 86 4A
  • Receive response:01 10 00 00 00 04 C极 CA

Example 4: Set W circuit output to 0xFF

  • Send command:01 10 00 00 00 04 08 00 00 00 00 00 00 00 FF F6 3A
  • Receive response:01 10 00 极 00 00 04 C1 CA

Example 5: Set all circuit outputs to 0xFF

  • Send command:01 10 00 00 00 04 08 00 FF 00 FF 00 FF 00 FF DD 11
  • Receive response:01 10 00 00 00 04 C1 CA

Example 6: Set all circuit outputs to 0x00

  • Send command:01 10 00 00 00 04 08 00 00 00 00 00 00 00 00 B6 7A
  • Receive response:01 10 00 00 00 04 C1 CA

2.4 Controller output value query

Function code:0x03 (read hold register)

Example: Query the output value of the controller address 0x01

  • Send command:01 03 00 00 00 04 44 09
  • Receive response:01 03 08 00 FF 00 FF 00 FF 00 00 BE FC

Response description:

  • Return in RGBW order
  • The above example returns values: R=0x00FF, G=0x00FF, B=0x00FF, W=0x0000
  • Each channel value occupies 2 bytes (16 bits), but the valid value For the lower 8 digits

2.5 Controller Scene Function Settings

Function Code:0x10 (write multiple registers) Includes functions such as breathing, flashing, dimming, and independent switching.Note:When it is a "RGB output model", any white function is synthesized, for example, the LED strip is RGB synthesized white breathing; When it is the "RGBW model", the light strip directly outputs the breathing light from W.

Breathing Light Function Writing Content Table

FunctionWriting ValueDescription
Red Light Breathing0x0001Red Breathing Effect
Green Breathing0x0002Green Breathing Effect
Blue Breathing0x0003Blue Breathing Effect
White Breathing0x0004White Breathing Effect
Purple Breathing0x0005Purple Breathing Effect
Yellow Light Breathing0x Pole 6Yellow Breathing Effect
Blue Light Breathing0x0007Blue Breathing Effect
Colorful Breathing0x0008Colorful Breathing Effect

Flashing Function Write Content Table

FunctionWrite ValueDescription
Red Flashing0x0001Red Flashing Effect
Green Flashing0x0002Green Flashing Effect
Blue Flashing0x0003Blue Flashing Effect
White Flashing0x0004White Flashing Effect
7-Color Flashing0x00057-Color Loop Flashing

Dimming Function Writing Content Table

ParametersAddress OffsetDescription
Function Selection0x0000Dimming Function Identification (0x0003)
R Brightness Value0x0001Red Brightness (0x00-0FF)
G Brightness Value0x0002Green Brightness (0x00-0FF)
B Brightness Value0x0003Blue Brightness (0x00-0FF)
W Brightness Value0x0004White Brightness (0x00-0FF)
Dimming Speed0x0005Dimming speed value

Switch function writing content table

FunctionWriting valueDescription
Red light switch0x0001Red switch switching
Green light switch0x0002Green switch switching
Blue light switch0x0003Blue switch switch
White light switch0x0004White switch switch
All switches0x0005All channel switches

Example 1: Set the controller to purple light breathing

  • Send command:01 10 00 08 00 05 0A 00 01 00 00 00 00 00 00 00 00 00 00 81 C8
  • Receive response:01 10 00 08 00 05 81 C8

Example 2: 7-Color Flashing

  • Send Command:01 10 00 08 00 08 10 00 02 01 00 02 00 FF FF FF 00 5B 4C
  • Receive Response:01 10 00 08 00 08 40 0D

Example 3: Red Light Brightness Set to 0x0F, Green Light Brightness Set to 0xFF, Blue Light Brightness Set to 0x80, White Light Brightness Set to 0xA0

  • Send Command:01 10 00 08 00 07 0E 00 03 极 05 00 0F 00 FF 00 80 00 A0 00 01 1D C1
  • Receive Response:01 10 00 08 00 07 00 09

Example 4: Controller Red Light Switch Conversion (Send this command once to turn on, next time to turn off, loop)

  • Send Command:01 10 00 08 00 05 0A 00 05 00 01 00 00 00 00 00 02 A6 61
  • Receive Response:01 10 00 08 00 05 81 C8

Example 5: RGBW All Delay 1 Second Switch Conversion

  • Send Command:01 10 00 08 00 08 10 00 05 00 05 00 00 00 01 00 02 00 02 00 02 00 02 46 13
  • Received response:01 10 00 08 00 08 40 0D

3. Default Communication Parameters

  • Device Address:0x01 (default)
  • Baud Rate:9600bps (8-bit data bit, 1-bit stop bit, no checksum)
  • No response allowed:0 (allow response)
  • Power off memory:0 (no memory output state)

4. Precautions

  1. When using the broadcast address 0x00, all devices will respond, which may cause communication conflicts
  2. After setting the "disable response" function, the device will not respond to any query commands
  3. The output value range of RGBW is 0x0000-0x00FF, and the actual effective value is the lower 8 bits
  4. When setting scene functions, please select the appropriate function according to the controller model (RGB or RGBW)

Related Tags
Put this resource to use in a real project?

Go to the Tool Center for message parsing, CRC verification and device debugging, or submit your requirements for selection and integration advice.

Engineer Membership

Turn this article into actionable debugging resources

After activation, you can use advanced message parsing, resource pack downloads, code examples, engineering cases and priority technical support, suitable for real project delivery.

Unlimited Advanced Tools
Resource & Code Packs
Complete Engineering Case Library
Priority Technical Support

《“MODBUS-RTU full-color RGB light strip controller user manual”》 有 1 条Comments

Leave a Reply

Your email address will not be published. Required fields are marked *.