The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 38: | Line 38: | ||
fc -> Function Code 1 Byte <br> | fc -> Function Code 1 Byte <br> | ||
data -> n Bytes<br> | data -> n Bytes<br> | ||
=== Modbus Rtu 2 === | |||
Hardware Resources: | |||
Data register address | |||
* RS485 communication interface | |||
* TTL communication interface | |||
* 2 optocoupler isolation input | |||
* 2 way optocoupler isolation output | |||
* A user button | |||
* A user LED | |||
* A power indicator | |||
* A STM32F030F4 microcontroller | |||
* 2 relay status indicators LED lights | |||
* Power supply terminal interface (12V power supply) | |||
Modbus RTU Instructions: | Modbus RTU Instructions: | ||
Line 63: | Line 79: | ||
|} | |} | ||
<br> | <br> | ||
Read Address at Broadcast Call <br> | Read Address at Broadcast Call <br> | ||
Line 76: | Line 93: | ||
| 00 03 02 00 02 04 45 || Receive from Device '''02 for Address''' | | 00 03 02 00 02 04 45 || Receive from Device '''02 for Address''' | ||
|- | |- | ||
| 00 03 02 00 03 C5 85 | | 00 03 02 00 03 C5 85 || Receive from Device '''03 for Address''' | ||
|- | |- | ||
|} | |} | ||
Meaning of each byte:<br> | Meaning of each byte:<br> | ||
Line 108: | Line 108: | ||
[address 1 | [address 1]<br> | ||
Switch Single | Switch Single | ||
Line 121: | Line 121: | ||
| 01 || 05 || 00 || 00 || 00 || 00 || CD || CA || 0 relay off | | 01 || 05 || 00 || 00 || 00 || 00 || CD || CA || 0 relay off | ||
|- | |- | ||
| 01 || 05 || 00 || 01 || FF || 00 || DD || FA || 1 relay ON | | 01 || 05 || 00 || 01 || FF || 00 || DD || FA || No. 1 relay ON | ||
|- | |||
| 01 || 05 || 00 || 01 || 00 || 00 || 9C || 0A || No. 1 relay off | |||
|- | |||
| 01 || 05 || 00 || 02 || FF || 00 || 2D || FA || No. 2 relay ON | |||
|- | |- | ||
| 01 || 05 || 00 || | | 01 || 05 || 00 || 02 || 00 || 00 || 6C || 0A || No. 2 relay off | ||
|- | |- | ||
|} | |} | ||
all | Switch all | ||
{| class="wikitable" | {| class="wikitable" | ||
Line 135: | Line 139: | ||
| Adresse || Funktion || Reghigh || Reglow || Data 1 || Data 2 || Data 3 || Data 4 || CRChigh || CRClow || Funktion | | Adresse || Funktion || Reghigh || Reglow || Data 1 || Data 2 || Data 3 || Data 4 || CRChigh || CRClow || Funktion | ||
|- | |- | ||
| 01 || 0F || 00 || 00 || 00 || 08 || 01 || 00 || FE || 95 || Full Relay | | 01 || 0F || 00 || 00 || 00 || 08 || 01 || 00 || FE || 95 || Full off | ||
|- | |||
| 01 || 0F || 00 || 00 || 00 || 08 || 01 || FF || BE || D5 || Full on | |||
|- | |||
| || || || || || || || || || || | |||
|- | |||
| 01 || 01 || 00 || 00 || 00 || 08 || || || BE || D5 || Send : Read all relay states | |||
|- | |||
| 01 || 01 || 01 || 00 || || || || || 51 || 88 || Return : Relay fully closed | |||
|- | |- | ||
| 01 || | | 01 || 01 || 01 || 03 || || || || || 11 || 89 || Return : All relays are on | ||
|- | |- | ||
| || || || || || || || || || || | | || || || || || || || || || || | ||
Line 148: | Line 160: | ||
Quelle - https://hacktronics.co.in/2-channel-relay-module/modbus-rtu-2-way-relay-output-2-way-input-switch-ttl-rs485-interface-communication | Quelle - https://hacktronics.co.in/2-channel-relay-module/modbus-rtu-2-way-relay-output-2-way-input-switch-ttl-rs485-interface-communication | ||
=== Modbus Rtu 4 === | === Modbus Rtu 4 === | ||
Line 159: | Line 167: | ||
* RS485 communication interface | * RS485 communication interface | ||
* TTL communication interface | * TTL communication interface | ||
* 4 | * 4 optocoupler isolation input | ||
* 4 | * 4 way optocoupler isolation output | ||
* | * A user button | ||
* A user LED | * A user LED | ||
* A power indicator | * A power indicator | ||
Line 169: | Line 177: | ||
Modbus RTU command | |||
Baud Rate: 9600 8 NONE 1 | |||
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
! Hex Byte !! Funktion | |||
|- | |- | ||
| | | 00 06 40 00 00 01 5c 1b || Setting address is: 01 | ||
|- | |- | ||
| | | 00 06 40 00 00 02 1c 1a || Setting address is: 02 | ||
|- | |- | ||
| | | 00 03 40 00 00 01 90 1b || Read address | ||
|- | |- | ||
| | | || Read the software version | ||
|- | |- | ||
| | | 00 03 00 04 00 01 c4 1a || [month] broadcast read (only by one device to address all practical, easy to test) | ||
|- | |- | ||
| | | ||Read the hardware version (PCB version) | ||
|- | |- | ||
| | | 00 03 00 04 00 01 c4 1a || broadcast read (only by one device to address all practical, easy to test) | ||
|- | |- | ||
|} | |||
[address 1]<br> | |||
{| class="wikitable" | |||
|- | |||
! Hex Byte !! Funktion | |||
|- | |||
| 01 05 00 01 01 00 9d 9a || No. 1 relay ON | |||
|- | |||
| 01 05 00 01 00 00 9c 0a || No. 1 relay off | |||
|- | |||
| || | |||
|- | |||
| 01 05 00 02 01 00 6d 9a || No. 2 relay ON | |||
|- | |||
| 01 05 00 02 00 00 6c 0a || No. 2 relay off | |||
|- | |||
| || | |||
|- | |||
| 01 05 00 03 01 00 3c 5a || No. 3 relay ON | |||
|- | |||
| 01 05 00 03 00 00 3d ca || No. 3 relay off | |||
|- | |||
| || | |||
|- | |||
| 01 05 00 04 01 00 8d 9b || No. 4 relay ON | |||
|- | |||
| 01 05 00 04 00 00 8c 0b || No. 4 relay off | |||
|- | |||
| || | |||
|- | |||
| 01 05 00 ff 00 00 fd fa || Quanmie | |||
|- | |||
| 01 05 00 ff ff ff fc 4a || All light | |||
|} | |||
[address 2]<br> | |||
{| class="wikitable" | |||
|- | |||
! Hex Byte !! Funktion | |||
|- | |||
| 02 05 00 01 01 00 9d a9 || No. 1 relay ON | |||
|-No. 1 relay 1 channel status | |||
| 02 05 00 01 00 00 9c 39 || No. 1 relay off | |||
|- | |||
| || | |||
|- | |||
| 02 05 00 02 01 00 6d a9 || No. 2 relay ON | |||
|- | |||
| 02 05 00 02 00 00 6c 39 || No. 2 relay off | |||
|- | |||
| || | |||
|- | |||
| 02 05 00 03 01 00 3c 69 || No. 3 relay ON | |||
|- | |||
| 02 05 00 03 00 00 3d f9 || No. 3 relay off | |||
|- | |||
| || | |||
|- | |||
| 02 05 00 04 01 00 8d a8 || No. 4 relay ON | |||
|- | |||
| 02 05 00 04 00 00 8c 38 || No. 4 relay off | |||
|- | |||
| || | |||
|- | |||
| 02 05 00 ff 00 00 fd c9 || Quanmie | |||
|- | |||
| 02 05 00 ff ff ff fc 79 || All light | |||
|} | |} | ||
<br> | |||
[address 1]<br> | |||
{| class="wikitable" | {| class="wikitable" | ||
! | |-<gallery> | ||
<small>Small text</small | |||
! Hex Byte !! Funktion | |||
|- | |- | ||
| | | 01 01 00 01 00 04 6c 09 || Send : No. 1 relay 1 channel status | ||
|- | |- | ||
| | | || Return ...... | ||
|- | |- | ||
| 01 | | 01 01 00 02 00 04 9c 09 || Send : No. 1 Relay 2 channel status | ||
|- | |- | ||
| | | || Return ...... | ||
|- | |- | ||
| | | 01 01 00 03 00 04 CD C9 || Send : No. 1 Relay 3 channel status | ||
|- | |- | ||
| | | || Return ...... | ||
|- | |- | ||
| 01 01 00 04 00 04 7C 08 || Send : No. 1 Relay 4 channel status | |||
|} | |} | ||
<br> | <br> | ||
[https://hacktronics.co.in/4-channel-relay-module/4-channel-relay-module-programmable-w-opto-isolated-rs485-stm8s103f3 hacktronics.co.in/4-channel-relay-module] | [https://hacktronics.co.in/4-channel-relay-module/4-channel-relay-module-programmable-w-opto-isolated-rs485-stm8s103f3 hacktronics.co.in/4-channel-relay-module] |