Ultrasonic Open Channel Flowmeter: The Manual
Ultrasonic Open Channel Flowmeter: The Manual
The manual
(1) The instrument supports two standard serial communication protocols and a customized
serial communication command.
①Address: At the beginning of each frame, indicate the device address 1-255 of the terminal
② Function: It indicates the function to be performed by the current command. The common
function codes are as follows
③ Data: the host reads the variable address and length from the machine or returns the variable
data and other information from the machine.
④ Check: Cyclic redundancy (CRC16) check code.
7.2.2 Examples
⑴ The host reads the data command of the liquid level display value from the machine in the
format of example 01 04 00 00 00 02 71 CB
A serial port address Function code Register address Read data length CRC Check code
01 04 00 00 00 02 71CB
The read data is two words in length, and each word returns two bytes.
⑵ Return the command from the machine in the format
Example 01 04 04 40 A0 00 00 EE 66
A serial port address Function code Register address Read data length CRC Check code
01 04 04 40 A0 00 00 EE 66
⑶ The master machine writes the data command format to the slave machine
Example 01 10 00 00 00 02 04 40 A0 00 00 E6 4D
(4) The host requires the slave machine to save data to EEPROM
01 12 00 A0 00 02 04 00 00 00 A1 99 A5
This is a special command that returns 01 13 00 00 00 00 09 63
⑴ Meter data storage format: IEEE754 standard single precision floating point number
IEEE754 standard single-precision floating point number consists of 1 sign bit, 8 step code,
and 23 mantras, and is represented by a four-digit hexadecimal number. For example, 124.75 is
42 F9 80 00 in hexadecimal format. The calculation method is: 24.75 converted to binary:
1111100.11
A serial port Function code Register Register length Write data Written CRC Check code
address address length data
01 10 00 00 00 02 04 40 A0 00 00 E6 4D
The rank code 6+127 = 133 is 0 for positive and 1 for negative.
Therefore, the binary number of 124.75 is 0 10000101 11110011000000000000000B =
42F98000H
Note: In the Commons, floating point numbers and four-byte character groups share a
piece of storage.
Best solution: Take the ultrasonic level gauge level value as an example, read back the data
bit 42 F9 80 00, convert the floating point number to 124.75. The internal register storage form is
as follows:
03 02 01 00
42 F9 80 00
Folat Tempfloat;