Description of TPV Meter Communication Protocol

You might also like

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

Description of digital communication format for TPF meter

The TPF meter has the function of digital communication. The communication adopts
the electrical port of RS-485, and uses the modbus protocol to exchange data with the
outside.

1. Electrical port

The communication port adopts the electrical protocol of RS-485. The parameters are
configured in a more commonly used and stable format, and cannot be modified. See
the table below for details:
baud rate Check Digit data bit stop bit
9600 no test 8 bits 1 bit

2. Protocol

The communication uses the modbus-rtu protocol, and the machine is used as a
slave to send and receive data, and the slave address is 02. It can read real-time
temperature, pressure and flow rate data. It can set and read the correction coefficient
of temperature, pressure, flow rate and flow rate range. See the table below for basic
information:
slave address Use function code Inspection type
0x02 0x03/0x10 crc16

3. Register description

The length of all registers is 0x01, occupying two bytes. See the table below for
register addresses and descriptions:
Register Register model Defaults Illustrate Remark
address length
0x0001 0x0001 R 0 Real-time Integer, the
temperature value of this
value*100 register divided
by 100 is the
real value.
0x0002 0x0001 R 0 Real-time pressure signed integer,
value the value of this
register is
divided.
0x0003 0x0001 R 0 Real-time flow rate Integer, the
value*100 value of this
register divided
by 100 is the
real value.
0x0010 0x0001 RS 1 Temperature Integer, the
correction K value * value of this
100 register divided
by 100 is the
real value.
0x0011 0x0001 RS 0 Temperature Integer, the
correction b value of this
value*100 register divided
by 100 is the
real value.
0x0020 0x0001 RS 1 Pressure correction Integer, the
K value*100 value of this
register divided
by 100 is the
real value.
0x0021 0x0001 RS 0 Pressure correction Integer, the
b value*100 value of this
register divided
by 100 is the
real value.
0x0030 0x0001 RS 1 Flow rate correction
K value*100
0x0031 0x0001 RS 0 Flow rate correction Integer, the
b value*100 value of this
register divided
by 100 is the
real value.
0x0035 0x0001 RS 30 Flow rate There are only
measurement range two choices of
40 and 30, and
it is invalid
when writing
other values

4. Communication example

The slave address is 0x02, use the command code 0x03 to read, and use the
command code 0x10 to set. For example, if you want to read the real-time
temperature value, the communication data is as follows:
The host sends a request frame:
slave address Read function Temperature register length check code
code register
address
02 03 00 01 00 01 0b c6

Slave returns frame:


slave address Confirm Data length data check code
function code
02 03 02 07 bc b7 9f
The master reads the value of register 0x0001. The data returned by the slave is
0x07bc, which is 1980. Then the real-time temperature value can be obtained as
19.8°C.

Set the flow rate correction coefficient K, B value communication data as follows:
The host sends a request frame:
slave Set start register Bytes data check code
address function register length
code address
02 10 00 30 00 02 04 00 64 00 00 d7 6f

Slave returns frame:


slave address Confirm Confirm data check code
function code register
address
02 10 00 30 00 01 00 7b

The host writes two consecutive registers with the starting address 0x0030, and writes
0x0064 and 0x0000 into the two registers with addresses 0x0030 and 0x0031
respectively. It can be seen that the flow rate calibration coefficient K is assigned a
value of 1.00, and the When the B value is assigned to 0, if the data returned by the
slave is 0x0001, it means that the rewriting is successful, otherwise it means that the
rewriting has failed.

You might also like