Chapter8 Communication Function
8-10
Remark
1)
Numerical data of frame(Ex.) is hex value, and "H" is unnecessary during preparing real frame.
2)
Device data type of each must be same. If data type of the first block is WORD, and the second block is
BIT, error occurs.
(3) Response format (ACK response)
Format name
Header
Station
No.
Command
Command
type
Number of
blocks
Number
of data
data
Tail
Frame
check
Ex. of frame
ACK
H20
R(r)
SS
H01
H02
HA9F3
......
ETX
BCC
ASCII value
H06
H3230
H52(72)
H5353
H3031
H3032
H41394633
H04
1 block( max. 16 blocks possible)
Item
Explanation
BCC
When command is lowercase(r), only one lower byte of the value resulted by adding 1 Byte
each to ASCII values from ACK to ETX is converted into ASCII and added to BCC, and
sent.
Number of data
Number of data means byte number of hex type, and is converted into ASCII. This number
is determined according to data type(X,W) included in device name of computer request
Format.
Number of data in accordance with its data type is as follows:
Data
•
In data area, there are the values of hex data converted to ASCII code saved.
Ex.1
The fact that number of data is H04(ASCII code value:H3034) means that there is hex data of 4 bytes in data .
Hex data of 4 bytes is converted into ASCII code in data.
Data type
Available variable
Number of data
Bitl(X)
% (P,M,L,K,T,C,F)X
1
Word(W)
% (P,M,L,K,T,C,D,S,F)W
2