Modbus RTU 2 Channel 12V Relay Module RS485

Description:

1. RS485 communication interface
2. TTL communication interface
3. 2 channel optocoupler isolation input
4. 2 channel optocoupler isolation output
5. A user button
6. A user LED indicator
7. A power indicator
8. A STM32F030F4 microcontroller
9. 2 relay status indicator LED lights
10. Power terminal interface (12V power supply)
 

شرح :

Modbus RTU instruction

Baud rate: 9600 8 NONE 1

Hexadecimal transmission

Hexadecimal reception

Steps:

1. Software setting communication baud rate

2. Set the address (device address used for communication, the default address is 01)                                                     

/************************************************* ******************/

Set the address to: 09

01 10 00 00 00 01 02 00 09 66 56 //The current address 01 is modified to 09

00 10 00 00 00 01 02 00 09 6B C6 //The broadcast address is changed to 09

Read address

00 03 00 00 00 01 85 db

return:

00 03 02 00 01 44 44 //01 is the address

/************************************************* ******************/

/************************************************* ******************/

The meaning of each byte:

[Address 1]

//--------------------------------------------

Relay No. 1 is on: 01 05 00 01 01 00 9d 9a

Byte 1: Address

Byte 2: Function?

Byte 3 4: Register Address

Byte 5 6: Register Data

Byte 7 8: CRC check

//======================================================== ==============

[Address 1]

//--------------------------------------------

Relay No. 0 is on: 01 05 00 00 FF 00 8C 3A

Relay No. 0 is closed: 01 05 00 00 00 00 CD CA

//--------------------------------------------

Relay No. 1 is open: 01 05 00 01 FF 00 DD FA

Relay No. 1 is closed: 01 05 00 01 00 00 9C 0A

//-------------------------------------------

Relay No. 2 is on: 01 05 00 02 FF 00 2D FA

Relay No. 2 is closed: 01 05 00 02 00 00 6C 0A

//-------------------------------------------

//======================================================== =======================

Total elimination: 01 0F 00 00 00 08 01 00 FE 95

Full light: 01 0F 00 00 00 08 01 FF BE D5

/************************************************* *********************/

Read all relay status:

Send: 01 01 00 00 00 08 3D CC

Back: 01 01 01 00 51 88 Relay fully closed

Back: 01 01 01 03 11 89 All relays are on

/************************************************* ********************/

Read all input switch states

Send: 01 02 00 00 00 08 79 CC //Read 8 input states

Back: 01 02 01 00 A1 88

Kit include:

1 X Modbus RTU 2 Channel 12V Relay Module 

10 JD
Quantity
In stock



Related Products

subscribe to our weekly newsletter

loading
Categories