Mod X4 Flow Module
Communication Protocol
Model: Mod X4
Working Voltage: DC 5-12V
Introduction
This series of products follows the MODBUS protocol instructions. Available command codes are 0x03, 0x06, and 0x10. CRC check: low bit first, high bit last.
Example: Use the 03 instruction to read multiple registers
0x010 x030 x000 x000 x000 x030 x050 xCB
(Continuously read the values of 3 registers from the 0x0000 register of device No. 0x0001)
To write to a single register use the 06 instruction
0x010 x060 x000 x010 x000 x010 x190 xCA
(Write 0x0001 to the 0x0001 register of device No. 0x0001)
Writing to multiple registers uses 10 instructions
0x010 x100 x000 x000 x000 x020 x040 x000 x000 x000 x010 x320 x6F
(Write 0x0000 to the 0x0000 register of device No. 0x0001, and write 0x0001 to the 0x0001 register of device No. 0x0001)
Default Settings:
Baud rate: 9600 (decimal)
MODBUS device address: 1 (decimal)
Flowmeter constant K value: 500 (decimal)
To modify baud rate parameters
The default baud rate is 9600, and the reading is 2.
If you modify the baud rate, modify the parameters as follows. (If you enter a value other than the value in the table, the baud rate will be restored to 9600, but when reading, it will be displayed as the modified value is not 2)
Setting | Baud Rate |
0 | 2400 |
1 | 4800 |
2 | 9600 |
3 | 19200 |
Register Address | Register Function |
---|
0x0000 | baud rate |
0x0001 | device address, can be modified to 0x0001-0x00F7 (decimal 1-247) |
0x0002 | Flow Sensor (1) sensor pulse K value, the value read and written is 100 times the actual value |
0x0003 | Flow Sensor (1) Permanent cumulative flow high register, unit, L (maximum 65535) |
0x0004 | Flow Sensor (1) Permanent cumulative flow low register, unit, L (maximum 65535) |
0x0005 | Flow Sensor (1) Permanent cumulative flow decimal, the reading is 100 times the actual value, unit, L |
0x0006 | Flow Sensor (1) Permanent accumulated flow pulse value |
0x0007 | Flow Sensor (2) sensor pulse K value, the value read and written is 100 times the actual value |
0x0008 | Flow Sensor (2) Permanent cumulative flow high register, unit, L (maximum 65535) |
0x0009 | Flow Sensor (2) Permanent cumulative flow low register, unit, L (maximum 65535) |
0x000A | Flow Sensor (2) Permanent cumulative flow decimal, the reading is 100 times the actual value, unit, L |
0x000B | Flow Sensor (2) Permanent accumulated flow pulse value |
0x000C | Flow Sensor (3) sensor pulse K value, the value read and written is 100 times the actual value |
0x000D | Flow Sensor (3) Permanent cumulative flow high register, unit, L (maximum 65535) |
0x000E | Flow Sensor (3) Permanent cumulative flow low register, unit, L (maximum 65535) |
0x000F | Flow Sensor (3) Permanent cumulative flow decimal, the reading is 100 times the actual value, unit, L |
0x0010 | Flow Sensor (3) Permanent accumulated flow pulse value |
0x0011 | Flow Sensor (4) sensor pulse K value, the value read and written is 100 times the actual value |
0x0012 | Flow Sensor (4) Permanent cumulative flow high register, unit, L (maximum 65535) |
0x0013 | Flow Sensor (4) Permanent cumulative flow low register, unit, L (maximum 65535) |
0x0014 | Flow Sensor (4) Permanent cumulative flow decimal, the reading is 100 times the actual value, unit, L |
0x0015 | Flow Sensor (4) Permanent accumulated flow pulse value |
0x0016 | Flow Sensor (1) Temporary accumulated flow high register, unit, L (maximum 65535) |
0x0017 | Flow Sensor (1) Temporary accumulated flow low register, unit, L (maximum 65535) |
0x0018 | Flow Sensor (1) Temporary cumulative flow decimal, the reading is 100 times the actual value, unit, L |
0x0019 | Flow Sensor (1) temporary accumulated flow pulse value (accumulated 1L to return to 0) |
0x001A | Flow Sensor (1) real-time flow rate, unit: L/min, the reading is 100 times the actual value |
0x001B | Flow Sensor (1) real-time pulse number unit Hz |
0x001C | Flow Sensor (2) Temporary accumulated flow high register, unit, L (maximum 65535) |
0x001D | Flow Sensor (2) Temporary accumulated flow low register, unit, L (maximum 65535) |
0x001E | Flow Sensor (2) Temporary cumulative flow decimal, the reading is 100 times the actual value, unit, L |
0x001F | Flow Sensor (2) temporary accumulated flow pulse value (accumulated 1L to return to 0) |
0x0020 | Flow Sensor (2) real-time flow rate, unit: L/min, the reading is 100 times the actual value |
0x0021 | Flow Sensor (2) real-time pulse number unit Hz |
0x0022 | Flow Sensor (3) Temporary accumulated flow high register, unit, L (maximum 65535) |
0x0023 | Flow Sensor (3) Temporary accumulated flow low register, unit, L (maximum 65535) |
0x0024 | Flow Sensor (3) Temporary cumulative flow decimal, the reading is 100 times the actual value, unit, L |
0x0025 | Flow Sensor (3) temporary accumulated flow pulse value (accumulated 1L to return to 0) |
0x0026 | Flow Sensor (3) real-time flow rate, unit: L/min, the reading is 100 times the actual value |
0x0027 | Flow Sensor (3) real-time pulse number unit Hz |
0x0028 | Flow Sensor (4) Temporary accumulated flow high register, unit, L (maximum 65535) |
0x0029 | Flow Sensor (4) Temporary accumulated flow low register, unit, L (maximum 65535) |
0x002A | Flow Sensor (4) Temporary cumulative flow decimal, the reading is 100 times the actual value, unit, L |
0x002B | Flow Sensor (4) temporary accumulated flow pulse value (accumulated 1L to return to 0) |
0x002C | Flow Sensor (4) real-time flow rate, unit: L/min, the reading is 100 times the actual value |
0x002D | Flow Sensor (4) real-time pulse number unit Hz |
0x002E | Output point 1, control alarm 1, input 0x00FF, turn on, other values turn off |
0x002F | Output point 2, control alarm 2, input 0x00FF, turn on, other values turn off |
0x0030 | Output point 3, control alarm 3, input 0x00FF, turn on, other values turn off |
0x0031 | Output point 4, control alarm 4, input 0x00FF, turn on, other values turn off |
Note:
1. After the address, baud rate, K factor, and permanent cumulative flow are modified, the device needs to be restarted to take effect.
2. Please close the input pipeline before clearing the cumulative flow to prevent water from passing by again after clearing. The value changes after 60 seconds, and the program changes the value again so that the cumulative amount cannot be returned to zero.
3. Reset the temporary cumulative flow after power failure, and record the permanent cumulative flow every 60 seconds. (Flows must exceed 1 litre within 60 seconds to be recorded)
4. When the low bit of the register is full of 65535, it will enter 1 into the higher bit. Example: Assuming a flow sensor with a cumulative flow higher register is 1 and the cumulative flow lower register is 2; then the total flow is 65535 * 1 +2 = 65537L
5. The maximum storage value of each register is 65,535, and the maximum storage data of the permanent cumulative flow of each flow sensor is 65,535 * 65,535 +65,535 = 4,294,917,600 liters of water
6. During the reset operation, the registers for the permanent accumulated traffic need to be reset at the same time, that is, the registers 3/4/5/6 should be reset at the same time. Temporary cumulative traffic reset is also subject to this rule.