Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

HPT200-CD RS485_HT_005 Protocol

1. Protocol introduction

Holykell dual-output sensor uses the standard Modbus-RTU protocol, the physical layer interface is
RS485, it adopts master/slave mode and the serial communication. The complete message frame is as follows:

Start bit Device Function Data CRC End character


address code check
Pause of more than 8 bits 8 bits n× 8 16 bits Pause of more than
3.5 characters bits 3.5 characters

2. Sensor default communication configuration

If the customer does not have any requirements for product communication, all the sensors shipped by
our company use the default configuration in the following table.

Communication Protocol Modbus-RTU

Communication Interface RS485

Device address 0x01

Baud rate: 9600

Data bits: 8

Serial port configuration Parity: None

Stop bit: 1 bit

3. Register description

Register name Register address User Storage data type Description


(Hex) operation
Device address 0x0000 03/06 Unsigned double byte
integer
Baud rate 0x0001 03/06 Unsigned double-byte 0x0000=1200
integer
0x0001=2400
0x0002=4800
0x0003=9600
0x0004=19200
0x0005=38400
0x0006=57600

1
0x0007=115200
Parity 0x0002 03/06 Unsigned double-byte 0x0000=None
integer 0x0001=Odd
0x0002=Even
Unit 0x0003 03 Unsigned double-byte 0x0000=MPa
integer 0x0001=kPa
0x0002=Pa
0x0003=bar
0x0004=mbar
0x0005=kg/cm2
0x0006=psi
0x0007=mH2O
0x0008=mmH2O
0x0009=℃
Decimal point 0x0004 03 Unsigned double-byte 0x0000=*1
offset integer
0x0001=*0.1
0x0002=*0.01
Real-time 0x0005 03 Double-byte integer
measurement
value
Main screen 0x0006 03/06 Unsigned double-byte 0x0000=Current mode
display mode integer
0x0001=Voltage mode
0x0002=Percentage mode
Secondary 0x0007 03/06 Unsigned double-byte 0x0000=Do not show
display mode integer
0x0001=Show temperature
Current display 0x0014~0x0015 03 Single precision floating
point
Pressure 0x0016~0x0017 03 Single precision floating
display point
Zero offset 0x0018~0x0019 03/06 Single precision floating
point
Temperature 0x00B5~0x00B6 03 Single precision floating
display point
Save 0xFFFF 06 Unsigned double-byte 0x0000=Save
integer

4. Common Technical Problems


Question 1: How to obtain sensor output load
Send a request message to obtain the pressure unit, decimal point offset and real-time pressure value, as
follows:
Field Slave Function Starting Starting Quantity of Quantity of Error Error
Name Address Address Hi Address Lo Registers Hi Registers Lo Check Lo Check Hi

RTU (hex) 01 03 00 03 00 03 F5 CB

For example, the response message is as follows

2
Field Slave Function Byte Data1 Hi Data1 Lo Data2 Data2 Data3 Data3 Error Error
Name Address Count Hi Lo Hi Lo Check Lo Check Hi

RTU 01 03 06 00 01 00 02 00 64 BC 9E
(hex)

Dota1 (unit)=0x0001=kPa
Data2 (decimal point offset)=0x0002=0.01
Data3 (real-time measurement value)=0x0064=100
The sensor output is (100*0.01)kPa=1kPa

Question 2: How to modify the address/baud rate


For example, change the default address 1 of the product to address 2,
Send a modified address message as follows.

Send the saved message in the modified address state as follows (the slave address of the saved message
must be the modified device address).

Field Slave Function Register Register Write Data Write Data Error Error
Name Address Address Hi Address Lo Hi Lo Check Lo Check Hi
RTU (hex) 02 06 FF FF 00 00 89 DD

Question 3: How to try the zero offset function

For example: the measurement range of a product is (0~10)m, two decimal places are reserved, and the
output is -0.15 in no-load state. This parameter needs to be corrected to 0.00.

The hexadecimal value of 0.15 (IEEE745 single-precision floating-point number conversion) is required
filling in Write Data column, i.e 0x3E199999(as below), send the message through the data line.

Field Slave Function Register Register Write Data Write Data Error Error
Name Address Address Hi Address Lo Hi Lo Check Lo Check Hi
RTU (hex) 01 06 00 18 3E 19 D8 67

Field Slave Function Register Register Write Data Write Data Error Error
Name Address Address Hi Address Lo Hi Lo Check Lo Check Hi
RTU (hex) 01 06 00 19 99 99 F2 37

3
Send the saved message after modification.
Field Slave Function Register Register Write Data Write Data Error Error
Name Address Address Hi Address Lo Hi Lo Check Lo Check Hi
RTU (hex) 01 06 FF FF 00 00 89 EE

Question 4: Sensor response message is garbled or no response


Please check in order according to the following steps:

1 Check whether the power supply of the product is normal.

2 Check whether the RS485A and RS485B signal wires of the


product are connected reversely
3 Check whether the serial communication line is normal.

4 Check whether the serial communication parameter


configuration is normal
5 Check whether the CRC of the sending request message is
correct
6 Check whether the sensor device address conflicts in the
networking state

If the problem persists, please contact the sales technician in time to solve it.

5. Notices
5.1 When the baud rate/address is modified, the sensor will reply the modified data with the baud rate
sent by the host. After the reply, the baud rate/address of the sensor will become the modified target
value.
5.2 In order to ensure the normal performance of the sensor, users generally are not allowed to modify
the calibration data of the sensor. If you need to re-calibrate the range, please contact the sales technician.
5.3 Read the real-time output as a double-byte integer, when the read value is 0xFFFF, it means "-1"
instead of "65535".
5.4 After modifying the address and other parameters, the save demand must be sent before the product
can be saved after power-off.
5.5 When sending a message, when the slave address and content data change, the CRC will also change.
Please use a professional CRC calculation tool to calculate the CRC.

You might also like