Read/Write Memory Four-Register Write Command (31)
For large numbers, reading and writing in different formats (float32/int64) may result in a discrepancy of less than 1/10,000. This command is limited to memory with a register length of 4. Please refer to the provided list.
Instruction example
Format for Issuing the Write Command (31) from the Control Terminal
Byte#
1
2
3
4
5
6
7
8
9
10
11
12
13
14
Node ID
Slave Address
Function Code
Starting Address of Data to Write
Starting Address of Data to Write
Data to Write
Data to Write
Data to Write
Data to Write
Data to Write
Data to Write
Data to Write
Data to Write
CRC
CRC
Example 01~FF
01
31
02
83
00
00
00
00
00
BC
61
FF
1E
F5
Example Explanation of Control Terminal Command
This example reads and writes data for C04 Dosing Target (64).
Slave Address:
01
(Address of the flow meter)Function Code:
31
(Write command)Starting Address of Data to Write:
02 83
(Memory address for C04 Dosing Target (64))Data to Write:
00 00 00 00 00 BC 61 FF
(Data for C04 Dosing Target (64))CRC:
1E F5
(Error-checking code calculated using the CRC algorithm)
Flow Meter Response Format (31)
Byte#
1
2
3
4
5
6
7
8
9
10
11
12
13
14
Node ID
Slave Address
Function Code
Starting Address of Data to Write
Starting Address of Data to Write
Data to Write
Data to Write
Data to Write
Data to Write
Data to Write
Data to Write
Data to Write
Data to Write
CRC
CRC
Example 01~FF
01
31
02
83
00
00
00
00
00
BC
61
FF
1E
F5
Example Explanation of Flow Meter Response
If the write command format is correct, the flow meter will echo the received command back to the master.
Slave Address:
01
(Address of the flow meter)Function Code:
31
(Write command)Starting Address of Data to Write:
02 83
(Memory address for C04 Dosing Target (64))Data to Write:
00 00 00 00 00 BC 61 FF
(Data for C04 Dosing Target (64))CRC:
1E F5
(Error-checking code calculated using the CRC algorithm)
Last updated