Humidity and Temperature Transmitter Specification modbus EN V1.0.pdfThe temperature is below 0 o C...
Transcript of Humidity and Temperature Transmitter Specification modbus EN V1.0.pdfThe temperature is below 0 o C...
![Page 1: Humidity and Temperature Transmitter Specification modbus EN V1.0.pdfThe temperature is below 0 o C if the MSB of temperature value is 1, great than 0 o C if the MSB of temperature](https://reader034.fdocuments.us/reader034/viewer/2022051910/60001e4e3ade6a2a5c33c7c5/html5/thumbnails/1.jpg)
USR-HTW User Manual www.usr.so
Jinan USR IOT Technology Limited 1 / 20 [email protected]
Humidity and Temperature Transmitter
Specification
USR-HTW(Modbus) Version: V1.0
![Page 2: Humidity and Temperature Transmitter Specification modbus EN V1.0.pdfThe temperature is below 0 o C if the MSB of temperature value is 1, great than 0 o C if the MSB of temperature](https://reader034.fdocuments.us/reader034/viewer/2022051910/60001e4e3ade6a2a5c33c7c5/html5/thumbnails/2.jpg)
USR-HTW User Manual www.usr.so
Jinan USR IOT Technology Limited 2 / 20 [email protected]
Content
1. Product Introduction ....................................................................................................................... 3
1.1 Product Description ................................................................................................................... 3
1.2 Details .................................................................................................................................... 3
1.3 Indicator and Key Function.......................................................................................................... 4
2. Instructions for Use ........................................................................................................................ 4
2.1 Connect to local router ............................................................................................................... 5
2.2 How to communicate with HTW ................................................................................................... 8
2.2.1 communication in the same local area network ........................................................................ 8
2.2.2 communication in the wide area network ............................................................................. 14
3. Modbus protocol .......................................................................................................................... 15
3.1 MODBUS Addressing rules ....................................................................................................... 15
3.2 MODBUS frame description ...................................................................................................... 16
3.3 Data Encoding ........................................................................................................................ 16
3.4 communication examples .......................................................................................................... 17
3.5 MODBUS exceptional response.................................................................................................. 18
4. ASCII code command ................................................................................................................... 19
READ .................................................................................................................................. 19
AUTO.................................................................................................................................. 19
STOP .................................................................................................................................. 19
Contact Information ............................................................................................................................ 19
Disclaimer ........................................................................................................................................ 20
Update History ................................................................................................................................... 20
![Page 3: Humidity and Temperature Transmitter Specification modbus EN V1.0.pdfThe temperature is below 0 o C if the MSB of temperature value is 1, great than 0 o C if the MSB of temperature](https://reader034.fdocuments.us/reader034/viewer/2022051910/60001e4e3ade6a2a5c33c7c5/html5/thumbnails/3.jpg)
USR-HTW User Manual www.usr.so
Jinan USR IOT Technology Limited 3 / 20 [email protected]
1. Product Introduction
1.1 Product Description
USR-HTW(Modbus) is wireless temperature and humidity transmitter, which supports Modbus
RTU mode protocol. This product uses high-quality capacitive digital temperature and humidity sensor,
which features high accuracy, strong immunity from interference, high reliability and stability.
Multiple devices (up to 247 devices) can be connected to one monitor software through virtual
serial software just like Modbus protocol realized over real serial line(RS232 or RS485), which
reduces the complexity of system building, increases the communication distance.
1.2 Details
Table.1 USR-HTW Parameter
Mechanical
Dimensions
86*86*28mm(L*W*H)
Working voltage
range
DC 5-24V
Power consumption Typical:1W Max: 2W
Working temperature -20-70°C
Working humidity 0~99.9%RH (Non-condensing)
Temperature
measuring range
-40-80°C
Temperature
measuring accuracy
±0.4℃
Temperature
measuring resolution
0.1℃
Humidity measuring
range
0~99.9%RH
Humidity measuring
accuracy
±2%RH (25℃)
Humidity measuring
resolution
0.1%RH
Installation wall mounting type
Preservation
environment
temperature : 10-40°C
Humidity: <60%RH
Packing List USR-HTW*1
![Page 4: Humidity and Temperature Transmitter Specification modbus EN V1.0.pdfThe temperature is below 0 o C if the MSB of temperature value is 1, great than 0 o C if the MSB of temperature](https://reader034.fdocuments.us/reader034/viewer/2022051910/60001e4e3ade6a2a5c33c7c5/html5/thumbnails/4.jpg)
USR-HTW User Manual www.usr.so
Jinan USR IOT Technology Limited 4 / 20 [email protected]
Table.2 Default settings
Network Mode AP
AP SSID USR-HTW
AP Password null
Device Name USR-HTW
Device Password admin
Webpage address in AP mode 10.10.100.254
Account / Password of Webpage Account : admin
Password: the same to Device
Password
Typical applications:
Communication base stations, archives, warehouses, labs, factories, workshops, machine
rooms, museums, libraries, hospitals, hotels, restaurants, houses and so on.
1.3 Indicator and Key Function
A. Indicator
Red indicator : On when the USR-HTW works nomally;
Blinks when press on refresh key for a long time, indicates for what action is doing with
different frequencies;
Blue indicator : Network connection status indicator.
B. Refresh key
Short Press(0~3s): Refresh the value of humidity and temperature.
Long press(5s-10s):
Release the key when the red indictor light blinks slowly, the device will return to
default factory settings. After 10s about, it will work again.
Long press(5s-10s):
Release the key when the red indictor light blinks quickly, slave’s ID(unique address)
will display on the screen.
C. Temperature max:
Display the max value in last 1 hour after you press it.
D. Temperature min:
Display the min value in last 1 hour after you press it.
E. Humidity max:
Display the max value in last 1 hour after you press it.
F. Humidity min:
Display the min value in last 1 hour after you press it.
2. Instructions for Use
Supply the USR-HTW with a DC power 5V, up to 24V.
Note : ‘+’ represents positive, ‘-’ represents negative i.e. ground.
![Page 5: Humidity and Temperature Transmitter Specification modbus EN V1.0.pdfThe temperature is below 0 o C if the MSB of temperature value is 1, great than 0 o C if the MSB of temperature](https://reader034.fdocuments.us/reader034/viewer/2022051910/60001e4e3ade6a2a5c33c7c5/html5/thumbnails/5.jpg)
USR-HTW User Manual www.usr.so
Jinan USR IOT Technology Limited 5 / 20 [email protected]
2.1 Connect to local router
Connect with the wireless router via Webpage configuration. Other computer operating systems refer to this
process. The configuration requires a wireless network card on computer.
1. AP mode is default work mode. After the HTW work, click wireless network button to get the
wireless list.
2. Find “USR-HTW” and connect.
![Page 6: Humidity and Temperature Transmitter Specification modbus EN V1.0.pdfThe temperature is below 0 o C if the MSB of temperature value is 1, great than 0 o C if the MSB of temperature](https://reader034.fdocuments.us/reader034/viewer/2022051910/60001e4e3ade6a2a5c33c7c5/html5/thumbnails/6.jpg)
USR-HTW User Manual www.usr.so
Jinan USR IOT Technology Limited 6 / 20 [email protected]
3. Open the Webpage of HTW, IP address: 10.10.100.254.
4. Input the account and password, default: admin, admin.
![Page 7: Humidity and Temperature Transmitter Specification modbus EN V1.0.pdfThe temperature is below 0 o C if the MSB of temperature value is 1, great than 0 o C if the MSB of temperature](https://reader034.fdocuments.us/reader034/viewer/2022051910/60001e4e3ade6a2a5c33c7c5/html5/thumbnails/7.jpg)
USR-HTW User Manual www.usr.so
Jinan USR IOT Technology Limited 7 / 20 [email protected]
5. Click Scan router to get the router information list, and then select the router you want to connect,
click OK。
6. Input router passwords, save .
![Page 8: Humidity and Temperature Transmitter Specification modbus EN V1.0.pdfThe temperature is below 0 o C if the MSB of temperature value is 1, great than 0 o C if the MSB of temperature](https://reader034.fdocuments.us/reader034/viewer/2022051910/60001e4e3ade6a2a5c33c7c5/html5/thumbnails/8.jpg)
USR-HTW User Manual www.usr.so
Jinan USR IOT Technology Limited 8 / 20 [email protected]
7. Restart HTW.
HTW will connect to the router automatically after restart, the blue indicator will light up.
2.2 How to communicate with HTW
2.2.1 communication in the same local area network
After you operate following section 2.1, HTW has joined the local router, now be sure your computer is
in the same router.
1. Users should set IP of your computer to static IP.
2. Install virtual serial port software.
![Page 9: Humidity and Temperature Transmitter Specification modbus EN V1.0.pdfThe temperature is below 0 o C if the MSB of temperature value is 1, great than 0 o C if the MSB of temperature](https://reader034.fdocuments.us/reader034/viewer/2022051910/60001e4e3ade6a2a5c33c7c5/html5/thumbnails/9.jpg)
USR-HTW User Manual www.usr.so
Jinan USR IOT Technology Limited 9 / 20 [email protected]
3. Open the virtual serial port software. click on “add com”button, popup dialog box,
choose an com port that not used by other devices. Net protocol select TCP server, local port input
8899,click OK. It is not necessary to care about baud rate. The software can deal with it. The
software just tranfer date transparently no matter what baud rate it uses, no matter what checking
pattern it uses, no matter how many stop bits it uses.
![Page 10: Humidity and Temperature Transmitter Specification modbus EN V1.0.pdfThe temperature is below 0 o C if the MSB of temperature value is 1, great than 0 o C if the MSB of temperature](https://reader034.fdocuments.us/reader034/viewer/2022051910/60001e4e3ade6a2a5c33c7c5/html5/thumbnails/10.jpg)
USR-HTW User Manual www.usr.so
Jinan USR IOT Technology Limited 10 / 20 [email protected]
4. Open USR-HTW configuration tools, product application mode select Modbus, target server address
or domain input computers static IP address, target server port input 8899, click search button, click
the HTW you want to set, then click set target server button. If you set successfully, it will return ok.
![Page 11: Humidity and Temperature Transmitter Specification modbus EN V1.0.pdfThe temperature is below 0 o C if the MSB of temperature value is 1, great than 0 o C if the MSB of temperature](https://reader034.fdocuments.us/reader034/viewer/2022051910/60001e4e3ade6a2a5c33c7c5/html5/thumbnails/11.jpg)
USR-HTW User Manual www.usr.so
Jinan USR IOT Technology Limited 11 / 20 [email protected]
By the way, if you have done this configuration, you can’t use it by LonHand software, if you want
use LonHand software again ,just reset it.
Now you can see the HTW device have connect to computer by virtual COM5. You can add up to
247 devices(depending on the modbus slave address range) to this COM5 port.
![Page 12: Humidity and Temperature Transmitter Specification modbus EN V1.0.pdfThe temperature is below 0 o C if the MSB of temperature value is 1, great than 0 o C if the MSB of temperature](https://reader034.fdocuments.us/reader034/viewer/2022051910/60001e4e3ade6a2a5c33c7c5/html5/thumbnails/12.jpg)
USR-HTW User Manual www.usr.so
Jinan USR IOT Technology Limited 12 / 20 [email protected]
5. Set USR-HTW ID i.e. slave address. Because our product have been set ID 17 when it is produced,
if you need more than on device to build your own monitor system of humidity and temperature, you
need change this default ID,1-247 except 17 will be fine. The command format should conform to
Modbus protocol, which is introduced in section 3.4. You also need an assistant tool supplied by our
company.
Portnum choose COM5 you have set by virtual serial port software, other parameters default. Click
open button. Send options you should select send as Hex, as shown above. For example , we set ID
as 80(0x50). Don’t forget CRC checking code.
![Page 13: Humidity and Temperature Transmitter Specification modbus EN V1.0.pdfThe temperature is below 0 o C if the MSB of temperature value is 1, great than 0 o C if the MSB of temperature](https://reader034.fdocuments.us/reader034/viewer/2022051910/60001e4e3ade6a2a5c33c7c5/html5/thumbnails/13.jpg)
USR-HTW User Manual www.usr.so
Jinan USR IOT Technology Limited 13 / 20 [email protected]
You can monitor data communication by virtual serial port softeware, for example we obtain data of
humidity and temperature constantly by sending commands through serial port. Just click monitor
button on the tool colum.
![Page 14: Humidity and Temperature Transmitter Specification modbus EN V1.0.pdfThe temperature is below 0 o C if the MSB of temperature value is 1, great than 0 o C if the MSB of temperature](https://reader034.fdocuments.us/reader034/viewer/2022051910/60001e4e3ade6a2a5c33c7c5/html5/thumbnails/14.jpg)
USR-HTW User Manual www.usr.so
Jinan USR IOT Technology Limited 14 / 20 [email protected]
2.2.2 communication in the wide area network
If your computer and device(HTW) are in different network segment that in wide area net work, you need
map your computer out by local router. Thus your router should support virtual servers setting or NAT setting.
And you also need another laptop to set the USR-HTW just as bellow. This laptop is in the same router with
HTW. Product application mode column select Modbus, target server address or domain set column input
your computer IP, target server port input server port. NOTE: you must pay attention to server port, which is
allocated by your router, and to local port which is allocated by your computer. You must distinguish this two
ports.60000 is sever port and 8899 is local port.
![Page 15: Humidity and Temperature Transmitter Specification modbus EN V1.0.pdfThe temperature is below 0 o C if the MSB of temperature value is 1, great than 0 o C if the MSB of temperature](https://reader034.fdocuments.us/reader034/viewer/2022051910/60001e4e3ade6a2a5c33c7c5/html5/thumbnails/15.jpg)
USR-HTW User Manual www.usr.so
Jinan USR IOT Technology Limited 15 / 20 [email protected]
3. Modbus protocol
3.1 MODBUS Addressing rules
The MODBUS addressing space comprises 256 different addresses.
![Page 16: Humidity and Temperature Transmitter Specification modbus EN V1.0.pdfThe temperature is below 0 o C if the MSB of temperature value is 1, great than 0 o C if the MSB of temperature](https://reader034.fdocuments.us/reader034/viewer/2022051910/60001e4e3ade6a2a5c33c7c5/html5/thumbnails/16.jpg)
USR-HTW User Manual www.usr.so
Jinan USR IOT Technology Limited 16 / 20 [email protected]
The Address 0 is reserved as the broadcast address. All slave nodes must recognise the broadcast
address.
The MODBUS Master node has no specific address, only the slave nodes must have an address. This
address must be unique on a MODBUS serial bus.
3.2 MODBUS frame description
The MODBUS protocol defines a simple protocol data unit (PDU) independent of the underlying
communication layers.
The mapping of MODBUS protocol on a specific bus or network introduces some additional fields
on the Protocol Data Unit. The client that initiates a MODBUS transaction builds the MODBUS PDU,
and then adds fields in order to build the appropriate communication PDU.
For more informations, please visit http://www.modbus.org. Our product supports Modbus RTU
mode.
USR-HTW supports function codes as bellow:
‘0x03’,’0x04’: read data of humidity and temperature(optional humidity&temperature or humidity
or temperature)
‘0x06’: set the slave address (ID).
‘0x6E’: customized function code. When master send this function code by broadcast (address 0),
the device will reset ID to factory Default setting (17).
Table Internal Registers address mapping
Register name address
humidity 0x0000
temperature 0x0001
reserved 0x0002-0x0005
Device ID 0x000A
3.3 Data Encoding
MODBUS uses a ‘big-Endian’ representation for addresses and data items. This means that when a
numerical quantity larger than a single byte is transmitted, the most significant byte is sent first. So for
![Page 17: Humidity and Temperature Transmitter Specification modbus EN V1.0.pdfThe temperature is below 0 o C if the MSB of temperature value is 1, great than 0 o C if the MSB of temperature](https://reader034.fdocuments.us/reader034/viewer/2022051910/60001e4e3ade6a2a5c33c7c5/html5/thumbnails/17.jpg)
USR-HTW User Manual www.usr.so
Jinan USR IOT Technology Limited 17 / 20 [email protected]
example
Register size value
16 – bits 0x1234 the first byte sent is 0x12 then 0x34
3.4 communication examples
Read value of humidity and temperature
Request: 0x11 0x03 0x00 0x00 0x00 0x02 0xC6 0x9B
Master send Content Byte count comment
Slave ID 0x11 1
Function code 0x03 1 Read Registers
Starting Address 0x0000 2 High half-word first
Quantity of Registers 0x0002 2 High half-word first
CRC check 0xC69B 2 High half-word first
Response: 0x11 0x03 0x04 0x01 0xF2 0x00 0xF2 0xCA 0x78
Slave send Content Byte count comment
Slave ID 0x11 1
Function code 0x03 1 Read Registers
Byte count 0x04 1 Return byte count of registers
Register 0 0x01F2 2 Humidity value
Register 1 0x00F2 2 Temperature value
CRC check 0xCA78 2
The temperature is below 0 o
C if the MSB of temperature value is 1, great than 0 o
C if the MSB of
temperature value is 0. The obtained value is 10 times of real value. For example, humidity’s value
0x01F2, that is 498 in decimal. The real humidity is 49.8%RH. Temperature’s value is 0x00F2, that is
242 in decimal. The real temperature is 24.2 o
C.
Read value of humidity
Request: 0x11 0x03 0x00 0x00 0x00 0x01 0x86 0x9A
Master send Content Byte count comment
Slave ID 0x11 1
Function code 0x03 1 Read Registers
Starting Address 0x0000 2 High half-word first
Quantity of Registers 0x0001 2 High half-word first
CRC check 0x869A 2 High half-word first
Response: 0x11 0x03 0x02 0x01 0xF2 0xF9 0x92
Slave send Content Byte count comment
Slave ID 0x11 1
Function code 0x03 1 Read Registers
Byte count 0x02 1 Return byte count of registers
Register 0 0x01F2 2 Humidity value
CRC check 0xF992 2
![Page 18: Humidity and Temperature Transmitter Specification modbus EN V1.0.pdfThe temperature is below 0 o C if the MSB of temperature value is 1, great than 0 o C if the MSB of temperature](https://reader034.fdocuments.us/reader034/viewer/2022051910/60001e4e3ade6a2a5c33c7c5/html5/thumbnails/18.jpg)
USR-HTW User Manual www.usr.so
Jinan USR IOT Technology Limited 18 / 20 [email protected]
Read value of temperature
Request: 0x11 0x03 0x00 0x01 0x00 0x01 0xD7 0x5A
Master send Content Byte count comment
Slave ID 0x11 1
Function code 0x03 1 Read Registers
Starting Address 0x0001 2 High half-word first
Quantity of Registers 0x0001 2 High half-word first
CRC check 0xD75A 2 High half-word first
Response: 0x11 0x03 0x02 0x00 0xF2 0xF8 0x02
Slave send Content Byte count comment
Slave ID 0x11 1
Function code 0x03 1 Read Registers
Byte count 0x02 1 Return byte count of registers
Register 1 0x00F2 2 Temperature value
CRC check 0x F802 2
Set ID
We save slave’s address in internal register at address 0x000A.
Request: 0x11 0x06 0x00 0x0A 0x00 0x02 0x2A 0x99
Master send Content Byte count comment
Slave ID 0x11 1
Function code 0x06 1 Write Registers
Starting Address 0x000A 2 High half-word first
New ID 0x0002 2 High half-word first
CRC check 0x2A99 2 High half-word first
Response: 0x02 0x06 0x00 0x0A 0x00 0x02 0x28 0x3A
Slave send Content Byte count comment
Slave ID 0x02 1
Function code 0x06 1 Write Registers
Starting Address 0x000A 2 High half-word first
New ID 0x0002 2 High half-word first
CRC check 0x283A 2 High half-word first
Reset ID
Request: 0x00 0x6E 0x00 0x0A 0x00 0x11 0x09 0x DC
Master send Content Byte count comment
Broadcast address 0x00 1
Function code 0x6E 1 Write Registers
Starting Address 0x000A 2 High half-word first
New ID 0x0011 2 High half-word first
CRC check 0x09DC 2 High half-word first
3.5 MODBUS exceptional response
1. ILLEGAL FUNCTION
![Page 19: Humidity and Temperature Transmitter Specification modbus EN V1.0.pdfThe temperature is below 0 o C if the MSB of temperature value is 1, great than 0 o C if the MSB of temperature](https://reader034.fdocuments.us/reader034/viewer/2022051910/60001e4e3ade6a2a5c33c7c5/html5/thumbnails/19.jpg)
USR-HTW User Manual www.usr.so
Jinan USR IOT Technology Limited 19 / 20 [email protected]
Request: 0x 11 0x01 0x00 0x00 0x00 0x02 0xBF 0x5B
Response: 0x11 0x81 0x01 0x54 0xA0
Slave return exception code 0x01 because our product do not function code 0x01.
2. ILLEGAL DATA ADDRESS
Request: 0x 11 0x04 0x00 0x01 0x00 0x02 0x22 0x9B
Response: 0x11 0x84 0x02 0xC3 0x04
Slave return exception code 0x02 because master want to read two registers from starting address.
Because register address 0x0002 is reserved, there is no value.
3. ILLEGAL DATA VALUE
Request: 0x 11 0x06 0x00 0x00 0x00 0x00 0x8B 0x5A
Response: 0x11 0x86 0x03 0x03 0xA4
Slave return exception code 0x03 because master can’t set slave’s ID as 0 which is used as broadcast
address.
4. ASCII code command
USR-HTW also support self-defined command.
READ
Read temperature and humidity once.
Instruction format: READ(ASCII code)
Return data format: 29.8,56.5%(ASCII code)
AUTO
Return current temperature and humidity every 2 seconds.
Instruction format: AUTO(ASCII code)
Return data format: 29.8,56.5%(ASCII code)
STOP
Stop returning current temperature and humidity.
Instruction format: STOP
Contact Information
-----------------------------------------------------------------------------------
Company: Jinan USR IOT Technology Limited
Address: 1-728, Huizhan Guoji Cheng, Gaoxin Qu, Jinan, Shandong, China
Tel: 86-531-55507297 86-531-88826739-803
![Page 20: Humidity and Temperature Transmitter Specification modbus EN V1.0.pdfThe temperature is below 0 o C if the MSB of temperature value is 1, great than 0 o C if the MSB of temperature](https://reader034.fdocuments.us/reader034/viewer/2022051910/60001e4e3ade6a2a5c33c7c5/html5/thumbnails/20.jpg)
USR-HTW User Manual www.usr.so
Jinan USR IOT Technology Limited 20 / 20 [email protected]
Web: http://en.usr.cn
Email: [email protected], [email protected]
-----------------------------------------------------------------------------------
Disclaimer
This document provides information about USR-HTW, this document does not grant any license to
intellectual property rights. Except the responsibility declared in the product sale clause, USR does
not assume any other responsibilities. In addition, USR does not make any warranties for the sale
and use of this product, including the suitability of the product for a particular purpose,
merchantability or fitness for any patent, copyright or other intellectual property infringement, etc.
USR may make changes to specifications and product descriptions without notice.
Update History
V 1.0 11-28-2014. First Version
<END>