79
6
. Detailed settings for communications
6.3 CompoWay/F
●
Data format
In the following explanations, values preceded by H' (as in H'02) indicate hexadecimal values. Only items expressed
as normal numerals or characters indicate ASCII characters.
The numbers under the frame sections are the number of bytes.
■
Command frame
■
Example of BCC calculation
The block check character (BCC) is calculated using an exclusive OR function on each byte of the values between
the communications address and ETX, then that 8-bit data is set in the BCC section.
BCC = 30H 30H 30H 30H 30H 30H 35H 30H 33H 03H = 35H
The calculation result 35H is set in the BCC section.
Communication
address
Sub-address
SID
Command text
BCC
STX
0
0
0
ETX
Fixed Fixed Fixed
1
2
2
1
1
1
STX
This is the start code for the communication frame (H'02).
•
Make sure you set this code as the first byte.
Communication address
Specify the "communications address" of this product.
•
You can set a number between 00 and 99 or XX (upper case).
•
Specify "XX" to communicate to all at the same time.
There will be no response if this is specified however.
•
Specify the communications address between 00 and 99 (BCD). There will be no
response to any other communications address.
Sub-address
Not used for this product. Specify "00".
SID
Not used for this product. Specify "0".
Command text
This part describes the command.
ETX
Code to indicate the end of text.
•
Make sure you set the H'03 code as the end byte.
BCC
The block check character.
•
The BCC shall be the value gained from an exclusive OR (XOR) function
conducted on each byte from the communications address to ETX.
Communication
address
Sub-address
SID
Command text
ETX
BCC
02H
0(30H)
0(30H)
0(30H)
0(30H)
0(30H)
0(30H)
5(35H)
0(30H)
3(33H)
03H
35H
BCC calculation range