Communications Reference Information
Appendix B
This section shows how the inverter protocol computes defines a
Frame format
STX Node Command Data BCC [CR]
|
|
|
|
|
|
| ASCII Code | |
|
|
|
|
|
|
| ||
|
|
|
|
|
|
| (0x | 02) |
|
|
|
|
|
|
| ||
|
|
|
|
|
| 0 1 | (0x | 30 31) |
|
|
|
|
| ||||
|
|
|
|
|
| 0 1 | (0x | 30 31) |
|
|
|
| |||||
|
|
|
|
|
| 0 0 0 5 0 0 | (0x | 30 30 30 35 30 30) |
|
|
| ||||||
|
|
|
|
|
| 0 | (0x | 30 35) |
|
| |||||||
|
|
|
|
|
|
| (0x | 0D) |
|
|
|
|
|
|
|
The block check code is computed by using the ASCII codes (shown above) and applying eXclusive OR (XOR) operations. Beginning with the first pair of bytes, the result of their XOR result is then used in an XOR operation with the third byte, and so on. For this example, the BCC calculation is shown below.
Data bytes: |
|
|
|
|
|
|
|
| |
3 0 | 3 1 | 3 0 | 3 1 | 3 0 | 3 0 | 3 0 | 3 5 | 3 0 | 3 0 |
0 1
3 1
|
|
|
|
| XOR |
0 0 |
|
| |||
|
|
| intermediate results | ||
|
|
|
|
| |
|
| ||||
|
|
|
|
|
|
|
| 3 0 |
|
| |
|
|
|
|
0 0
3 0
0 5
3 5
0 5 BCC
ASCII Code Table The table below shows only the ASCII codes used for function codes and parameter data.
| Character | ASCII Code | Character | ASCII Code | Character | ASCII Code |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| STX | 0 2 | 4 | 3 4 | C | 4 3 |
|
|
|
|
|
|
|
|
|
| ACK | 0 6 | 5 | 3 5 | D | 4 4 |
|
|
|
|
|
|
|
|
|
| CR | 0 D | 6 | 3 6 | E | 4 5 |
|
|
|
|
|
|
|
|
|
| NAK | 1 5 | 7 | 3 7 | F | 4 6 |
|
|
|
|
|
|
|
|
|
| 0 | 3 0 | 8 | 38 | H | 4 8 |
|
|
|
|
|
|
|
|
|
| 1 | 3 1 | 9 | 39 | P | 5 0 |
|
|
|
|
|
|
|
|
|
| 2 | 3 2 | A | 4 1 | — | — |
|
|
|
|
|
|
|
|
|
| 3 | 3 3 | B | 4 2 | — | — |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|