SAMWONTECH
1th Edition of TEMP2000_Series IM : Dec. 15. 2008 Page 23 / 63
6.6 Function code - 16
Function code-16 is used to write the data into consecutive D-Register block in sequence up to 64 registers.
▣
Request Message Frame
Factor
ASCII
RTU
Protocol Header
:(Colon)
-
Slave address
2 characters
8-Bit
Function code-16
2 characters
8-Bit
D-Register Hi
2 characters
8-Bit
D-Register Lo
2 characters
8-Bit
Address Count Hi
2 characters
8-Bit
Address Count Lo
2 characters
8-Bit
Data byte Count
2 characters
8-Bit
Data - 1 Hi
2 characters
8-Bit
Data - 1 Lo
2 characters
8-Bit
…
…
…
Data - n Hi
2 characters
8-Bit
Data - n Lo
2 characters
8-Bit
Error detecting
2 characters
-
Protocol Tail
2 characters (CR+LF)
16-Bit
◈
Example
Request message to write ‘99’ to the D0115(TEMI.OP_H) and ‘50’ to the D0116(TEMI.OP_M) on FIX mode
operation should be
- MODBUS ASCII
:0110007200020400630032E2[cr][lf]
- MODBUS RTU
01100072000204006300320499
▣
Response Message Frame
Factor
ASCII
RTU
Protocol Header
:(Colon)
-
Slave address
2 characters
8-Bit
Function code-16
2 characters
8-Bit
D-Register Hi
2 characters
8-Bit
D-Register Lo
2 characters
8-Bit
Address Count Hi
2 characters
8-Bit
Address Count Lo
2 characters
8-Bit
Error detecting
2 characters
16-Bit
Protocol Tail
2 characters (CR+LF)
-
◈
Example
Without any trouble, response message will be.
- MODBUS ASCII
:0110007200027B[cr][lf]
- MODBUS RTU
011000720002E1D3