Technical parameters | Parameter value |
Temperature measurement range | -30°C~80°C |
Temperature measurement accuracy | ±0.5°C at 25°C |
Humidity measurement range | 0~100%RH |
Humidity measurement accuracy | ±3%RH at 25°C |
Communication interface | RS485 |
Default baud rate | 9600 8 n 1 |
Power supply | DC6~24V 1A |
Operating environment temperature | -40~80°C |
Operating environment humidity | 5%RH~90%RH |
RS485 type: The communication protocol
product uses the RS485MODBUS-RTU standard protocol format, and all operation or reply commands are hexadecimal data. When the device is shipped from the factory, the default device address is 1, and the default baud rate is 9600, 8, n, 1.
query frame (hexadecimal), send example: query 1# device 1 data, host computer send command: 01 03 00 00 00 02 C4 0B.
Address | function code | start address | data length | check code |
01 | 03 | 00 00 | 00 02 | C4 0B |
For the correct inquiry frame, the device will respond to the data: 01 03 04 00 79 00 7A AA 09 , response format:
address | function code | length | data 1 | Data 2 | check code |
01 | 03 | 04 | 00 79 | 00 7A | AA 09 |
Data description: The data in the command is hexadecimal, taking data 1 as an example, 0079 is converted to a decimal value of 121, assuming the data magnification is 100, the true value is 121/100=1.21, others and so on.
When the value is negative, the data is uploaded in the form of a complement. The method generally is greater than 32,768 is determined by values.
judgingthe positive and negative A negative value is received when the received value is greater than 32768, and the previous value minus 65535 divided by 100 is the true value. For example, if the received temperature data is 62999 (hexadecimal F617), the true value = (62999-65535) / 100 = -25.36.
Configuration Address | Register Address | Register Description | Data Type | Value Range |
40001 | 00 00 | Temperature Register | Read Only | 0~65535 |
40002 | 00 01 | Humidity Register | Read Only | 0~65535 |
40101 | 00 64 | Model Code | Read/Write | 0~65535 |
40102 | 00 65 | Total number of measurement points | read/ Write | 1~20 |
40103 | 00 66 | device address | read/write | 1~249 |
40104 | 00 67 | baud rate | read/write | 0~6 |
40105 | 00 68 | communication mode | read/write | 1~4 |
40106 | 00 69 | protocol type | read/write | 1~10 |
3 Read and modify device address
(1) Read or query the device address of the
device does not know the current address, and only one device, you can command FA 03 00 64 00 02 90 5F query the device address on the bus.
Device address | function code | start address | data length | check code |
FA | 03 | 00 64 | 00 02 | 90 5F |
FA 250 is the general address, when you do not know the address, you can use 250 this address to get the real device address, 00 64 is the device model register .
For the correct query command, the device will respond. For example, the response data is: 01 03 02 07 12 3A 79. The format of theas follows:
device isDevice address | function code | Start address | Model code | check code |
01 | 03 | 02 | 55 3C 00 01 | In the 3A 79 |
response data, the first byte 01 indicates that the real address of the current device is 55, and the conversion of 55 3C to decimal is 21820
, indicating that the current device main model is 21820, and the last two bytes 00 01 indicates that the device has a State quantity.
example, the current device address is 1, we want to change to 02, the command is: 01 06 00 6600 02 E8 14 .
device address | Function | Register address of | the destination address | check code |
01 | 06 | 66 00 | 0002 | E8 14 |
After theChanging successful, the device will return information: 0206 0066 0002 E827, parse the format shown in the following table:
Device address | Function | Register address of | the destination address | school Code |
01 | 06 | 00 66 | 00 02 | E8 27 |
Response data, after the modification is successful, the first byte is the new device address. After the general device address is changed, it will take effect immediately. At this time, the user needs to query the software at the same time. Make the appropriate changes.
(1) Theread baud rate
default baud rate of thedevice is 9600. If you need to change it, you can change it according to the following table and the corresponding communication protocol.than
The readingthe baud rate of the current ID, command: 01 03 00 67 00 01 35format interpreted as follows.
Device address | function code | start address | data length | check code |
01 | 03 | 00 67 | 00 01 | 35 D5 |
reads the baud rate code of the current device. Baud rate coding: 1 is 2400; 2 is 4800; 3 is 9600; 4 is 19200; 5 is 38400; 6 is 115200.
For the correct query command, the device will respond. For example, the response data is: 01 03 02 00 03 F8 45. The format of theas follows:
device isDevice address | function code | Data length | Baud rate code | check code |
01 | 03 | 02 | 00 03 | F8 45 |
According to the baud rate coding, 03 is 9600, that is, the current device has a baud rate of 9600.
such asrate from 9600 to 38400, that is, changing the code from 3 to 5, the command is: 010030660001
64 15 .
Device Address | Function Code | Register Address | Target Baud Rate | Check Code |
01 | 03 | 00 66 | 00 01 | 64 15 |
Change the baud rate from 9600 to 38400, which changes the code from 3 to 5. The new baud rate will take effect immediately, at which point the device will lose its response and the baud rate of the device will need to be modified accordingly.
(1) Reading the correction value
When the data has an error with the reference standard, we can reduce the display error by adjusting the "correction value". The correction difference can be modified to be plus or minus 1000, that is, the value range is 0-1000 or 64535-65535. For example, when the display value is too small, we can correct it by adding 100. The command is: 01 03 00 6B 00 01 F5 D6 . In the command, 100 is hexadecimal 0x64; if it needs to be reduced, you can set a negative value, such as -100, corresponding to the hexadecimal value of FF9C, which is calculated as 100-65535=65435, then converted to sixteen The hexadecimal is 0xFF9C. The device correction value starts from 006B. We take the first parameter as an example. The correction value reading and modification methods are the same for multiple parameters.
Device address | function code | start address | data length | check code |
01 | 03 | 00 6B | 00 01 | F5 D6 |
For the correct query command, the device will respond, for example, the response data is: 01 03 02 00 64 B9 AF, its format is as shown in the following table. :
Device address | function code | Data length | correction value | check code |
01 | 03 | 02 | 00 64 | B9 AF |
response data, the first byte 01 indicates the real address of the current device, and 00 6B is the first state quantity correction value register. If the device has multiple parameters, the other parameters operate in the same way. Generally, the temperature and humidity have this parameter, and the illumination generally does not have this item.
example, the current state quantity is too small, we want to increase its true value by 1, the current value plus 100 correction operation command is: 010600
6B 00 64 F9 FD.
Device Address | Function Code | Register Address | Destination Address | Check Code |
01 | 06 | 00 6B | 00 64 | F9 After the FD |
operation is successful, the device will return information: 01 06 00 6B 00 64 F9 FD. After successful change, the parameters take effect immediatel