MF5700 Series Mass Flow Meter
Modbus RTU Protocol
Siargo Ltd.
3100 De La Cruz Boulevard, Suite 210
Santa Clara, CA 95054, USA
Tel: +1-408-969 0368
Fax: +1-408 777 8091
Email: [email protected].
Hardware connection
The MF5700 protocol is based on standard Modbus RTU mode. A master (PC or PLC) can
communicate with several slaves (MF5700), setting parameter or getting data.
The hardware layer is TIA/EIA-485-A. The connection is as below:
Communication parameter
The UART parameter is shown as table-1.
Table1 ModbusCommunicationparameter
Communication parameter
protocol
RTU
Baud rate(Bits per second)
9600 bps
Start bits
Data bits
Stop bits
Even/Odd parity
None
Bits period
104.2s
Bytes period
1.1458ms
Maximum data length
20
Maximum Nodes
247
Frame
The framing function is accord with The Standard Modbus RTU framing, which is shown as
below:
Function
Stop_bits
Start_bits
Address
Data
CRC
code
N 8Bit
T1-T2-T3-T4
8Bit
8Bit
16Bit
T1-T2-T3-T4
20n0
Start_bits:
4 periods bit time, to indicate a new frame.
Address:
The Modbus address, can be set as 0 to 255 except 157. 0 is
broadcast address.
Function code :
Define the action that MF5700 should takes, or indicate that which
code the MF5700 is responding .
Data:
Including the address of register ,length of data and the data.
CRC:
CRC verify code , the low byte is flowed by high byte. For example , the
16bit CRC code is divide as BYTE_H BYTE_L , in the frame ,the
BYTE_L goes first ,then the BYTE_H, at last ,is the stop signal .
4 periods bit timeto indicate that the current framing is over.
Stop_bits:
4 Function code
The MF5700 Modbus Function-code is a subclass of Standard Modbus Function-Code .By
using these function-code, We can set or read the registers of the MF5700 Flow Meter.
They are shown as table-2:
Table2 MF5700Modbusfunctioncode
CODE
name
action
0x03
Read register
Read register (one or more)
0x06
Set single register
Write one single 16bit register
0x10
Set multi registers
Write multi registers
5 Registers
The MF5700 Flow meter has several registers .We can get the information (such as
address, flow rate and so on.) form reading these registers, or we can write into some of
the registers for setting parameters of the Flow meter.
The registers are shown as table-3:
Table3 TheregisterofMF5700
NAME
Communication
Protocol
REGISTER
Modbus
0x0000
40000(0x0000)
0x0001
40001(0x0001)
The current flow rate (R)
0x00020x0003
40002(0x0002)
Total
The accumulative total of flow
rate (RW)
0x00040x0006
40004(0x0004)
Alarm
Alarm point of total(RW )
0x00070x0008
40007(0x0007)
Password for entering setting
(RW)
0x000B0x000C
40011(0x000B)
Address
Flow Rate
Password
Description
The communicate protocol of
MF5700 (RW)
The address of MF5700 flow
meter (RW)
* R-read only, W-write only, RW-read and write.
Table4 Descriptionofregisters
Communicate
0x0000
Protocol
Description
Protocol mode
Value type
UINT16
Detail
WRITE
READ
Value = 0: Mode A, Siargo flow meter communicate mode
Value = 1: ModBus mode
Flow meter
0x0001
Address
WRITE
READ
Description
The address of flow meter in modbus protocol
Value type
UINT16
Detail
Value from 1 to 255 except 157 (0x9d), 0 is broadcast address.
Flow Rate
0x00020x0003
Description
The current flow rate
Value type
UINT16
WRITE
READ
Flowrate = (value(0x0002) * 65536 + value(0x0003) ) /1000
Example:
Detail
When the LCD shows 20.34 SLPM, we can get 0 form
register 0x0002 and 20340 form register 0x0003.
Thus, flowrate = (0*65536 + 20340)/1000= 20.340
Total
0x00040x0006
Description
The accumulative total of flow
Value type
UINT32 + UINT16
WRITE
READ
V1 = value (0x0004) * 65536 +value (0x0005)
V2 = value (0x0006)
Total = (V1 *1000 + V2)/1000
Example:
Detail
When the LCD shows 3452.245NCM, we can get 0 from
register 0x0004, 3452 from register 0x0005, 245 from
register 0x0006.
Then, V1 = 0*65536 + 3452;
V2= 245
Total =(3452*1000+245) /1000=3452.245
Alarm
0x00070x0008
Description
The alarm point of accumulative total
Value type
UINT32
WRITE
READ
Alarm= (value(0x0007)* 65536 +value (0x0008))
detail
Whenthesetvalueisreachedandtheflowisstill
accumulating,thealarmfunctionwillbetriggered.
Password
0x000B0x000C
Description
Setting password.
Value type
UINT32
detail
WRITE
READ
PASSWORD= value0x000B*65536 + value(0x0000C)
Selectable: 00000~99999.