|
|
|
| Chapter 5 | ||
RTU mode: |
|
|
|
|
| |
| Command message: |
|
| Response message: |
|
|
| ADR | 01H |
| ADR | 01H |
|
| CMD | 03H |
| CMD | 03H |
|
| Starting data | 21H |
| Number of data | 04H |
|
| address | 02H |
| (count by byte) |
| |
|
|
|
| |||
| Number of data | 00H |
| Content of address | 17H |
|
| (count by word) | 02H |
| 2102H | 70H |
|
| CRC CHK Low | 6FH |
| Content of address | 00H |
|
| CRC CHK High | F7H |
| 2103H | 00H |
|
|
|
|
| CRC CHK Low | FEH |
|
|
|
|
| CRC CHK High | 5CH |
|
(2) 06H: single write, write single data to register.
Example: writing data 6000(1770H) to register 0100H. AMD address is 01H.
ASCII mode:
Command message:
STX | ‘:’ | |
ADR 1 | ‘0’ | |
ADR 0 | ‘1’ | |
CMD 1 | ‘0’ | |
CMD 0 | ‘6’ | |
| ‘0’ | |
Data address | ‘1’ | |
‘0’ | ||
| ||
| ‘0’ | |
| ‘1’ | |
Data content | ‘7’ | |
‘7’ | ||
| ||
| ‘0’ | |
LRC CHK 1 | ‘7’ | |
LRC CHK 0 | ‘1’ | |
END 1 | CR | |
END 0 | LF |
Response message:
STX | ‘:’ | |
ADR 1 | ‘0’ | |
ADR 0 | ‘1’ | |
CMD 1 | ‘0’ | |
CMD 0 | ‘6’ | |
| ‘0’ | |
Data address | ‘1’ | |
‘0’ | ||
| ||
| ‘0’ | |
| ‘1’ | |
Data content | ‘7’ | |
‘7’ | ||
| ||
| ‘0’ | |
LRC CHK 1 | ‘7’ | |
LRC CHK 0 | ‘1’ | |
END 1 | CR | |
END 0 | LF |
RTU mode:
Command message: | Response message: |
|
ADR | 01H | |
CMD | 06H | |
Data address | 01H | |
00H | ||
| ||
Data content | 17H | |
70H | ||
| ||
CRC CHK Low | 86H | |
CRC CHK High | 22H |
(3) Command code: 10H, write n word, n<=12
ADR | 01H | |
CMD | 06H | |
Data address | 01H | |
00H | ||
| ||
Data content | 17H | |
70H | ||
| ||
CRC CHK Low | 86H | |
CRC CHK High | 22H |
For example, writing 6000(1770H) to Pr
Revision August 2006, SE08, SW V2.61 |