background image

               

                SM1212B-12    Us er Ma nual                   

http://www.sonbus.com/ 

Sha nghai Son

best Industrial Co., Ltd                                                                             Page2

 

core color is for reference. 

        Communication Protocol 

        The product uses RS485 MODBUS-RTU standard protocol format, all operation or reply commands 

are hexadecimal data. The default device address is 1 when the device is shipped, the default baud rate is 

9600, 8, n, 1   

        1. Read Data (Function id 0x03) 

        Inquiry frame (hexadecimal), sending example: Query 1# device 1 data, the host  computer sends the 

command:01 03 00 00 00 0C 45 CF . 

Device ID 

Function id 

Start Address 

Data Length 

CRC16 

01 

03 

00 00 

00 0C 

45 CF 

        For the correct query frame, the device will respond with data:01 03 18 00 79 00 00 00 00 00 00 00 00 

00 00 00 00 00 00 00 00 00 00 00 00 00 00 A5 E8 , the response format is parsed as follows:   

Device 

ID 

Function 

id 

Data 

Length 

 

 

 

 

 

 

 

01 

03   

18 

00 

79 

00 

7A 

00 

7B 

00 

7C 

00 

7D 

00 

7E 

 

 

 

 

 

 

 

        Data Description: The data in the command is hexadecimal. Take data 1 as an example. 00 79 is 

converted to a decimal value of 121. If the data magnification is 100, the actual value is 121/100=1.21. 

Others and so on. 

        2. Data Address Table 

Address 

Start Address 

Description 

Data type 

Value range 

40001 

00 00 

1#temperatureregister 

Read only 

0~65535 

40002 

00 01 

2#humidityregister 

Read only 

0~65535 

40003 

00 02 

3#temperatureregister 

Read only 

0~65535 

40004 

00 03 

4#humidityregister 

Read only 

0~65535 

40005 

00 04 

5#temperatureregister 

Read only 

0~65535 

40006 

00 05 

6#humidityregister 

Read only 

0~65535 

... 

... 

... 

... 

... 

40023 

00 16 

23#temperatureregister  Read only 

0~65535 

40024 

00 17 

24#humidityregister 

Read only 

0~65535 

40101 

00 64 

model code 

read/write 

0~65535 

40102 

00 65 

total points 

read/write 

1~20 

40103 

00 66 

Device ID 

read/write 

1~249 

40104 

00 67 

baud rate 

read/write 

0~6 

40105 

00 68 

mode 

read/write 

1~4 

40106 

00 69 

protocol 

read/write 

1~10 

        3 read and modify device address 
        (1) Read or query device address 

        If you don't know the current device address and there is only one device on the bus, you can use the 

command FA 03 00 64 00 02 90 5F Query device address. 

Device ID 

Function id 

Start Address 

Data Length 

CRC16 

FA 

03 

00 64 

00 02 

90 5F 

        FA is 250 for the general address. When you don't know the address, you can use 250 to get the real 

device address, 00 64 is the device model register. 

Содержание SM1212B-12

Страница 1: ...parameter Parameter value Brand SONBEST Temperature measuring range 30 80 Temperature measuring accuracy 0 5 25 Support sensor SHT20 Channels 12 Input bus IIC Humidity measuring range 0 100 RH Humidity accuracy 3 RH 25 Communication Interface RS485 Default baud rate 9600 8 n 1 Power DC9 24V 1A Running temperature 40 80 C Wiring instructions Any incorrect wiring can cause irreversible damage to the...

Страница 2: ...ification is 100 the actual value is 121 100 1 21 Others and so on 2 Data Address Table Address Start Address Description Data type Value range 40001 00 00 1 temperatureregister Read only 0 65535 40002 00 01 2 humidityregister Read only 0 65535 40003 00 02 3 temperatureregister Read only 0 65535 40004 00 03 4 humidityregister Read only 0 65535 40005 00 04 5 temperatureregister Read only 0 65535 40...

Страница 3: ...4 Read and Modify Baud Rate 1 Read baud rate The device default factory baud rate is 9600 If you need to change it you can change it according to the following table and the corresponding communication protocol For example read the current device s baud rate ID the command is 01 03 00 67 00 01 35 D5 its format is parsed as follows Device ID Function id Start Address Data Length CRC16 01 03 00 67 0...

Страница 4: ... the general temperature humidity have this parameter the light generally does not have this item 2 Change correction value For example the current state quantity is too small we want to add 1 to its true value and the current value plus 100 correction operation command is 01 06 00 6B 00 64 F9 FD Device ID Function id Start Address Destination CRC16 01 06 00 6B 00 64 F9 FD After the operation is s...

Отзывы: