Modbus-និមិត្តសញ្ញា

Modbus RTU Relay 32CH Relay Module

Modbus-RTU-Relay-32CH-Relay-Module-product

លក្ខណៈបច្ចេកទេស

  • ឈ្មោះផលិតផល៖ Modbus RTU Relay 32CH
  • ភាពឆបគ្នា៖ Raspberry Pi, STM32, Arduino
  • ការតភ្ជាប់៖ RS485

ជាងview

Electrical and Relay Safety Instructions 

  • This product must be operated by professional electricians or qualified personnel. During use, ensure electrical safety, leakage protection, and proper insulation.
  • Before installing, maintaining, or replacing the relay device, always turn off the power and unplug the device.
  • Do not attempt to disassemble the relay device to avoid damage or the risk of electric shock.
  • Properly install and place the relay device. Do not use it in humid, overheated, flammable, or explosive environments to prevent accidents caused by improper installation or use.

ផ្ទុកការផ្គូផ្គង

  • Ensure the relay’s rated voltage and current match the load. Do not exceed the rated capacity.
  • For inductive loads (motors, coils, lamps, etc.), the starting current may be much higher than the rated current. Choose a relay with sufficient current margin.

Short Circuit and Overcurrent Protection

  • Install a fuse or circuit breaker in the relay circuit to prevent damage due to short circuits or accidental overcurrent.
  • Ensure the load circuit has no short circuits during wiring, and select protection components with appropriate current ratings if necessary.

Arc and Switching Protection

  • Relay switching generates arcs, which can cause contact wear or welding.
  • For inductive loads, it is recommended to use RC snubber circuits or varistors for arc suppression.

បរិស្ថានការដំឡើង

  • Do not use the relay in humid, high-temperature, flammable, explosive, or dusty environments.
  • Install the relay securely to avoid vibrations or shocks that may cause misoperation or damage.

Power-Off Operation

  • Always cut off power before maintenance, wiring, or replacing the relay to ensure personnel and device safety.
  • Latching relays are only powered when changing state. Avoid strong vibrations or strong magnetic fields while the relay is unpowered.

ការបញ្ជាក់ស្ថានភាព

  • After powering on, confirm or reset the relay status as needed to prevent abnormal operation caused by transportation, installation, or external disturbances.
  • Avoid power interruption during relay operation to prevent uncertain status or contact damage.

ការត្រួតពិនិត្យជាប្រចាំ

  • Periodically inspect relay contacts, terminals, and insulation to ensure proper operation.
  • If abnormal heating, odor, or burn marks are detected, immediately cut off power and replace the relay.

ការតភ្ជាប់ផ្នែករឹង

Modbus-RTU-Relay-32CH-Relay-Module-fig1

Example Demonstration

  • The demo shows how the following two software operate. SSCOM serial port debugging assistant is more convenient to operate, free of installation, and more convenient for complete display and analysis of instructions, but the disadvantage is that the data is not intuitive. Modbus Poll software is directly operated on the register, and the data display is more convenient to observe, but the disadvantage is that the instruction is not displayed completely, so you need to be familiar with the Modbus register operation.
  • You can test using any method. It is recommended to use the SSCOM serial port debugging assistant software for the first test.

ជំនួយការបំបាត់កំហុសច្រកសៀរៀល SSCOM

  • Download SSCOM Serial port debugging assistant and open it on the computer, open the corresponding port number, and set the baud rate as 9600. Click Multi-Char to open the Send Multi-Char window, and click the function to send the corresponding command. Modbus-RTU-Relay-32CH-Relay-Module-fig2
  • If you need to send other commands, choose SendHEX. For checksum validation, select ModbusCRC16. After entering the first six bytes of the command, clicking SEND will automatically add the CRC check code. Modbus-RTU-Relay-32CH-Relay-Module-fig3
  • For detailed control commands, please see the development protocol.

កម្មវិធីស្ទង់មតិ Modbus 

  • It is not convenient to use the SSCOM software for observing the data, you can select Modbus Poll software to read the data. Download and install the Modbus Poll software.
  • Open the software, select Setup->Read/Write Definition, select the actual device address for Slave ID, select 01 Read Coils function code for Function, and change Quantity to 32 channels. Click OK to confirm. Modbus-RTU-Relay-32CH-Relay-Module-fig4
  • ជ្រើសរើស Connection->Connect… ជ្រើសរើសច្រកសៀរៀលដែលត្រូវគ្នា កំណត់អត្រា baud ទៅ 9600 ហើយជ្រើសរើស 8 Data bits និង None Parity។ ចុច OK ដើម្បីភ្ជាប់។ Modbus-RTU-Relay-32CH-Relay-Module-fig5
  • After the connection is normal, you can check the current relay status. Select the corresponding channel, then double-click the status value to pop up the send page. Choose On or Off, then Click Send to control the relay opening and closing. Modbus-RTU-Relay-32CH-Relay-Module-fig6

តេស្តសាកល្បង 

  • ចំណាំ៖ RS485 មិនអាចភ្ជាប់ដោយផ្ទាល់ទៅនឹងច្រកសៀរៀលរបស់ Raspberry Pi បានទេ បើមិនដូច្នោះទេវាអាចនឹងឆេះឧបករណ៍ អ្នកត្រូវបន្ថែមការបម្លែងកម្រិត 485។ សម្រាប់ Raspberry Pi វាត្រូវបានណែនាំឱ្យធ្វើការជាមួយម៉ូឌុល RS485 CAN HAT។ សម្រាប់ NUCLEO-F103RB និង Arduino វាត្រូវបានណែនាំឱ្យធ្វើការជាមួយម៉ូឌុល RS485 CAN Shield។

Raspberry Pi 

  • បើកស្ថានីយ Raspberry Pi ហើយបញ្ចូលពាក្យបញ្ជាខាងក្រោមដើម្បីចូលទៅក្នុងចំណុចប្រទាក់កំណត់រចនាសម្ព័ន្ធModbus-RTU-Relay-32CH-Relay-Module-fig7 Modbus-RTU-Relay-32CH-Relay-Module-fig8
  • បន្ទាប់មកចាប់ផ្ដើម Raspberry Pi ឡើងវិញ៖ Modbus-RTU-Relay-32CH-Relay-Module-fig9
  • បើក /boot/config.txt fileស្វែងរកសេចក្តីថ្លែងការណ៍កំណត់រចនាសម្ព័ន្ធខាងក្រោមដើម្បីបើកច្រកសៀរៀល ប្រសិនបើមិនដូច្នោះទេ អ្នកអាចបន្ថែមវាទៅចុងបញ្ចប់នៃ file. Modbus-RTU-Relay-32CH-Relay-Module-fig10
  • សម្រាប់អ្នកប្រើប្រាស់ Raspberry Pi 3B ច្រកសៀរៀលត្រូវបានប្រើសម្រាប់ប៊្លូធូស ហើយត្រូវការមតិយោបល់ចេញ៖ Modbus-RTU-Relay-32CH-Relay-Module-fig11
  • បន្ទាប់មកចាប់ផ្ដើម Raspberry Pi ឡើងវិញ៖ Modbus-RTU-Relay-32CH-Relay-Module-fig12
  • Insert the RS485 CAN HAT into the Raspberry Pi, and connect the Modbus RTU Relay module to the RS485 CAN HAT through A and B. If you are using other 485 devices, make sure to connect A-A, B-B. Run the following commands to run the demo: Modbus-RTU-Relay-32CH-Relay-Module-fig13 Modbus-RTU-Relay-32CH-Relay-Module-fig14

STM32

Note: The STM32 demo is based on the NUCLEO-F103RB and RS485 CAN Shield module.

  1. Download Demo, find the STM32 project file Modbus Relay.uvprojx in the path Modbus_RTU_Relay_32CH_Code\STM32\MDK-ARM, and double-click to open the STM32 project fileសូមចំណាំថា អ្នកគួរតែធានាថាកម្មវិធី Keil5 ត្រូវបានដំឡើងនៅលើកុំព្យូទ័ររបស់អ្នក មុនពេលប្រើប្រាស់វា។ Modbus-RTU-Relay-32CH-Relay-Module-fig15
  2. ភ្ជាប់ STM32 ទៅកុំព្យូទ័រតាមរយៈឧបករណ៍ស៊ើបអង្កេតទាញយក និងបំបាត់កំហុស STM32។ ចងក្រង និងទាញយកកម្មវិធីទៅកាន់ក្តារអភិវឌ្ឍន៍។ Modbus-RTU-Relay-32CH-Relay-Module-fig16
  3. Install the RS485 CAN Shield module on the STM32. Connect the RS485_A on the RS485 CAN Shield module to the RS485_A on the Modbus RTU Relay via a wire, and connect the RS485_B on the RS485 CAN Shield module to the RS485_B on the Modbus RTU Relay via a wire. Then power on the Modbus RTU Relay and the STM32 sequentially.
  4. After powering on, the serial port will output the transmitted commands, which can be observed using a serial port assistant. Meanwhile, the relays will sequentially turn on (e.g., 1→2→3→4). Once all relays are fully activated, they will then sequentially turn off (e.g., 1→2→3→4). You can observe whether the relay is normally engaged through the LED indicator light. Modbus-RTU-Relay-32CH-Relay-Module-fig17

អាឌូណូ 

Note: The Arduino demo is based on the UNO PLUS and RS485 CAN Shield module.

  1. ទាញយក Demo ស្វែងរកគម្រោង Arduino file Modbus_RTU_Relay.ino in the path Modbus_RTU_Relay_32CH_Code\Arduino\Modbus_RTU_Relay, and double-click to open the Arduino project fileសូមចំណាំថា អ្នកគួរតែធានាថាកម្មវិធី Arduino IDE ត្រូវបានដំឡើងនៅលើកុំព្យូទ័ររបស់អ្នកមុនពេលប្រើប្រាស់វា។ Modbus-RTU-Relay-32CH-Relay-Module-fig18
  2. Connect the Arduino to the computer via a USB cable. In the Arduino IDE software, select the Arduino board model under Tools->Board. Choose the COM port that the Arduino is connected to under Tools->Port.
  3. បន្ទាប់ពីឃើញការណែនាំឱ្យភ្ជាប់ទៅកុំព្យូទ័រនៅជ្រុងខាងស្តាំខាងក្រោម សូមចុចដើម្បីចងក្រង និងបញ្ចេញកម្មវិធី ហើយរង់ចាំឱ្យការបញ្ចេញពន្លឺបញ្ចប់។ Modbus-RTU-Relay-32CH-Relay-Module-fig19
  4. Install the RS485 CAN Shield module on the Arduino. Connect the RS485_A on the RS485 CAN Shield module to the RS485_A on the Modbus RTU Relay via a wire, and connect the RS485_B on the RS485 CAN Shield module to the RS485_B on the Modbus RTU Relay via a wire. Then power on the Modbus RTU Relay and the Arduino  sequentially.
  5. After powering on, the serial port will output the transmitted commands, which can be observed using a serial port assistant. Meanwhile, the relays will sequentially turn on (e.g., 1→2→3→4). Once all relays are fully activated, they will then sequentially turn off (e.g., 1→2→3→4). You can observe whether the relay is normally engaged through the LED indicator light.
    ចំណាំ៖ The data in the figure below is in ASCII code containing spaces and line breaks, and is not the actual data sent. Modbus-RTU-Relay-32CH-Relay-Module-fig20

ភីអិលស៊ី 

Note: The PLC demo is based on SIMATIC S7-200 SMART.

  1. Download Demo, find the PLC project file modbus_rtu.smart in the path Modbus_RTU_Relay_32CH_Code\PLC, and double-click to open the PLC project file. Note that you should ensure STEP 7-MicroWIN SMART software is installed on your computer before using it. Modbus-RTU-Relay-32CH-Relay-Module-fig21
  2. Connect the PLC to the computer via a network cable. Click to download Modbus-RTU-Relay-32CH-Relay-Module-fig22
  3. Select the communication interface in the communication popup, find your device, and click Confirm Modbus-RTU-Relay-32CH-Relay-Module-fig23
  4. In the download pop-up window, check the boxes for program blocks, data blocks, and system blocks, and then click Download. Modbus-RTU-Relay-32CH-Relay-Module-fig24
  5. Connect the 485_A on the PLC module to RS485_A on the Modbus RTU Relay with a wire, and connect the 485_B on the PLC module to RS485_B on the Modbus RTU Relay with a wire. Then power on the Modbus RTU Relay.
  6. After powering on the Modbus RTU Relay, in the STEP 7-MicroWIN SMART software, find the “PLC” tab in the upper menu bar, switch to this tab, and click the green “RUN” button in the lower “Operation” area to perform the operation to make the PLC enter the running state Modbus-RTU-Relay-32CH-Relay-Module-fig25
  7. After the PLC runs, the relays will sequentially turn on (e.g., 1→2→3→4). Once all relays are fully activated, they will then sequentially turn off (e.g., 1→2→3→4). You can observe whether the relay is normally engaged through the LED indicator light.

ពិធីសារអភិវឌ្ឍន៍ V2

សេចក្តីណែនាំអំពីកូដមុខងារ

 

កូដមុខងារ

 

ការពិពណ៌នា

 

ចំណាំ

 

01

 

អានស្ថានភាពខ្សែ

 

Read relay status

 

03

 

អានការចុះឈ្មោះ

 

Read the address and version

 

05

 

សរសេរខ្សែតែមួយ

 

Write single relay

 

06

 

សរសេរការចុះឈ្មោះតែមួយ

 

Set the baud rate and address

 

0F

 

សរសេរខ្សែជាច្រើន។

 

Write all relays

សេចក្តីផ្តើមអាសយដ្ឋានចុះឈ្មោះ

 

អាសយដ្ឋាន (HEX)

 

អាស័យដ្ឋាន storage content

 

 

ចុះឈ្មោះតម្លៃ

 

 

ការអនុញ្ញាត

 

មុខងារ Modbus កូដ

 

0x0000

…… 0x001F

 

Channels 1~32 relay addresses

 

0xFF00: relay on 0x0000: relay off 0x5500: relay toggle

 

 

អាន/សរសេរ

 

0x01, 0x05,

0x0F

 

 

0x00FF

 

Control all relays

 

0xFF00: all relays on 0x0000: all relays off 0x5500: all relays toggle

 

 

សរសេរ

 

 

0x05

 

0x0100

…… 0x011F

 

Channels 1~32 relays toggle

 

0xFF00: relay toggle 0x0000: relay unchanged

 

 

សរសេរ

 

 

0x05, 0x0F

 

0x01FF

 

All relays toggle

 

0xFF00: all relays toggle 0x0000: all relays unchanged

 

សរសេរ

 

0x05

 

0x0200

…… 0x021F

 

Channels 1~32 relays flash on

 

Delay time: data*100ms

Value: 0x0007, delay time: 7*100MS = 700MS

 

 

សរសេរ

 

 

0x05

 

0x0400

…… 0x041F

 

Channels 1~32 relays flash off

 

Delay time: data*100ms

Value: 0x0007, delay time: 7*100MS = 700MS

 

 

សរសេរ

 

 

0x05

 

 

១២៨០ × ១០២៤

 

 

UART

ប៉ារ៉ាម៉ែត្រ

 

The high eight bits indicate the parity mode: 0x00~0x02

The low eight bits indicate the baud rate mode: 0x00~0x07

 

 

អាន/សរសេរ

 

 

0x03, 0x06

 

១២៨០ × ១០២៤

 

អាសយដ្ឋានឧបករណ៍

 

រក្សាទុកអាសយដ្ឋាន Modbus ដោយផ្ទាល់ អាសយដ្ឋានឧបករណ៍៖ 0x0001-0x00FF

 

អាន/សរសេរ

 

0x03, 0x06

 

 

១២៨០ × ១០២៤

 

 

កំណែសូហ្វវែរ

 

Converting to decimal and then shifting the decimal point two places to the left will represent the software version

0x0064 = 100 = V1.00

 

 

អាន

 

 

0x03

Modbus RTU Command Introduction

Control Single Relay

  • Send code: 01 05 00 00 FF 00 8C 3A
 

វាល

 

ការពិពណ៌នា

 

ចំណាំ

 

01

 

អាសយដ្ឋានឧបករណ៍

 

0x00 បង្ហាញពីអាសយដ្ឋានផ្សាយ 0x01-0xFF បង្ហាញពីអាសយដ្ឋានឧបករណ៍

 

05

 

05 ពាក្យបញ្ជា

 

ការត្រួតពិនិត្យការបញ្ជូនត

 

៦៧ ៨

 

អាស័យដ្ឋាន

 

The register address of the relay to be controlled, 0x0000-0x001F

 

FF ០០

 

បញ្ជា

 

0xFF00: relay on; 0x0000: relay off; 0x5500: relay toggle

 

8C 3A

 

កាកបាទក្រហមកម្ពុជា ៣២

 

ការត្រួតពិនិត្យ CRC16 នៃទិន្នន័យ 6 បៃដំបូង

  • Return code: 01 05 00 00 FF 00 8C 3A
 

វាល

 

ការពិពណ៌នា

 

ចំណាំ

 

01

 

អាសយដ្ឋានឧបករណ៍

 

0x00 បង្ហាញពីអាសយដ្ឋានផ្សាយ 0x01-0xFF បង្ហាញពីអាសយដ្ឋានឧបករណ៍

 

05

 

05 ពាក្យបញ្ជា

 

ការត្រួតពិនិត្យការបញ្ជូនត

 

៦៧ ៨

 

អាស័យដ្ឋាន

 

The register address of the relay to be controlled, 0x0000-0x001F

 

FF ០០

 

បញ្ជា

 

0xFF00: relay on; 0x0000: relay off; 0x5500: relay toggle

 

8C 3A

 

កាកបាទក្រហមកម្ពុជា ៣២

 

ការត្រួតពិនិត្យ CRC16 នៃទិន្នន័យ 6 បៃដំបូង

  • សម្រាប់អតីតample: [Address 1 device]:Modbus-RTU-Relay-32CH-Relay-Module-fig26 Modbus-RTU-Relay-32CH-Relay-Module-fig27

Control All Relays

  • Send code: 01 05 00 FF FF 00 BC 0A
 

វាល

 

ការពិពណ៌នា

 

ចំណាំ

 

01

 

អាសយដ្ឋានឧបករណ៍

 

0x00 បង្ហាញពីអាសយដ្ឋានផ្សាយ 0x01-0xFF បង្ហាញពីអាសយដ្ឋានឧបករណ៍

 

05

 

05 ពាក្យបញ្ជា

 

ការត្រួតពិនិត្យការបញ្ជូនត

 

៣៧ អេហ្វ

 

អាស័យដ្ឋាន

 

Fixed 0x00FF

 

FF ០០

 

បញ្ជា

 

0xFF00: relay on; 0x0000: relay off; 0x5500: relay toggle

 

BC 0A

 

កាកបាទក្រហមកម្ពុជា ៣២

 

ការត្រួតពិនិត្យ CRC16 នៃទិន្នន័យ 6 បៃដំបូង

  • Return code: 01 05 00 FF FF 00 BC 0A
 

វាល

 

ការពិពណ៌នា

 

ចំណាំ

 

01

 

អាសយដ្ឋានឧបករណ៍

 

0x00 បង្ហាញពីអាសយដ្ឋានផ្សាយ 0x01-0xFF បង្ហាញពីអាសយដ្ឋានឧបករណ៍

 

05

 

05 ពាក្យបញ្ជា

 

ការត្រួតពិនិត្យការបញ្ជូនត

 

៣៧ អេហ្វ

 

អាស័យដ្ឋាន

 

Fixed 0x00FF

 

FF ០០

 

បញ្ជា

 

0xFF00: relay on; 0x0000: relay off; 0x5500: relay toggle

 

BC 0A

 

កាកបាទក្រហមកម្ពុជា ៣២

 

ការត្រួតពិនិត្យ CRC16 នៃទិន្នន័យ 6 បៃដំបូង

  • សម្រាប់អតីតample: [Address 1 device]:Modbus-RTU-Relay-32CH-Relay-Module-fig28

Read Relay Status

  • Send code: 01 01 00 00 00 20 3D D2
 

វាល

 

ការពិពណ៌នា

 

ចំណាំ

 

01

 

អាសយដ្ឋានឧបករណ៍

 

0x00 បង្ហាញពីអាសយដ្ឋានផ្សាយ 0x01-0xFF បង្ហាញពីអាសយដ្ឋានឧបករណ៍

 

01

 

01 ពាក្យបញ្ជា

 

Query relay status

 

៦៧ ៨

 

Relay Start Address

 

The register address of the relay, 0x0000 – 0x001F

 

៦៧ ៨

 

លេខបញ្ជូនត

 

The number of relays to be read, which must not exceed the maximum number of relays

 

3D D2

 

កាកបាទក្រហមកម្ពុជា ៣២

 

ការត្រួតពិនិត្យ CRC16 នៃទិន្នន័យ 6 បៃដំបូង

  • Receive code: 01 01 04 00 00 00 00 FB D1
 

វាល

 

ការពិពណ៌នា

 

ចំណាំ

 

01

 

ឧបករណ៍

 

0x00 បង្ហាញពីអាសយដ្ឋានផ្សាយ 0x01-0xFF បង្ហាញពីអាសយដ្ឋានឧបករណ៍

អាស័យដ្ឋាន
 

01

 

01 ពាក្យបញ្ជា

 

Query relay status

 

04

 

លេខបៃ

 

The number of all bytes of the returned status information

 

 

១២៣ ៤

00

 

 

ស្ថានភាពសំណួរ

 

Received relay status

The relay state is in small-endian format, with low bytes first and high bytes last

Bit0: the first relay status; Bit1: the second relay status;

And so on, with the idle high bit being zero

 

FB D1

 

កាកបាទក្រហមកម្ពុជា ៣២

 

ការត្រួតពិនិត្យ CRC16 នៃទិន្នន័យ 6 បៃដំបូង

  • សម្រាប់អតីតample: [អាសយដ្ឋានឧបករណ៍ 1]Modbus-RTU-Relay-32CH-Relay-Module-fig29

Write Relay Status

  • Send code: 01 0F 00 00 00 20 04 FF FF FF FF C5 1C
 

វាល

 

ការពិពណ៌នា

 

ចំណាំ

 

01

 

អាសយដ្ឋានឧបករណ៍

 

0x00 បង្ហាញពីអាសយដ្ឋានផ្សាយ 0x01-0xFF បង្ហាញពីអាសយដ្ឋានឧបករណ៍

 

0F

 

0F Command

 

Write relay status

 

៦៧ ៨

 

Relay Start Address

 

The register address of the relay to be controlled, 0x0000 – 0x001F

 

៦៧ ៨

 

លេខបញ្ជូនត

 

The number of relays to be operated, which must not exceed the maximum number of relays

 

04

 

លេខបៃ

 

The byte number of the status

 

FF FF FF FF

 

 

ស្ថានភាពបញ្ជូនត

 

The relay state is in small-endian format, with low bytes first and high bytes last

Bit0: the first relay status; Bit1: the second relay status;

And so on, with the idle high bit being zero

 

C5 1C

 

កាកបាទក្រហមកម្ពុជា ៣២

 

ការត្រួតពិនិត្យ CRC16 នៃទិន្នន័យ 6 បៃដំបូង

  • Receive code: 01 0F 00 00 00 20 54 13
 

វាល

 

ការពិពណ៌នា

 

ចំណាំ

 

01

 

អាសយដ្ឋានឧបករណ៍

 

0x00 បង្ហាញពីអាសយដ្ឋានផ្សាយ 0x01-0xFF បង្ហាញពីអាសយដ្ឋានឧបករណ៍

 

0F

 

0F Command

 

Control all registers

 

៦៧ ៨

 

Relay Start Address

 

The register address of the relay to be controlled, 0x0000 – 0x001F

 

៦៧ ៨

 

លេខបញ្ជូនត

 

The number of relays to be operated

 

៦៧ ៨

 

កាកបាទក្រហមកម្ពុជា ៣២

 

ការត្រួតពិនិត្យ CRC16 នៃទិន្នន័យ 6 បៃដំបូង

  • សម្រាប់អតីតample: [អាសយដ្ឋានឧបករណ៍ 1]Modbus-RTU-Relay-32CH-Relay-Module-fig30

Relay Flash ON/OFF Command

  • Send code: 01 05 02 00 00 07 8D B0
 

វាល

 

ការពិពណ៌នា

 

ចំណាំ

 

01

 

អាសយដ្ឋានឧបករណ៍

 

0x00 បង្ហាញពីអាសយដ្ឋានផ្សាយ 0x01-0xFF បង្ហាញពីអាសយដ្ឋានឧបករណ៍

 

05

 

05 ពាក្យបញ្ជា

 

Single control command

 

02

 

Flash on flash off

 

02: flash on, 04: flash off

 

00

 

Relay Address

 

The address of the relay to be controlled, 0x00~0x1F

 

៦៧ ៨

 

ពន្យាពេល

 

The delay time: data*100ms

Value: 0x0007, delay time: 7*100MS = 700MS

The maximum setting for the flash-on flash-off time is 0x7FFF

 

8D B0

 

កាកបាទក្រហមកម្ពុជា ៣២

 

ការត្រួតពិនិត្យ CRC16 នៃទិន្នន័យ 6 បៃដំបូង

  • Receive code: 01 05 02 00 00 07 8D B0
 

វាល

 

ការពិពណ៌នា

 

ចំណាំ

 

01

 

អាសយដ្ឋានឧបករណ៍

 

0x00 បង្ហាញពីអាសយដ្ឋានផ្សាយ 0x01-0xFF បង្ហាញពីអាសយដ្ឋានឧបករណ៍

 

05

 

05 ពាក្យបញ្ជា

 

Single control command

 

02

 

Flash on flash off

 

02: flash on, 04: flash off

 

00

 

Relay Address

 

The address of the relay to be controlled, 0x00~0x1F

 

៦៧ ៨

 

ពន្យាពេល

 

The delay time: data*100ms

Value: 0x0007, delay time: 7*100MS = 700MS

The maximum setting for the flash-on flash-off time is 0x7FFF

 

8D B0

 

កាកបាទក្រហមកម្ពុជា ៣២

 

ការត្រួតពិនិត្យ CRC16 នៃទិន្នន័យ 6 បៃដំបូង

  • សម្រាប់អតីតample: [អាសយដ្ឋានឧបករណ៍ 1]Modbus-RTU-Relay-32CH-Relay-Module-fig31 Modbus-RTU-Relay-32CH-Relay-Module-fig32

កំណត់ពាក្យបញ្ជា Baudrate

  • Send code: 01 06 20 00 00 05 42 09
 

វាល

 

ការពិពណ៌នា

 

ចំណាំ

 

01

 

អាសយដ្ឋានឧបករណ៍

 

0x00 បង្ហាញពីអាសយដ្ឋានផ្សាយ 0x01-0xFF បង្ហាញពីអាសយដ្ឋានឧបករណ៍

 

06

 

០៤ ពាក្យបញ្ជា

 

កំណត់អត្រា baud និងអាសយដ្ឋានឧបករណ៍

 

៦៧ ៨

 

Baud rate register

 

0x2000: set the baud rate

 

00

 

វិធីសាស្ត្រសមភាព

 

0x00: គ្មាន​សមភាព, 0x01: សមភាព​គូ; 0x02: សមភាព​សេស

 

 

 

05

 

 

 

តម្លៃអត្រា Baud

 

Correspondence of baud rate values 0x00: 4800

0x01: 9600

0x02: 19200

0x03: 38400

0x04: 57600

0x05: 115200

0x06: 128000

0x07: 256000

 

៦៧ ៨

 

កាកបាទក្រហមកម្ពុជា ៣២

 

ការត្រួតពិនិត្យ CRC16 នៃទិន្នន័យ 6 បៃដំបូង

  • Receive code: 01 06 20 00 00 05 42 09
 

វាល

 

ការពិពណ៌នា

 

ចំណាំ

 

01

 

អាសយដ្ឋានឧបករណ៍

 

0x00 បង្ហាញពីអាសយដ្ឋានផ្សាយ 0x01-0xFF បង្ហាញពីអាសយដ្ឋានឧបករណ៍

 

06

 

០៤ ពាក្យបញ្ជា

 

កំណត់អត្រា baud និងអាសយដ្ឋានឧបករណ៍

 

៦៧ ៨

 

Baud rate register

 

0x2000: set the baud rate

 

00

 

វិធីសាស្ត្រសមភាព

 

0x00: no parity, 0x01: odd parity; 0x02: even parity

 

 

 

05

 

 

 

អត្រា Baud

 

Correspondence of baud rate values 0x00: 4800

0x01: 9600

0x02: 19200

0x03: 38400

0x04: 57600

0x05: 115200

0x06: 128000

0x07: 256000

 

៦៧ ៨

 

កាកបាទក្រហមកម្ពុជា ៣២

 

ការត្រួតពិនិត្យ CRC16 នៃទិន្នន័យ 6 បៃដំបូង

  • សម្រាប់អតីតample: [អាសយដ្ឋានឧបករណ៍ 1]Modbus-RTU-Relay-32CH-Relay-Module-fig33

កំណត់ពាក្យបញ្ជាអាសយដ្ឋានឧបករណ៍

  • Send code: 01 06 40 00 00 01 5D CA
 

វាល

 

ការពិពណ៌នា

 

ចំណាំ

 

01

 

អាសយដ្ឋានឧបករណ៍

 

0x00 បង្ហាញពីអាសយដ្ឋានផ្សាយ 0x01-0xFF បង្ហាញពីអាសយដ្ឋានឧបករណ៍

 

06

 

០៤ ពាក្យបញ្ជា

 

កំណត់អត្រា baud និងអាសយដ្ឋានឧបករណ៍

 

៦៧ ៨

 

Device address register

 

0x4000: set the device address

 

៦៧ ៨

 

អាសយដ្ឋានឧបករណ៍

 

Set the device address, 0x0001-0x00FF

 

5D CA

 

កាកបាទក្រហមកម្ពុជា ៣២

 

ការត្រួតពិនិត្យ CRC16 នៃទិន្នន័យ 6 បៃដំបូង

  • Receive code: 01 06 40 00 00 01 5D CA
 

វាល

 

ការពិពណ៌នា

 

ចំណាំ

 

01

 

អាសយដ្ឋានឧបករណ៍

 

0x00 បង្ហាញពីអាសយដ្ឋានផ្សាយ 0x01-0xFF បង្ហាញពីអាសយដ្ឋានឧបករណ៍

 

06

 

០៤ ពាក្យបញ្ជា

 

កំណត់អត្រា baud និងអាសយដ្ឋានឧបករណ៍

 

៦៧ ៨

 

Device address register

 

0x4000: set the device address

 

៦៧ ៨

 

អាសយដ្ឋានឧបករណ៍

 

Set the device address, 0x0001-0x00FF

 

5D CA

 

កាកបាទក្រហមកម្ពុជា ៣២

 

ការត្រួតពិនិត្យ CRC16 នៃទិន្នន័យ 6 បៃដំបូង

  • សម្រាប់អតីតample: [អាសយដ្ឋានឧបករណ៍ 1]Modbus-RTU-Relay-32CH-Relay-Module-fig34

អានពាក្យបញ្ជាអាសយដ្ឋានឧបករណ៍

  • Send code: 00 03 40 00 00 01 90 1B
 

វាល

 

ការពិពណ៌នា

 

ចំណាំ

 

00

 

អាសយដ្ឋានឧបករណ៍

 

0x00 បង្ហាញពីអាសយដ្ឋានផ្សាយ 0x01-0xFF បង្ហាញពីអាសយដ្ឋានឧបករណ៍

 

03

 

03 ពាក្យបញ្ជា

 

Read the device address

 

៦៧ ៨

 

Device address register

 

0x4000: read the device address

 

៦៧ ៨

 

លេខបៃ

 

ជួសជុល 0x0001

 

90

1B

 

កាកបាទក្រហមកម្ពុជា ៣២

 

ការត្រួតពិនិត្យ CRC16 នៃទិន្នន័យ 6 បៃដំបូង

  • Receive code: 00 03 02 00 01 44 44
 

វាល

 

ការពិពណ៌នា

 

ចំណាំ

 

00

 

អាសយដ្ឋានឧបករណ៍

 

0x00 បង្ហាញពីអាសយដ្ឋានផ្សាយ 0x01-0xFF បង្ហាញពីអាសយដ្ឋានឧបករណ៍

 

03

 

03 ពាក្យបញ្ជា

 

Read the software version and device address

 

02

 

លេខបៃ

 

The number of bytes returned

 

៦៧ ៨

 

អាសយដ្ឋានឧបករណ៍

 

Set the device address, 0x0001-0x00FF

 

៦៧ ៨

 

កាកបាទក្រហមកម្ពុជា ៣២

 

ការត្រួតពិនិត្យ CRC16 នៃទិន្នន័យ 6 បៃដំបូង

  • សម្រាប់អតីតample: [អាសយដ្ឋានឧបករណ៍ 2]Modbus-RTU-Relay-32CH-Relay-Module-fig35

អានពាក្យបញ្ជាកំណែកម្មវិធី

  • Send code: 01 03 80 00 00 01 AD CA
 

វាល

 

ការពិពណ៌នា

 

ចំណាំ

 

01

 

អាសយដ្ឋានឧបករណ៍

 

0x00 បង្ហាញពីអាសយដ្ឋានផ្សាយ 0x01-0xFF បង្ហាញពីអាសយដ្ឋានឧបករណ៍

 

03

 

03 ពាក្យបញ្ជា

 

Read the software version and device address

 

៦៧ ៨

 

Software version register

 

0x4000: read the device address, 0x8000: read software version

 

៦៧ ៨

 

លេខបៃ

 

ជួសជុល 0x0001

 

AD CA

 

កាកបាទក្រហមកម្ពុជា ៣២

 

ការត្រួតពិនិត្យ CRC16 នៃទិន្នន័យ 6 បៃដំបូង

  • Receive code: 01 03 02 01 2C B8 09
 

វាល

 

ការពិពណ៌នា

 

ចំណាំ

 

01

 

អាសយដ្ឋានឧបករណ៍

 

0x00 បង្ហាញពីអាសយដ្ឋានផ្សាយ 0x01-0xFF បង្ហាញពីអាសយដ្ឋានឧបករណ៍

 

03

 

03 ពាក្យបញ្ជា

 

Read the software version and device address

 

02

 

លេខបៃ

 

The number of bytes returned

 

01

2C

 

កំណែសូហ្វវែរ

 

Converting to decimal and then shifting the decimal point two places to the left will represent the software version

0x012C = 300 = V3.00

 

B8 ៤

 

កាកបាទក្រហមកម្ពុជា ៣២

 

ការត្រួតពិនិត្យ CRC16 នៃទិន្នន័យ 6 បៃដំបូង

  • សម្រាប់អតីតampលេ៖

កូដអនុគមន៍ករណីលើកលែង

  • នៅពេលដែលពាក្យបញ្ជាដែលទទួលបានមិនត្រឹមត្រូវ ឬឧបករណ៍មិនប្រក្រតី ការឆ្លើយតបករណីលើកលែងនឹងត្រូវបានប្រគល់មកវិញក្នុងទម្រង់ដូចខាងក្រោម៖
  • Return code: 01 85 03 02 91
 

វាល

 

ការពិពណ៌នា

 

ចំណាំ

 

01

 

អាសយដ្ឋានឧបករណ៍

 

0x00 បង្ហាញពីអាសយដ្ឋានផ្សាយ 0x01-0xFF បង្ហាញពីអាសយដ្ឋានឧបករណ៍

 

85

 

កូដអនុគមន៍ករណីលើកលែង

 

Exception function code = Request function code + 0x80

 

03

 

លេខបៃ

 

លេខកូដលើកលែង

 

02

91

 

កាកបាទក្រហមកម្ពុជា ៣២

 

ការត្រួតពិនិត្យ CRC16 នៃទិន្នន័យ 6 បៃដំបូង

  • កូដករណីលើកលែងគឺជាតម្លៃបៃតែមួយដែលបង្ហាញពីប្រភេទនៃកំហុស។ កូដករណីលើកលែងដែលប្រើជាទូទៅមួយចំនួនដែលកំណត់ដោយពិធីការ Modbus៖
 

ករណីលើកលែង កូដ

 

ឈ្មោះ

 

ការពិពណ៌នា

 

0x01

 

មុខងារខុសច្បាប់

 

កូដមុខងារដែលបានស្នើមិនត្រូវបានគាំទ្រទេ

 

0x02

 

អាសយដ្ឋានទិន្នន័យខុសច្បាប់

 

អាសយដ្ឋានទិន្នន័យដែលបានស្នើសុំមិនត្រឹមត្រូវ

 

0x03

 

តម្លៃទិន្នន័យខុសច្បាប់

 

តម្លៃទិន្នន័យ ឬប្រតិបត្តិការដែលបានស្នើមិនអាចប្រតិបត្តិបានទេ

 

0x04

 

ការបរាជ័យរបស់ម៉ាស៊ីនមេ

 

ការបរាជ័យនៃឧបករណ៍ម៉ាស៊ីនបម្រើ

 

0x05

 

ការឆ្លើយតប

 

សំណើត្រូវបានទទួលហើយ ហើយកំពុងត្រូវបានដំណើរការ

 

0x06

 

ឧបករណ៍​រវល់

 

ឧបករណ៍នេះកំពុងមមាញឹក ហើយមិនអាចអនុវត្តប្រតិបត្តិការដែលបានស្នើសុំបានទេ

  • ធនធាន

ការបង្ហាញ

  • ការបង្ហាញ

កម្មវិធី

  • Sscom5.13.1_for_Modbus_RTU_Relay_32CH.zip
  • កម្មវិធី Modbus Poll
  • កម្មវិធី SecureCRT

ធនធានដែលពាក់ព័ន្ធ

  • លក្ខណៈបច្ចេកទេសនៃពិធីការ Modbus
  • ការពិពណ៌នាអំពីឧបករណ៍ចាប់ផ្ដើមប្រព័ន្ធស៊េរី Modbus
  • Protocol V1
  • Using Modbus RTU Relay with Home Assistant

សំណួរគេសួរញឹកញាប់

Q: Can RS485 be directly connected to the Raspberry Pi's serial port?

A: No, it is not recommended as it may damage the device. Use an RS485 CAN HAT module for Raspberry Pi.

Q: What software is recommended for running demos?

A: For Raspberry Pi, use SSCOM Serial Port Debugging Assistant and Modbus Poll Software. For STM32, use Keil5 software. For Arduino, use Arduino IDE.

ឯកសារ/ធនធាន

Modbus RTU Relay 32CH Relay Module [pdf] សៀវភៅណែនាំ
RTU Relay 32CH Relay Module, RTU Relay 32CH, Relay Module

ឯកសារយោង

ទុកមតិយោបល់

អាសយដ្ឋានអ៊ីមែលរបស់អ្នកនឹងមិនត្រូវបានផ្សព្វផ្សាយទេ។ វាលដែលត្រូវការត្រូវបានសម្គាល់ *