0% found this document useful (0 votes)
184 views23 pages

V51 Protocols English 4

This document discusses the serial communication ports and supported protocols of device V51. It includes two parts: Part I discusses the default settings of the RS485 and IR serial ports, how to change settings using PC software, and supported protocols including HART, MODBUS, M-BUS, and others. Part II discusses the HART protocol application in more detail, including referenced documents, device type codes, communication setups, and implemented HART commands.

Uploaded by

Mateus Mendes
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
184 views23 pages

V51 Protocols English 4

This document discusses the serial communication ports and supported protocols of device V51. It includes two parts: Part I discusses the default settings of the RS485 and IR serial ports, how to change settings using PC software, and supported protocols including HART, MODBUS, M-BUS, and others. Part II discusses the HART protocol application in more detail, including referenced documents, device type codes, communication setups, and implemented HART commands.

Uploaded by

Mateus Mendes
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 23

PART I

Introduction to the serial communication port of V51


1. Introduction
V51 is equipped with two serial communication port, one is RS485, and one is IR
2. Default settings of serial communication port
RS485,logic level USART 9600,N,8,1
IR 2400,N,8,1
3. How to Change the serial ports settings
The changes of the serial port settings can only be realized by using the V51_SETUP, which is a PC
based software.
The serial port settings are displayed on M0E display window
4. Supported communication protocols
a. HART
b. MODBUS
c. M-BUS
d. Haifeng ASCII
e. CJ188
f. Protocols used by Huizhong.
PART II
The HART protocol Application

1. Referenced Documents
SCF_SPEC-054 FSK Physical Layer Specification Version 8.1
SCF_SPEC-081 Data Link Layer Specification Version 8.0
SCF_SPEC-127 Universal Command Specification Version 6.0
SCF_SPEC-051 Common Practice Command Specification Version 8.0
SCF_SPEC-081 Common Tables Specification Version 13.0
SCF_SPEC-307 Command Response Code Specification Version 5.0
SCF_SPEC-099 Command Summary Specification Version 8.0

2. Expanded Device Type code


Manufacturer ID =252 (0xFC, unknown
Manufacturers Device Type Code =245 (0xF5)
3. Communication Setups
FSK on Current Loop Baud Rate 1200, Even, 8,1
RS485 Baud Rate 300~9600, Even, 8,1
IR Communicator Baud Rate 300~9600, Even, 8,1
Address by Manufacturer 1
Initial Hart Tag TSF-V49C
Burst Mode do not support
4. General Transmitter Information
4.1 Variables Map

Code Variable Unit


0 flow rate m3/h
1 flow positive total M3, Liter, Gallon, Cubit feet
2 heat(energy) rate kW
3 heat positive total kWh, BTU,MJ
4 Temperature T1 Degree Celsius
5 Temperature T2 Degree Celsius
6 Temperature difference Degree Celsius
7 Flow velocity m/s
8 T1 sensor resistance Ohm
9 T2 sensor resistance Ohm
10 CPU temperature Degree Celsius
11 Frequency percentage %
12 Battery voltage Volt
13 Total travel time Seconds
14 Delta travel time Seconds
15 Negative total flow M3, Liter, Gallon, Cubit feet
16 Total Flow today M3, Liter, Gallon, Cubit feet
17 Total Flow this month M3, Liter, Gallon, Cubit feet
18 Total Flow this year M3, Liter, Gallon, Cubit feet
19 Calibration total M3, Liter, Gallon, Cubit feet
20 Negative total heat kWh, BTU,MJ
21 Total heat today kWh, BTU,MJ
22 Total heat this month kWh, BTU,MJ
23 Total heat Tariff 2 kWh, BTU,MJ Not realized yet
24 Total heat Tariff 3 kWh, BTU,MJ Not realized yet
25 Pipe outer diameter mm
26 Total working Hours hour
27 Total Failure hours hour
28 Calibration Duration seconds

4.2 Current Loop Mapping


The Loop Powered Current Loop is always mapped to flow rate
4.3 Non-Volatile Data Storage
4.3.1 All total related variables is automatically stored into an EPROM every 2 minutes.
4.3.2 Information like HART Tag etc is stored in EPROM (address 0x700-0x7FF)
4.3.3 the HART polling address will be stored in EPROM after 2 minutes or be stored
immediately after a command 42 is issued.
4.3.4 The written number of preambles will be stored in EPROM after 2 minutes or be stored
immediately after a command 42 is issued.
4.4 Multi-drop Mode
This revision of V49 does not support Multi-drop Mode.
4.5 Burst Mode
This revision of V49 does not support Burst Mode

5 Implemented Commands
5.1 Universal Command
0 Read Unique Identifier
1 Read Primary Variable (i.e. flow rate)
2 Read
3 Read Dynamic Variables and Loop current
6 Write polling address
7 Read loop configuration
8 Read Dynamic Variables Classifications
9 Read device Variables and status
11 Read unique identifier associated with Tag
12 Read message
13 Read Tag, descriptor and Date
14 Read Primary Variable transducer information
15 Read Device Information
16 Read Final assembly number
17 Write message
18 Write Tag, descriptor and Date
19 Write Final assembly number
20 Read Long Tag
21 Read unique identifier associated with Long Tag
22 Write Long Tag
5.2 Common Practice Command
33 Read Device Variables
42 Perform device reset
40 Enter/exit fixed current mode
43 Set Primary variable zero (to perform a Zero Setting
45 Trim Current Loop Zero (to adjustment current loop to 4mA)
46 Trim Current Loop Gain (to adjustment current loop to 20mA)
59 Write number of the response preamble

PART III
The MODBUS protocol Application
1. MODBUS default setup by the manufacturer
1.1 RS485
Baud Rate 9600 possible setting 300,600,1200,2400,4800,9600
Parity None possible setting None, Even, Odd
Address 1
1.2 IR
Baud Rate 9600 possible setting 300,600,1200,2400,4800,9600
Parity None possible setting None, Even, Odd
Address 1
All settings can be displayed on M0E, and M10
2. MOSBUS Misc about V51
2.1
2.2
2.3
2.4
3. MODBUS Table of Common Holding Register Addresses

REGISTER NUMBER VARIABLE NAME FORMAT NOTE


0001-0002 2 Flow Rate IEEE754 Unit: m3/h
0003-0004 2 Energy Flow Rate IEEE754 Unit: kW
0005-0006 2 Velocity of the flow IEEE754 Unit: m/s

0009-0010 2 Positive Flow accumulator Note 1 LONG Unit:m3,L,GAL,ft3


0011-0012 2 Positive flow decimal fraction IEEE754
0013-0014 2 Negative flow accumulator LONG Unit:m3,L,GAL,ft3
0015-0016 2 Negative flow decimal fraction IEEE754 Singular real number,
also called FLOAT
0017-0018 2 Positive energy accumulator LONG Unit: kWh, GJ, KBTU
0019-0020 2 Positive energy decimal fraction IEEE754
0021-0022 2 Negative energy accumulator LONG Unit: kWh, GJ, KBTU
0023-0024 2 Negative energy decimal fraction IEEE754
0025-0026 2 Net flow accumulator LONG Unit:m3,L,GAL,ft3
0027-0028 2 Net flow decimal fraction IEEE754
0029-0030 2 Net energy accumulator LONG Unit: kWh, GJ, KBTU
0031-0032 2 Net energy decimal fraction IEEE754
0033-0034 2 Temperature T1 (Supply) IEEE754 Unit:
0035-0036 2 Temperature T2 (Return) IEEE754 Unit:

0053-0055 3 Calendar (date and time) BCD Writable.


6 Bytes of BCD stands
SMHDMYlower byte first
0056 1 Day+Hour for Auto-Save BCD Writable.
For example 0512H stands
Auto-save on 12:00 on 5th.
0012H for 12:00 on everyday.
0057 1 Password for writing Integer Writable
0058 1 Password to enter Sleep mode Integer Writable., Write
0x5A58, to enter sleep
mode
0059 1 Key Input Integer Writable
0060 1 Go to Window # Integer Writable.
0061 1 Current display window Integer Writable
0062 1 Primary communication Address. Integer Writable. Max 255
0063 1 BC timer Integer Write 0 to start BC
0064 1 OCT1 pulse Integer
0065 1 OCT2 pulse Integer

0071 1 Supplementary ErrCode Bits Note 4


0072 1 ErrCode Bits Note 5
0077-0078 2 Resistance of the T1 sensor IEEE754
0079-0080 2 Resistance of the T2 sensor IEEE754
0081-0082 2 Total travel time IEEE754 Unit: uS
0083-0084 2 Delta travel time IEEE754 Unit: nS

0092 1 Signal Quality Integer Channel 1 in Low byte


0093 1 Signal Strength of Channel #1 Integer Range:0~4095
0094 1 Signal Strength of Channel #2 Integer
0095 1 Battery voltage r Integer V=REG95*(2.5/4096)
0099-0100 2 Reynolds Number IEEE754
0101-0102 2 Correction for Reynolds number IEEE754

0105-0106 Total working hours Long Unit: Seconds


0107-0108 Power on times counter Long
0109-0110 CPU temperature IEEE754 Unit:

0113-0114 2 NET Total flow (IEEE754) IEEE754 Unit: m3/h


0115-0116 2 POS Total flow (IEEE754) IEEE754 Signal Accuracy.
0117-0118 2 NEG Total flow (IEEE754) IEEE754
0119-0120 2 NET Total energy (IEEE754) IEEE754 Not Recommended
0121-0122 2 POS Total energy (IEEE754) IEEE754 to read these Registers
0123-0124 2 NEG Total energy (IEEE754) IEEE754 with new
0125-0126 2 NET Total flow today (IEEE754) IEEE754 developments due to
0127-0128 2 NET month total flow (IEEE754) IEEE754 limited accuracy
0129-0130 2 Tariff 2 accumulator LONG
0131-0132 2 Tariff 2 accumulator decimal fraction IEEE754
0133-0134 2 Tariff 3 accumulator LONG
0135-0136 2 Tariff 3 accumulator decimal fraction IEEE754
0137-0138 2 Todays Flow accumulator LONG 9 Digits
0139-0140 2 Todays flow decimal fraction IEEE754
0141-0142 2 This months Flow accumulator LONG
0143-0144 2 This months flow decimal fraction IEEE754
0144-0145 2 This years Flow accumulator LONG
0147-0148 2 This years flow decimal fraction IEEE754
0149-0150 2 Todays Energy accumulator LONG
0151-0152 2 Todays Energy decimal fraction IEEE754
0153-0154 2 This months Energy accumulator LONG
0155-0156 2 This months Energy decimal fraction IEEE754

0162 1 Daily data pointer Integer


0163 1 Month data pointer Integer
0165-0166 Failure Timer Long Unit: Seconds

0181-0182 2 Temperature difference IEEE754 Unit:


0185-0186 Main Clock Difference IEEE754
0187-0188 Auto-Save: total time Long
0189-0190 Auto-Save: POS total flow Long
0191-0192 Auto-Save: Flow Rate IEEE754
0193-0194 Auto-Save: total NEG timer Long
0195-0196 Auto-Save: NEG total flow Long
0197-0198 2 Calibrating flow totalizer Long Unit:m3,GAL,ft3L
0199-0200 2 Calibrating flow decimal fraction IEEE754
0201-0202 2 Calibrating energy totalizer long Unit: kWh, GJ, KBTU
0203-0204 2 Calibrating energy decimal fraction IEEE754
0205 1 Calibrating Timer integer Unit in 250mS

0221-0222 2 DN of the pipe IEEE754 Unit:mm

0259-0260 2 Max flow rate of the month IEEE754 Unit: m3/h


0261-0262 2 Max heat rate of the month IEEE754 Unit: kW
0263-0264 2 Max inlet temperature of the month IEEE754
0265-0266 2 Max Outlet temperature of the month IEEE754
0267-0268 2
0269 1
0270 1
0271-0272 2 Delta Tau IEEE754 In unit nS
0273-0274 2 M-bus secondary address BCD
0275-0276 2 Negative flow timer long In unit seconds
0277-0280 4
0281-0282 2
0283-0284 2
0285-0286 2 Max flow rate of the day IEEE754 Unit: m3/h
0287-0288 2 Max energy rate of the day IEEE754 Unit: kW
0289-0290 2 Max inlet temperature of the day IEEE754 Unit:
0291-0292 2 Max outlet temperature of the day IEEE754 Unit:
0293-0294 2
0295-0296 2 CUSTOMERS NUMBER BCD
0297-0298 2 Time set point to stop tariff total BCD
0299-0300 2 Time set point to start tariff2 total BCD
0301-0302 2 Time set point to start tariff3 total BCD
0303 0.5 State byte for tariff total and batch BCD Low byte
0303-0304 1.5 #1 time set point to trig batch BCD
0305-0306 1,5 #2 time set point to trig batch BCD
0306-0307 1,5 #3 time set point to trig batch BCD
0307-0308 1,5 #5 time set point to trig batch BCD
0309-0310 1,5 #5 time set point to trig batch BCD
0311-0312 2 Set point for batch controller IEEE754

0359 1 Simulation Mode Control Word Integer Valid with V51.05+


0361-0362 2 Always read as 361.00 Note 2 IEEE754
0363-0364 2 Always read as 363348858 long For test purpose
0365-0366 2 Always read as -987654321 long

1438 1 Total flow unit number INTEGER 0=cubit meter 1=liter


2=GAL 5=cubic feet
1439 1 Total flow multiplier Integer n:(-4..3), Note1
1440 1 Total Energy multiplier Integer n:(-3..4), Note1
1441 1 Total energy unit number Integer 0=GJ , 2=kWH
1=Kilo BTU
1491 1 Meter Type Integer EN1434-3
1527 1 Version of Software Note3 Integer
1528 1 Manufacturer Note3 Integer Value=0x1188
1529 2 ESN BCD MSB first
Note 1 1 The internal accumulator is been presented by a LONG number for the integer part
together with a REAL number for the decimal fraction. In general uses, only the integer part needs to be
read. Reading the fraction can be omitted. The final accumulator result has a relation with unit and
multiplier. Assume N stands for the integer part (for the positive accumulator, the integer part is the content
of REG 0009, 0010, a 32-bits signed LONG integer,), Nf stands for the decimal fraction part (for the
positive accumulator, the fraction part is the content of REG 0011, 0012, a 32-bits REAL float number,), n
stands for the flow decimal point (REG 1439).
then
The final positive flow rate=(N+Nf ) 10n-3 (in unit decided by REG 1439)
The meaning of REG 1438 which has a range of 0~3 is as following:
0 cubic meter (m3)
1 liter (L)
2 American gallon (GAL)
3 Cubic feet (CF)
For example, if REG0009=123456789, REG0010=0.123, and REG1439=-1, REG1438=0
Then the positive flow is 12345.6789123 m3

For energy totlizers


The energy flow rate =(N+Nf )10n-4
n was decided by REG01440
The energy unit decided by REG 1441).

Note 2 Correctly reading REG361 as a float number shall always be 361.00. If a 0 or 250.264 is
read by REG 361, then it means the used address is wrong.
Note3 The REGs for version and manufacturer is used to identify this MODBUS register table.
4. MODBUS Table of Monthly Totalizers Addresses
Data address Reg no Variable name format note
Blk
No
n/a 0163 1 Monthly Pointer Integer Range: 0-127
0 29953 1 Data block no Integer 0~65535
1 29954 1 State Integer
0 2 29955 1 Failure days Integer
3 29956 1 Month, Year BCD Month in low byte
4 29957 2 Working hours LONG Record for checking
6 29959 2 Failure hours LONG
8 29961 2 Month Total flow LONG Of this month
10 29963 2 Month Total energy LONG Of this month
12 29965 2 Positive flow LONG Recorded
14 29967 2 Negative flow LONG Recorded
16 29969 2 Positive energy LONG Recorded
18 29971 2 Negative energy LONG Recorded
20 29973 2 Tariff2 LONG Recorded
22 29975 2 Tariff3 LONG Recorded
24 29977 2 Max flow rate REAL4
26 29979 2 Max energy rate REAL4
28 29981 2 Max inlet temperature REAL4
30 29983 2 Max outlet temperature REAL4
2 0 29985 1 Data block no Integer
1 29986 1 State Integer
2 29987 1 Failure days Integer
3 29988 1 Month, Year BCD
4 29989 2 Working hours LONG
6 29991 2 Failure hours LONG
8 29993 2 Month Total flow LONG
10 29995 2 Month Total energy LONG

28 30013 2 Max inlet temperature REAL4
30 30015 2 Max outlet temperature REAL4
n Monthly data block n
127 0 38113 1 Data block no Integer
1 38114 1 State Integer

28 38141 2 Max inlet temperature REAL4
30 38143 2 Max outlet temperature REAL4
5. MODBUS Table of Daily Totlizers Addresses

Data address Reg Variable name format note


Blk no
No
n/a 0162 1 Daily pointer Integer Range 0-511
1 0 5377 1 Data block no Integer 0~65535
1 5378 1 State of the day Integer
2 5379 1 day Integer In high byte
3 5380 1 Month, year BCD Month in Lower byte
4 5381 2 Working hours LONG
6 5383 2 Failure hours LONG
8 5385 2 Daily Total flow LONG Of the day
10 5387 2 Daily Total energy LONG Of the day
12 5389 2 Positive flow LONG Recorded at the last sec.
14 5391 2 Negative flow LONG Recorded at the last sec
16 5393 2 Positive energy LONG Recorded at the last sec
18 5395 2 Negative energy LONG Recorded at the last sec
20 5397 2 Tariff2 LONG Recorded at the last sec
22 5399 2 Tariff3 LONG Recorded at the last sec
24 5401 2 Max flow rate REAL4
26 5403 2 Max energy rate REAL4
28 5405 2 Max inlet temperature REAL4
30 5407 2 Max outlet temperature REAL4
2 0 5409 1 Data block no Integer 0~65535
1 5410 1 State of the day Integer
2 5411 1 day Integer
.
24 5433 2 Max flow rate REAL4
26 5435 2 Max energy rate REAL4
28 5437 2 Max inlet temperature REAL4
30 5439 2 Max outlet temperature REAL4
n Data block n

511 0 21729 1 Data block no Integer 0~32767


1 21730 1 State of the day Integer
.
28 21757 2 Max inlet temperature REAL4
30 21759 2 Max outlet temperature REAL4
6. MODBUS Table of Power on time

Data address Reg Variable name format note


Blk no
No
n/a 0162 1 Daily pointer Integer Range 0-255
1 0 28929 1 Data block no Integer 0~65535
1 28930 1 Minute, Second BCD Second in low byte
2 28931 1 Day, Hour BCD Hour in low byte
3 28932 1 Year, Month BCD Month in low byte
2 0 28933 1 Data block no BCD
1 28934 1 Minute, Second BCD
2 28935 1 Day, Hour BCD
3 28936 1 Year, Month BCD
n Data block n

255 0 29949 1 Data block no BCD


1 29950 1 Minute, Second BCD
28 29951 1 Day, Hour BCD
30 29952 1 Year, Month BCD
PART IV The M-BUS protocol Application
1. Interfaces
ARS-485
BIR
Clogic level USART

2. Default Setting

Telegram format: IEC 870-5-1, DIN EN1434-3


Baud Rate IR 2400
RS-485, USART: 9600
Parity Even
Data Bits 8 bits
3. Referenced documents
The M-BUSA Documentation which can be downloaded from www.m-bus.com
TKB3417 Description of the MBUS module for Ultraheat
4. Special features
* Date and time can be set
* Baud Rate can be set
* Primary address can be set
* Secondary Addressing
* Enhanced Selection
* Configurable Data Telegrams to individual requirement
Table 1 Master=>Slave telegrams

C A CS C = A CS CI

SEND_NKE 10h 40h A CS 16h ,, E5h


(SEND_UD2) 10h 5Bh/7Bh A CS 16h RSP_UD
10h 40h FDh CS 16h FDh E5h
(SEND_UD1) 10h 5Ah/7Ah A CS 16h E5h
10h 4Ah/6Ah A CS 16h E5h
10h 49h FDh CS 16h

L L C A CI CS
68h 0Bh 0Bh 68h 53h/73h FDh 52h ID1-4 M1-2 G Med CS 16h ID1-4 4 ID, M1-2=88h,11h G=1 Med=4 * E5h
68h 0Bh 0Bh 68h 53h/73h FDh 56h ID4-1 M2-1 G Med CS 16h Med=0Ch * E5h
68h 11h 11h 68h 53h/73h FDh 52h ID1-4 M1-2 G Med 0CH 78H SN1-4 CS 16h 0Ch 78h +4 * E5h
68h 06h 06h 68h 53h/73h A 51h 01h 7Ah NN CS 16h NN 1-250 E5h
68h 09h 06h 68h 53h/73h A 51h 0Ch 79h SA1-4 CS 16h SA1-4 4 E5h
68h 0Dh 0Dh 68h 53h/73h A 51h 07h 79h SA1-4 xxh,xxh,xxh,xxh CS 16h SA1-4 4 E5h
ESN 68h 09h 06h 68h 53h/73h A 51h 0Ch 79h 00h 00h 00h 00h CS 16h M-BUS ESN E5h
ESN 68h 0Dh 0Dh 68h 53h/73h A 51h 07h 79h 00h 00h 00h 00h xxh,xxh,xxh,xxh CS 16h E5h

L L C A CI CS
68h 03h 03h 68h 53h/73h A B8h CS 16h 300 E5h
68h 03h 03h 68h 53h/73h A B9h CS 16h 600 E5h
68h 03h 03h 68h 53h/73h A BAh CS 16h 1200 E5h
68h 03h 03h 68h 53h/73h A BBh CS 16h 2400 E5h
68h 03h 03h 68h 53h/73h A BCh CS 16h 4800 E5h
68h 03h 03h 68h 53h/73h A BDh CS 16h 9600 E5h
68h 03h 03h 68h 53h/73h A B7h CS 16h E5h
L L C A CI CS
68h 03h 03h 68h 53h/73h A 50h CS 16h 2 All E5h
68h 04h 04h 68h 53h/73h A 50h 00 CS 16h 2 All E5h
68h 04h 04h 68h 53h/73h A 50h 51h CS 16h QUICK READOUT E5h
68h 04h 04h 68h 53h/73h A 50h 10h CS 16h W V User Data E5h
68h 04h 04h 68h 53h/73h A 50h 20h CS 16h W,V W,V BT FTSimple Billing E5h
68h 04h 04h 68h 53h/73h A 50h 30h CS 16h W,V W,V /BTFTEnhanced Billing E5h
68h 04h 04h 68h 53h/73h A 50h 50h CS 16h WV / Instantaneous Values E5h
68h 04h 04h 68h 53h/73h A 50h 80h CS 16h E5h
68h 05h 05h 68h 53h/73h A 51h 0Fh A1h CS 16h 3 E5h
68h 05h 05h 68h 53h/73h A 51h 0Fh A0h CS 16h E5h
68h 03h 03h 68h 53h/73h A A1h CS 16h E5h
68h 03h 03h 68h 53h/73h A A0h CS 16h E5h
1 68h 04h 04h 68h 53h/73h A 51h 7Fh CS 16h 2 E5h
2 68h 06h 06h 68h 53h/73h A 51h C8h 3Fh 7Eh CS 16h 2 E5h
68h 06h 06h 68h 53h/73h A 51h 7Fh FEh 0Dh CS 16h E5h
68h 06h 06h 68h 53h/73h A 51h 08h 05h CS 16h E5h
68h 06h 06h 68h 53h/73h A 51h 48h 05h CS 16h E5h
68h L L 68h 53h/73h A 51h CS 16h L<240 E5h
68 L L 68 53/73 A 51 08 14 08 2D CS 16

08h 74h C8h 3Fh 74h 48h 00h0Fh


08h 70h C8h 3Fh 70h 48h 10h17h
08h 00h0Fh C8h 3Fh 00h0Fh 48h 6Ch
08h 10h17h C8h 3Fh 10h17h 38h 20h23h
08h 28h37h C8h 3Fh 28h37h 78h 20h23h
08h 38h4Fh C8h 3Fh 38h4Fh 88h 10h 70h73h
08h 58h5Bh C8h 3Fh 58h5Bh D8h 10h 28h37h 00h0Fh
08h 5Ch5Fh C8h 3Fh 5Ch5Fh 98h 10h 28h37h
08h 60h63h C8h 3Fh 60h63h 98h 10h 38h4Fh 08h 00h 08h
08h 78h C8h 3Fh 78h 98h 10h 5Bh 0Dh
08h 20h23h C8h 3Fh 20h23h 98h 10h 5Fh
08h 6Ch C8h 3Fh 6Ch
68h 0Ah 0Ah 68h 53h/73h A 51h 2Fh 0Fh 04h 00h,04h,00h,01h CS 16h E5h
68h 0Ah 0Ah 68h 53h/73h A 51h 2Fh 0Fh 04h 00h,04h,00h,00h CS 16h E5h
68h 0Ah 0Ah 68h 53h/73h A 51h 2Fh 0Fh 04h 00h,04h,00h,02h CS 16h E5h
68h 0Ah 0Ah 68h 53h/73h A 51h 2Fh 0Fh 04h 00h,04h,00h,03h CS 16h E5h
68h 0Ah 0Ah 68h 53h/73h A 51h 2Fh 0Fh 04h 00h,04h,00h,04h CS 16h E5h
OCT 68h 0Ah 0Ah 68h 53h/73h A 51h 04h FFh 15h OCT1,OCT2,XX,XX CS 16h OCT 0 1 2 E5h
68h 07h 07h 68h 53h/73h A 51h 01h FFh 14h 01 CS 16h E5h
TARIFF 68h 07h 07h 68h 53h/73h A 51h 01h FFh 13h 00 CS 16h TARIFF 2 TARIFF 3 E5h
TARIFF 2 68h 07h 07h 68h 53h/73h A 51h 01h FFh 13h 02h CS 16h TARIFF 2
TARIFF 3 68h 07h 07h 68h 53h/73h A 51h 01h FFh 13h 03h CS 16h TARIFF 3
TARIFF 68h 05h 05h 68h 53h/73h A 51h 0Fh B0h CS 16h TARIFF 2 TARIFF 3 E5h
TARIFF 68h 05h 05h 68h 53h/73h A 51h 0Fh B1h CS 16h TARIFF 2 TARIFF 3 E5h
TARIFF 2 68h 05h 05h 68h 53h/73h A 51h 0Fh B2h CS 16h TARIFF 2 E5h
TARIFF 3 68h 05h 05h 68h 53h/73h A 51h 0Fh B3h CS 16h TARIFF 3 E5h
TARIFF 68h 0Ah 0Ah 68h 53h/73h A 51h 04h/44h FD 30 Date + Time CS 16h Date + Time TYPE_F E5h
TARIFF 68h 0Bh 0Bh 68h 53h/73h A 51h 84h/C4h 10 FD 30 Date + Time CS 16h Date + Time TYPE_F E5h
TARIFF2 68h 0Bh 0Bh 68h 53h/73h A 51h 84h/C4h 20 FD 30 Date + Time CS 16h Date + Time TYPE_F E5h
TARIFF3 68h 0Bh 0Bh 68h 53h/73h A 51h 84h/C4h 30 FD 30 Date + Time CS 16h Date + Time TYPE_F E5h

L L C A CI DIF CS
1 68h 0Dh 0Dh 68h 53h/73h A 51h 2Fh 0Fh 04h 58h SSMMHHDDMMYY CS 16h E5h
2 68h 0Ah 0Ah 68h 53h/73h A 51h 04h EDh 00h DATE/TIME CS 16h ** , DATE/TIME TYPE F E5h
3 68h 09h 09h 68h 53h/73h A 51h 04h 6Dh DATE/TIME CS 16h ** , DATE/TIME TYPE F E5h
*
** TYPE F =0TYPE F M-BUS
PART V The HaiFeng ASCII protocol Application
1. The Haifeng Protocol is designed to be compatible with the one used in our previous versions of
ultrasonic flow meters. This protocol is a set of basic commands that are in ASCII format, ending with a
carriage return (CR) and line feed (LF), For most of the commands, The line feed (LF) should be better
omitted for fast responding.
The colored commands in the following table are new ones
Command Meaning Data format
DQD(cr) note 0 Request flow rate per day d.ddddddEdd(cr) note 1
DQH(cr) Request flow rate per hour d.ddddddEdd(cr)
DQM(cr) Request flow rate per minute d.ddddddEdd(cr)
DQS(cr) Request flow rate per second d.ddddddEdd(cr)
DQE(cr) Request instantaneous Caloric Value d.ddddddEdd(cr)
DV(cr) Request fluid velocity d.ddddddEdd(cr)
DI+(cr) Request positive totalizer dddddddddEd(cr)note 2
DI-(cr) Request negative totalizer dddddddddEd(cr)
DIN(cr) Request net totalizer dddddddddEd(cr)
DIE(cr) Request net thermal energy totalizer dddddddddEd(cr)
DIE+(cr) Request positive energy totalizer dddddddddEd(cr)
DIE-(cr) Request negative energy totalizer dddddddddEd(cr)
DIT(cr) Request net total flow for today dddddddddEd(cr)
DIM(cr) Return net total flow for this month dddddddddEd(cr)
DIY(cr) Request net total flow for this year dddddddddEd(cr)
DID(cr) Return the ID number/address ddddd(cr) 5 bytes long
DL(cr) Request signal strength and signal quality UP:dd.d,DN:dd.d,Q=dd(cr)
DS(cr) Request the percentage of AO output d.ddddddEdd(cr)
DC(cr) Request display number and Error Code note 3
DT(cr) Request the present date and time yy-mm-dd,hh:mm:ss uuu(cr)
Time@TDS1=(cr) Set date and time yy-mm-dd,hh:mm:ss
MKEY@(cr) note 4 Send a key value as if a key is pressed. @ is key value which can be
@ is the key value found in the KEY VALUE table
LCD(cr) Request current window content
MENUXX(cr) Go to window XX
BAUDRATExp(cr) Change baud rate to x with parity p x=2~7,9600,4800,2400,1200,600,300
p=N(none), E(even),O(odd)
BAUDRATE-A Restore baud rate for RS485
BAUDRATE-B Restore baud rate for IR
AO<>(O)<>4-20mA<>(O)< Set AO to a mA current Note 5
>digits string(cr)
RING(cr)(lf) Handshaking request from a modem ATA(CR)(lf)
CUSTOMERNUMBER= Set customer number
CUSTOMERNUMBER? Request customer number
FIRMWAREVERSION Request firmware information
ESN(cr) Request the ESN (electronic serial number) 49ddddddd(cr)(lf) note 6
of the flow meter
MBUSADD=str Set address to STR
MBUSADD? Request address number
MBUSADD2=str Set MBUS secondary address to STR
MBUSADD2? Request MBUS secondary address
System Boot Instantly by Reboot the system
13840932903
Isp-Prog &JXWANG12 Command for firmware updating
OCT<OUTPUT>=10 Quit OCT1 serial controlling mode
OCT<OUTPUT>=11 OCT1 output open
OCT<OUTPUT>=12 OCT1 output close
OCT<OUTPUT>=20 Quit OCT2 serial controlling mode
OCT<OUTPUT>=21 OCT2 output opcy en
OCT<OUTPUT>=22 OCT2 output close
SLEEP<(*)>METER<(*)>ENABLE=0 Enable sleep of the meter
SLEPP<(*)>METER<(*)>ENABLE=1 Quit sleep of the meter
AnalogInput0 Always readout 1.23456 for testing d.ddddddEdd(cr)(lf)
AnalogInput1 Return temperature at T1 input d.ddddddEdd(cr)(lf)
AnalogInput2 Return temperature at T2 input d.ddddddEdd(cr)(lf)
AnalogInput6 Request CPU temperature
AnalogInput7 Request battery voltage
AnalogInput8 Request main clock frequency coefficient
BATCH_A Request batch controller total
BATCH_V? Request batch setting
BATCH_V=(str) Set a new batch
BATCH_E0 Disable batch controller
BATCH_E1 Enable batch controller
BATCH_R0 Run Batch controller
BATCH_R1 Stop Batch controller
BATCH_T1? Request trig timer #1
BATCH_T1=DD HH:MM Set trig timer #1
BATCH_T2? Request trig timer #2
BATCH_T2=DD HH:MM Set trig timer #2
BATCH_T3? Request trig timer #3
BATCH_T3=DD HH:MM Set trig timer #3
BATCH_T4? Request trig timer #4
BATCH_T4=DD HH:MM Set trig timer #4
BATCH_T5? Request trig timer #5
BATCH_T5=DD HH:MM Set trig timer #5
TARIFF_T1? Request tariff timer #1
TARIFF_T1=MM-DD HH-MM Set tariff timer #1
TARIFF_T2? Request tariff timer #2
TARIFF_T2=MM-DD HH-MM Set tariff timer #2
TARIFF_T3? Request tariff timer #3
TARIFF_T3=MM-DD HH-MM Set tariff timer #3
DI2 Request Tariff total2
DI3 Request Tariff total3
N Prefix of an IDN-addressing-based Note 7
networking, The IDN address is byte, range
0-253
W Prefix of an IDN-addressing-based Note 7
networking, The IDN address is word,
range 0-65535
P Prefix of any commands for returns with
check-sum
& Commands connector to make a Result commands limit 253 or
compounding command in one line. less byte long.
NOTES:
0crstand for carriage return, its ASCII value is 0DH. (lf) stand for line feed, its ASCII value is 0AH.
1d stand for a digit number of 0~9, 0 is expressed as +0.000000E+00
2d stand for digit 0~9, the number before E is an integer.
3The first two bytes are menu numbers, and the rest is ErrCode whose meaning can found at the display part.
4 @ stand for key value, for example, value 30H means key 0. The command MKEYA(cr) acts just like
the a short key is pressed.
5 a stands for the output current value. The maximum value should not exceed 20.0 For example
AO<>(O)<>4-20mA<>(O)<>2.34567(cr)
6 dddddddd stands for the Electronic Serial Number
7If there are more than one devices in a network, all the basic command must be prefixed with N or
W, otherwise multiple flow meter may reply to the same request, and thus a conflict may occurs.

2. Working with Command prefixes and the command connector


2.1 The P prefix
The P prefix can be added before every basic command to have the returned message with a two digits
check-sum. The check-sum is obtained by a binary addition. For example, if the command DI+(CR)
(44H,49H,2BH,0DH in binary numbers will bring a return like +1234567E+0m3 (CR)
(2BH,31H,32H,33H,34H,35H,36H,37H,45H,2BH,30H,6DH,33H,20H,0DH,0AH in binary numbers), then the
PDI+(CR) will brings a return like +1234567E+0m3 !F7(CR), after the character! are the check-sum in
ASCII format(2BH+31H+32H+33H+34H+35H+ 36H+37H+45H+2BH+30H+6DH+33H+20H=(2)F7H)
Pay attention to that there may be no characters or only spaces before the character !.
2.2 The N prefix
The usage of prefix N goes like: N + single byte address + basic command.
For example if the address number 88 flow meter is going to be addressed, the command should like:
NXDV(CR), the decimal value of X should be 88.
The prefix W is strongly recommended for new users.
2.3 The W prefix
Usage: W + character string address + basic command
The value of the character string should have a value in the range of 0~65535, except for the value of 13
0DH carriage return100AH line feed 422AH *3826H&.
For example, if the velocity of number 12345 flow meter is wanted, the command can be like:
W12345DV(CR), (57H,31H,32H,33H,34H,35H,44H,56H,0DH in binary numbers)
2.4 The command connecter &
The command connecter & adds several basic commands into a one-line compound command. The
compound command should not exceed a length of over 253 characters. The prefix P should be added before
every basic command, to make the returned results having a check-sum.
For example, if the 1)flow rate 2)velocity 3)positive totalizer 4) net energy totalizer 5) the AnalogInput1
input 6) the AnalogInput2 input of the address number 4321 flow meter are wanted to return with check-sum,
the one-line command is like:
W4321PDQD&PDV&PDI+&PDIE&PAnalogInput1&P AnalogInput2(CR)
The returned data are:
+0.000000E+00m3/d!AC(CR)
+0.000000E+00m/s!88(CR)
+1234567E+0m3 !F7(CR)
+0.000000E+0GJ!DA(CR)
+7.838879E+00mA!59
+3.911033E+01!8E(CR)
Any command can be connected together. For example, MENU11&MMEYA&MMEYA&MKEYA(CR)
PART VI
The Compatible protocols Application

PART VII
The CJ-188-2004 protocol Application
The CJ-188-2004 is a Chinese National Standard for heat or energy meters

The command to read a meter with an ESN which is 17312151,is as following

FE FE FE FE FE FE FE FE FE FE FE 68 20 51 21 31 17 00 11 11 01 03 1F 90 12 29 16

Where all the numbers are in HEX.


The first 11 FEs are preamble
68(0x68) is starter
20(0x20) is meter type
51(0x51) is address A0. if address A0-A6 are all 0xAAthis command is a broadcasting one. Any meter will
response to a broadcast command with its ESN number in the response telegram. If there is only
one meter on the BUS, a broadcasting command can be used to obtain the ESN number of the
meter.
21(0x21) address A1
31(0x31) address A2
17(0x17) address A3 (A0A1A2A3 is ESN number, lower byte first)
00(0x00) address A4, always 0x00 or 0xAA with a broadcasting command
11(0x11) address A5, always 0x11 or 0xAA with a broadcasting command
11(0x11) address A6, always 0x11 or 0xAA with a broadcasting command
01(0x01) Control Code 0
03(0x03) length of the DATA
1F(0x1F) DATA Identifier 0
90(0x90) DATA Identifier 1
12(0x12) SER
29(0x29) Checksum CS which is the arithmetic sum of all the numbers, except preambles68 20 51 21 31 17
00 11 11 01 03 1F 90 12, the sum is 0x29
16(0x16) ending byte.

A0A1A2A3CS

User Telegram
FE FE FE FE FE FE FE FE FE FE FE 68 20 51 21 31 17 00 11 11 81 2E 1F 90 12 00 00 00 00 05
00 00 00 00 05 00 00 00 00 14 00 00 00 00 35 19 00 00 00 2C 76 30 00 68 30 00 73 02 00 32
41 11 12 09 07 20 04 00 E9 16
68 68H
20 T
51 A0
21 A1
31 A2
17 A3A0A1A2A3
00 A4
11 A5
11 A6
81 C
2E L1F 90 12 00 00 00 00 05 00 00 00 00 05 00 00 00 00 14 00 00 00 00 35 19
00 00 00 2C 76 30 00 68 30 00 73 02 00 32 41 11 12 09 07 20 04 002E
1F DI0
90 DI1
12 SER
00 00 00 00 05 kWh1
00 00 00 00 05 kWh1
00 00 00 00 14 W1
00 00 00 00 35 m/h1
19 00 00 00 2C m1
76 30 00 0030.76
68 30 00 0030.68
73 02 00 000273
32 41 11 12 09 07 20 20070912114132
04 00 23

E9 CS68 20 51 21 31 17 00 11 11 81 2E 1F 90 12 00 00 00 00 05 00 00 00 00 05 00
00 00 00 14 00 00 00 00 35 19 00 00 00 2C 76 30 00 68 30 00 73 02 00 32 41 11 12 09 07 20 04
00FFH
16 16H

68H16HA4A5A600H 11H 11H81H


2EH

CJ188
1
T=10H~29H
CTRL0=03H CTRL1= 83H
D1D0 = 810AH
3DISER
(nFE) 68 10 AA AA AA AA AA AA AA 03 03 0A 81 05 B4 16
11 FE68 10 21 00 00 13 00 11 11 83 03 0A 81 05 E4 16
13000021

2
T=10H
CTRL0=01H CTRL1= 81H
D1D0 = 901FH

5ST 42

(nFE) 68 10 AA AA AA AA AA AA AA 01 03 1F 90 12 E3 16
11 FE68 10 21 00 00 13 00 11 11 81 2A 1F 90 12 00 00 00 00 35 64 08
57 01 2C 79 65 00 00 2C 58 31 01 00 2C 74 56 34 12 2C 20 43 65 87 2C 37 36 12 20 02 16
20 00 08 B5 16
35 00 00 00 00 0000.0000
2C 01 57 08 64 15708.64
2C 00 00 65 79 65.79
2C 00 01 31 58 65.79
2C 12 34 56 74 1234.5678
2C 87 65 43 20 8765.4321
20 16 02 20 12 36 37
00 08

3
T=10H
CTRL3=24H CTRL4= 0A4H
D1D0 = 801BH
4

100
3DISER
(nFE) 68 10 AA AA AA AA AA AA AA 24 0B 1B 80 12 2B 52 9A 44 BA F5 08 46 52 16
1234.56782B 52 9A 44
8765.4321BA F5 08 46

4
T=10H-29H
CTRL3=04H CTRL4= 84H
D1D0 = 8015H
7
3DISER

(nFE) 68 10 AA AA AA AA AA AA AA 04 0A 15 80 12 56 34 12 20 02 16 20 C7 16
2016-02-20 12:34:56

5 0x0F

1-8MBUS
MBUS
T=10H~29H
CTRL0=03H CTRL1= 83H
D0D1 = 810AH
3DISER
(nFE) 68 10 F3 FF FF FF AA AA AA 03 03 0A 81 05 CS 16
XXXXXXX3
(nFE) 68 10 FF FF FF 8F AA AA AA 03 03 0A 81 05 CS 16
8XXXXXXX
6 CJ188 SER=0
T=10H
CTRL3=01H CTRL4= 81H
D1D0 = 901FH
SER 0

22DISER
(nFE) 68 10 AA AA AA AA AA AA AA 01 03 1F 90 00 D1 16
11 FE68 10 21 00 00 13 AA AA AA 81 16 1F 90 00 64 08 57 01 2C
00 00 00 00 2C 54 48 13 20 02 16 20 00 08 1B 16
13 00 00 21 21 00 00 13
AA AA AA
2C 01 57 08 64 15708.64
2C 00 00 00 00 =0
54 48 13 20 02 16 20 2016220134850
00 08
1B
7

1

Wh 02H GJ100 13H
KWh 05H W 14H
MWh 08H kW 17H
MWh100 0AH MW 1AH
J 01H L 29H
Kj 0BH m 2CH
MJ 0EH L/h 32H
GJ 11H m/h 35H

2 ST
D0 D1 D2 D3 D4 D5 D6 D7

0 0 0
0001
1 1 1

3 ST
D0 D1 D2 D3 D4 D5 D6 D7





0
0 0 0

1 1 1 1

2016.1.12 BAUDRATE BUADRATE


2016.2.20 CJ188
ST
2016.2.21 CJ188 00 FE
2016.9.1 V51.11
1 BUG
2 USART CJ188 FE
3 CJ188

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy