Instruction manual
5
(2) Reading command
(Fig. 5.2-2)
(3) Response with data
(Fig. 5.2-3)
(4) Acknowledgement
(Fig. 5.2-4)
(5) Negative acknowledgement
(Fig. 5.2-5)
Header : Control code to represent the beginning of the command or the response
ASCII codes are used.
Setting command, Reading command : STX(02H) fixed
Response with data, Acknowledgement : ACK(06H) fixed
Negative acknowledgement : NAK(15H) fixed
Address : Numbers by which the master discerns each slave.
Instrument number 0 to 94 (00H to 5EH) and Global address 95 (5FH)
The numbers (20H to 7EH) are used by giving 20H of bias.
95 (7FH) is called Global address, which is used when the same command
is sent to all the slaves connected. However, a response is not returned.
Sub address : (20H) fixed
Command type : Code to discern Setting command (50H) and Reading command (20H)
Data item : Data classification of the command object
Composed of hexadecimal 4 digits (Refer to the Communication command table)
Data : The contents of data (setting value) differs depending on the setting command.
Composed of hexadecimal 4 digits (Refer to the Communication command table)
Checksum : 2-character data to detect communication errors
Delimiter : Control code to represent the end of command
(03H) fixed
Error code : Represents an error type. Composed of hexadecimal 1 digit.
1 (31H)-----Non-existent command
2 (32H)-----Not used
3 (33H)-----Setting value outside the setting range
4 (34H)-----Status unable to set (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 the 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 2-digits of the total value are converted to 2’s complements and then to hexadecimal
figures, that is, ASCII code for the checksum.
Checksum calculation example
Pattern 1, Step 1, step SV: 600
(0258H)
Address (instrument number): 0 (20H)
• 1’s complement: Make each bit of binary 0 and 1 reverse.
• 2’s complement: Add 1 to 1’s complement.
11 14 121
Command
type (20H)
Data
item
Checksum
Delimiter
(03H)
Header
(02H)
Number of
characters
Sub
address
(20H)
Address
11 14 1241
Command
type (20H)
Data
item
Checksum
Delimiter
(03H)
Header
(06H)
Data
Number of
characters
Address
Sub
address
(20H)
11 12
Address Checksum
Delimiter
(03H)
Header
(06H)
Number of
characters
11 2 11
Address Checksum
Delimiter
(03H)
Header
(15H)
Error
code
Number of
characters