bit order: lsb first
byte order: big endian
Data bits:8
Parity: None
Stop bits: 1
Floating point number follows IEEE754-1985. The float32 below stands for 32bits Single precision floating point number.
Register: 2 Byte 或 16bit 長,是 Modbus RTU 的記憶體通訊的單位長度。
Byte: 8 bit長
modbus 可操作的記憶體分為兩大類,唯讀型及讀寫型。
唯讀型主要是流量計狀態相關的記憶體,例如即時流量。這部分也是最常使用的記憶體。唯讀型的記憶體只能使用指 04 來讀取。相關頁面如下:
讀寫型主要是流量計設定參數記憶體,例如管徑;還有重設變數,例如累計流量歸零。讀寫型的記憶體只能使用指 03 來讀取。寫入操作一次只能改變一個參數,如果目標參數的記憶體長度是 1個 register,使用指令 06,如果目標參數的記憶體長度是 2 register,使用 30。讀寫型記憶體列表頁面如下:
讀寫型記憶體指令說明頁面如下:
欄位名稱
功能
Register位置
讀寫記憶體位置與唯讀記憶體不共用。
Register
長度
這個變數的數據長度。以 Register(2Byte)為單位
記憶體內容
用來說明功能。
資料型式
標明收發數據的格式。
讀寫功能
R 表示可讀,W 表示可寫。部分記憶體只寫不讀。
Register 位置
Register 長度
記憶體內容
資料型式
讀寫功能
註
A分類參數
0000
1
pipe type
unsigned int 16
R/W
選項型
0001
2
scale factor
float 32
R/W
0003
1
anti noise
unsigned int 16
R/W
選項型
0004
1
damping
unsigned int 16
R/W
0005
1
direction
unsigned int 16
R/W
選項型
0006
1
neg flow
unsigned int 16
R/W
選項型
0007
1
ext mode
unsigned int 16
R/W
選項型
0008
1
Fast Update
unsigned int 16
R/W
選項型
B分類參數
0100
1
vol unit
unsigned int 16
R/W
選項型
0101
1
time unit
unsigned int 16
R/W
選項型
0102
1
total unit
unsigned int 16
R/W
選項型
0103
1
speed unit
unsigned int 16
R/W
選項型
0104
1
Decimal Places
unsigned int 16
R/W
選項型
C分類參數
0200
1
total method
unsigned int 16
R/W
選項型
0201
1
clear total
unsigned int 16
W
0202
1
history function
unsigned int 16
R/W
選項型
0203
1
clear history
unsigned int 16
W
D分類參數
0300
1
paddle alarm
unsigned int 16
R/W
選項型
0301
1
magnetic alarm
unsigned int 16
R/W
選項型
0302
1
battery alarm
unsigned int 16
R/W
選項型
0303
1
flow limit alarm
unsigned int 16
R/W
選項型
0304
2
upper limit
float 32
R/W
0306
2
lower limit
float 32
R/W
0308
1
hyster value
unsigned int 16
R/W
0309
1
total alram
unsigned int 16
R/W
選項型
030A
1
total trigger
unsigned int 16
R/W
選項型
030B
2
total target
float 32
R/W
030D
1
iout alarm
unsigned int 16
R/W
選項型
030E
1
velocity alarm
unsigned int 16
R/W
選項型
030F
1
pulse overlap
unsigned int 16
R/W
選項型
E分類參數
0400
1
nc no
unsigned int 16
R/W
選項型
0401
1
oct info
unsigned int 16
R/W
選項型
0402
1
pulse width
unsigned int 16
R/W
選項型
0403
1
modbus ID
unsigned int 16
R/W
0404
1
modbus baud
unsigned int 16
R/W
選項型
0405
1
iout definition
unsigned int 16
R/W
選項型
0406
2
0mA/ 4mA value
float 32
R/W
0408
2
20mA value
float 32
R/W
040A
1
iout error
unsigned int 16
R/W
選項型
040B
2
0mA/4mA adj
float 32
R/W
040D
2
20mA adj
float 32
R/W
040F
1
Iout Range
unsigned int 16
R/W
選項型
0410
1
PulseV2Unit
unsigned int 16
R/W
選項型
F分類參數
0500
2
sim rate
float 32
R/W
0502
1
sim on - reserved
const
R
0503
1
sim pulse - reserved
const
R
G分類參數
0600
1
set year*1
unsigned int 16
R/W
0601
1
set month*1
unsigned int 16
R/W
0602
1
set day*1
unsigned int 16
R/W
0603
1
set time*2
unsigned int 16
R/W
0604
1
date format
unsigned int 16
R/W
選項型
H分類參數
0700
1
led brightness
unsigned int 16
R/W
選項型
0701
1
lcd brightness
unsigned int 16
R/W
選項型
0702
1
green light
unsigned int 16
R/W
選項型
0703
1
lang
unsigned int 16
R/W
選項型
0704
1
paddle init
unsigned int 16
W
0705
1
reset
unsigned int 16
W
0706
1
Lock Device
unsigned int 16
R/W
選項型
0707
1
Password
unsigned int 16
R/W
只能四位數
記憶體位置
記憶體內容
unsigned int 16 數值
對應選項
註
0000
pipe type
0
1 inch
1
3/4 inch
2
2 inch
3
Scale Mode
4
2-1/2 inch
5
1-1/4 inch
6
1-1/2 inch
7
1 inch V2
記憶體位置
記憶體內容
unsigned int 16 數值
對應選項
註
0003
anti noise
0
off
1
on
記憶體位置
記憶體內容
unsigned int 16 數值
對應選項
註
0005
direction
0
normal
1
inverse
記憶體位置
記憶體內容
unsigned int 16 數值
對應選項
註
0006
neg flow
0
off
1
on
記憶體位置
記憶體內容
unsigned int 16 數值
對應選項
註
0007
ext mode
0
off
1
on
記憶體位置
記憶體內容
unsigned int 16 數值
對應選項
註
0008
Fast Update
0
off
1
on
記憶體位置
記憶體內容
unsigned int 16 數值
對應選項
註
0100
vol unit
0
L
1
m3
2
us gallon
3
imperial gallon
4
ft3
記憶體位置
記憶體內容
unsigned int 16 數值
對應選項
註
0101
time unit
0
second
1
minute
2
hour
3
day
記憶體位置
記憶體內容
unsigned int 16 數值
對應選項
註
0102
total unit
0
L
1
m3
2
us gal
3
imp gal
4
ft3
記憶體位置
記憶體內容
unsigned int 16 數值
對應選項
註
0103
speed unit
0
m/s
1
ft/s
記憶體位置
記憶體內容
unsigned int 16 數值
對應選項
註
0104
Decimal Places
0
0
1
1
2
2
3
3
4
4
記憶體位置
記憶體內容
unsigned int 16 數值
對應選項
註
0200
total method
0
pos
1
neg
2
net
記憶體位置
記憶體內容
unsigned int 16 數值
對應選項
註
0202
history function
0
off
1
on
記憶體位置
記憶體內容
unsigned int 16 數值
對應選項
註
0300
paddle alarm
0
off
1
on
記憶體位置
記憶體內容
unsigned int 16 數值
對應選項
註
0301
magnetic alarm
0
off
1
on
記憶體位置
記憶體內容
unsigned int 16 數值
對應選項
註
0302
battery alarm
0
off
1
on
記憶體位置
記憶體內容
unsigned int 16 數值
對應選項
註
0303
flow limit alarm
0
off
1
on
記憶體位置
記憶體內容
unsigned int 16 數值
對應選項
註
0309
total alarm
0
off
1
on
記憶體位置
記憶體內容
unsigned int 16 數值
對應選項
註
030A
total trigger
0
higher than target
1
lower than target
記憶體位置
記憶體內容
unsigned int 16 數值
對應選項
註
030D
iout alarm
0
off
1
on
記憶體位置
記憶體內容
unsigned int 16 數值
對應選項
註
030E
velocity alarm
0
off
1
on
記憶體位置
記憶體內容
unsigned int 16 數值
對應選項
註
030F
pulse overlap
0
off
1
on
記憶體位置
記憶體內容
unsigned int 16 數值
對應選項
註
0400
nc no
0
nc
1
no
記憶體位置
記憶體內容
unsigned int 16 數值
對應選項
註
0401
oct info
0
alarm a
1
alarm a b
2
alarm a b c
3
over flowrate
4
over total
5
paddle pulse
6
PulseV2
7
off
記憶體位置
記憶體內容
unsigned int 16 數值
對應選項
註
0402
pulse width
0
0.5ms
1
1ms
2
10ms
記憶體位置
記憶體內容
unsigned int 16 數值
對應選項
註
0404
modbus baud
0
9600
1
19200
2
38400
3
57600
4
off
記憶體位置
記憶體內容
unsigned int 16 數值
對應選項
註
0405
iout definition
0
flowrate
1
velocity
2
total
3
off
記憶體位置
記憶體內容
unsigned int 16 數值
對應選項
註
040A
iout error
0
2.4 ma & 21.6 ma
1
2.4 ma
2
21.6 ma
3
4&20mA or 0&20mA
記憶體位置
記憶體內容
unsigned int 16 數值
對應選項
註
040F
Iout Range
0
4-20mA
1
0-20mA
記憶體位置
記憶體內容
unsigned int 16 數值
對應選項
註
0410
PulseV2Unit
0
0.001
1
0.002
2
0.003
3
0.005
4
0.007
5
0.01
6
0.02
7
0.03
8
0.05
9
0.07
10
0.1
11
0.2
12
0.3
13
0.5
14
0.7
15
1.0
記憶體位置
記憶體內容
unsigned int 16 數值
對應選項
註
0604
date format
0
yyyy-mm-dd
1
yyyy/mm/dd
2
dd/mm/yyyy
3
mm/dd yy
記憶體位置
記憶體內容
unsigned int 16 數值
對應選項
註
0700
led brightness
0
low
1
medium
2
high
記憶體位置
記憶體內容
unsigned int 16 數值
對應選項
註
0701
lcd brightness
0
low
1
medium
2
high
記憶體位置
記憶體內容
unsigned int 16 數值
對應選項
註
0702
green light
0
always on
1
10 seconds
2
60 seconds
記憶體位置
記憶體內容
unsigned int 16 數值
對應選項
註
0703
Language
0
English
1
正體中文
2
簡體中文
記憶體位置
記憶體內容
unsigned int 16 數值
對應選項
註
0706
Lock Device
0
Off
1
On
讀取指令中register長度必需小於等於 20個 register。超過該長度的指令會被忽略。
Byte#
1
2
3
4
5
6
7
8
Node ID
Slave Address
Function Code
讀取數據的啟始地址
讀取數據的啟始地址
讀取registers 總數
讀取registers 總數
CRC
CRC
範例內容01~FF
01
04
00
00
00
02
71
CB
這個範例會讀取即時流量
slave address: 01(本流量計地址)
function code: 04(讀取指令)
讀取數據的啟始地址: 0000(要讀取的數據的啟始地址)
讀取registers 總數: 0002 (需要從 0000 開始讀兩個 register 的記憶體)
CRC: 71 CB(依 CRC 算法計算出的糾錯碼)
Byte#
1
2
3
4
5
6
7
8
9
Node ID
Slave Address
Function Code
回覆的Byte數
Data Byte #1
Data Byte
#2
Data Byte
#3
Data Byte
#4
CRC
CRC
範例內容01~FF
01
04
04
00
00
00
00
FB
84
slave address: 01(本流量計地址)
function code: 04(讀取指令)
回覆的Byte數: 04(2個register=4byte)
Data Byte: 00 00 00 00(假設目前即時流量為 0)
CRC: FB 84(依 CRC 算法計算出的糾錯碼)
欄位名稱
功能
Register位置
讀寫記憶體位置與唯讀記憶體不共用。
Register
長度
這個變數的數據長度。以 Register(2Byte)為單位
記憶體內容
用來說明功能。
資料型式
標明收發數據的格式。
Register 位置
Register 長度
記憶體內容
資料型式
註
0000
2
instantaneous flow rate
float 32
0002
2
instantaneous flow velocity
float 32
0004
2
totalized flow volume
float 32
0006
2
analog output in micro-amp
unsigned int 32
0008
1
unsigned int 16
第一個 byte 未定義補0
0009
1
unsigned int 16
第一個 byte 未定義補0
000A
1
unsigned int 16
第一個 byte 未定義補0
000B
1
unsigned int 16
第一個 byte 未定義補0
000C
1
unsigned int 16
第一個 byte 未定義補0
000D
1
history[1] year & month
unsigned int 16
000E
1
history[1] day
unsigned int 16
000F
1
history[1] total method
unsigned int 16
0010
2
history[1] totalized flow rate
float32
0012
1
history[2] year & month
unsigned int 16
0013
1
history[2] day
unsigned int 16
0014
1
history[2] total method
unsigned int 16
0015
2
history[2] totalized flow rate
float32
0017
1
history[3] year & month
unsigned int 16
0018
1
history[3] day
unsigned int 16
0019
1
history[3] total method
unsigned int 16
001A
2
history[3] totalized flow rate
float32
001C
1
history[4] year & month
unsigned int 16
001D
1
history[4] day
unsigned int 16
001E
1
history[4] total method
unsigned int 16
001F
2
history[4] totalized flow rate
float32
0021
1
history[5] year & month
unsigned int 16
0022
1
history[5] day
unsigned int 16
0023
1
history[5]total method
unsigned int 16
0024
2
history[5] totalized flow rate
float32
0026
1
history[6] year & month
unsigned int 16
0027
1
history[6] day
unsigned int 16
0028
1
history[6] total method
unsigned int 16
0029
2
history[6] totalized flow rate
float32
002B
1
history[7] year & month
unsigned int 16
002C
1
history[7] day
unsigned int 16
002D
1
history[7] total method
unsigned int 16
002E
2
history[7] totalized flow rate
float32
0030
1
history[8] year & month
unsigned int 16
0031
1
history[8] day
unsigned int 16
0032
1
history[8] total method
unsigned int 16
0033
2
history[8] totalized flow rate
float32
0035
1
history[9] year & month
unsigned int 16
0036
1
history[9] day
unsigned int 16
0037
1
history[9] total method
unsigned int 16
0038
2
history[9] totalized flow rate
float32
003A
1
history[10] year & month
unsigned int 16
003B
1
history[10] day
unsigned int 16
003C
1
history[10] total method
unsigned int 16
003D
2
history[10] totalized flow rate
float32
003F
1
history[11] year & month
unsigned int 16
0040
1
history[11] day
unsigned int 16
0041
1
history[11] total method
unsigned int 16
0042
2
history[11] totalized flow rate
float32
0044
1
history[12] year & month
unsigned int 16
0045
1
history[12] day
unsigned int 16
0046
1
history[12] total method
unsigned int 16
0047
2
history[12] totalized flow rate
float32
0049
1
history[13] year & month
unsigned int 16
004A
1
history[13] day
unsigned int 16
004B
1
history[13] total method
unsigned int 16
004C
2
history[13] totalized flow rate
float32
004E
1
history[14] year & month
unsigned int 16
004F
1
history[14] day
unsigned int 16
0050
1
history[14] total method
unsigned int 16
0051
2
history[14] totalized flow rate
float32
0053
1
Maximum r value
unsigned int 16
0054
1
Minimum r value
unsigned int 16
0055
2
instantaneous flow rate(X100取整數)
signed int 32
例如原始數值 5.1234,會變成 512,整數以下捨去
0057
2
instantaneous flow speed(X100取整數)
signed int 32
例如原始數值 5.1234,會變成 512,整數以下捨去
0059
2
totalized flow rate
signed int 32
例如原始數值 5.1234,會變成 512,整數以下捨去
005B
2
history[1] totalized flow rate(X100取整數)
signed int 32
例如原始數值 5.1234,會變成 512,整數以下捨去
005D
2
history[2] totalized flow rate(X100取整數)
signed int 32
例如原始數值 5.1234,會變成 512,整數以下捨去
005F
2
history[3] totalized flow rate(X100取整數)
signed int 32
例如原始數值 5.1234,會變成 512,整數以下捨去
0061
2
history[4] totalized flow rate(X100取整數)
signed int 32
例如原始數值 5.1234,會變成 512,整數以下捨去
0063
2
history[5] totalized flow rate(X100取整數)
signed int 32
例如原始數值 5.1234,會變成 512,整數以下捨去
0065
2
history[6] totalized flow rate(X100取整數)
signed int 32
例如原始數值 5.1234,會變成 512,整數以下捨去
0067
2
history[7] totalized flow rate(X100取整數)
signed int 32
例如原始數值 5.1234,會變成 512,整數以下捨去
0069
2
history[8] totalized flow rate(X100取整數)
signed int 32
例如原始數值 5.1234,會變成 512,整數以下捨去
006B
2
history[9] totalized flow rate(X100取整數)
signed int 32
例如原始數值 5.1234,會變成 512,整數以下捨去
006D
2
history[10] totalized flow rate(X100取整數)
signed int 32
例如原始數值 5.1234,會變成 512,整數以下捨去
006F
2
history[11] totalized flow rate(X100取整數)
signed int 32
例如原始數值 5.1234,會變成 512,整數以下捨去
0071
2
history[12] totalized flow rate(X100取整數)
signed int 32
例如原始數值 5.1234,會變成 512,整數以下捨去
0073
2
history[13] totalized flow rate(X100取整數)
signed int 32
例如原始數值 5.1234,會變成 512,整數以下捨去
0075
2
history[14] totalized flow rate(X100取整數)
signed int 32
例如原始數值 5.1234,會變成 512,整數以下捨去