7
Delimiter: Control code to represent the end of command.
ASCII code ETX (03H) fixed
Error code: Represents an error type using ASCII.
Error Code Contents
1 (31H) Non-existent command
2 (32H) Not used
3 (33H) Setting outside the setting range
4 (34H) Status unable to be written (e.g. AT is performing.)
5 (35H) During setting mode by keypad operation
5.3 Checksum Calculation
Checksum is used to detect receiving errors in the command or data.
Set the program for the master side as well to calculate the checksum of the response data from the
slaves so that communication errors can be checked.
The ASCII code (hexadecimal) corresponding to the characters which range from the address to that
before the checksum is converted to binary notation, and the total value is calculated.
The lower one byte of the total value is converted to 2’s complement, and then to hexadecimal
numbers, that is, ASCII code for the checksum.
• 1’s complement: Reverse each binary bit. 0 will become 1 and vice versa.
• 2’s complement: Add 1 to 1’s complement.
[Example of checksum calculation]
Write SV1 (0001H) to 600 (0258H). See (Fig. 5.3-1).
Address (instrument number): 0 (20H)
(Fig. 5.3-1)
20H
20H
50H
30H
30H
30H
31H
30H
32H
35H
38H
0010 0000
0010 0000
0101 0000
0011 0000
0011 0000
0011 0000
0011 0001
0011 0000
0011 0010
0011 0101
0011 1000
+
10 0010 0000
[Hexadecimal] [Binary]
1101 1111
1
+
1110 0000
E 0
45H
30H
[1's complement]
[2's complement]
[Hexadecimal]
[ASCII]
Checksum
STX ETX
P 0 0 0 1 0 2 5 8
02H 20H 20H 50H 30H 30H 30H 31H 30H 32H 35H 38H 03H
[Characters above are represented in ASCII.]
Checksum
Checksum calculation range
[e.g.]
E
45H 30H
0