
`
- 39 -
8.3Protocol
When the data frame arrives at the terminal equipment, it resorts to one simple "port" to access the
retrieved equipment. Such equipment will erase data frame "envelop" (data header) and read data. If there
is no error, execute the assignment required by the data. And then, it will add the generated data into the
obtained "envelop" and return the data frame to the sender. The returned response data contain contents
below: terminal slave address (Address), executed command (Function), requested data (Data) generated
by the execution command and one calibration code (Check). In case of any error, there won't be success
response or return one error instruction frame.
9.3.1
Data frame format
68H
A0 A1 A2 A3 A4 A5
68H
C
L
DI0 DI1
N1
…
Nm
CS
16H
Initial
symbol
Address field
Frame
starting
Control
code
Data
length
Data label
Data
Calibra
tion
code
End
symbol
a)
Frame initial symbol 68H
Mark beginning of one frame of data and its value is 68H
b)
Address field A0~A5
The address field is composed of 6 bytes (8 bits binary code) and each byte has 2-bit BCD code. The
address length may reach 12-bit decimal number; ACR220ELH(ACR320ELH) only uses A0 and A1,
thereinto, A0 represents low bytes of the ddress while A1 represents high bytes of the address and the
formed address scope is 1
~
247;
the address data can be randomly set in the instrument. The remaining (A2
~
A5) are fully filled by 00. Such
bits mark the user specified terminal equipment address and such equipment will receive the connected
host data. Each terminal equipment address must be unique and only the retrieved terminal will respond to
the contained address enquiry. When the terminal returns one response, the responding slave address
data tell host which terminal is conducting communication. When the address is 999999999999H, it's
broadcast address.
c)
Control code C
The function field code tells the function to be executed by the retrieved terminal. The table below
presents the function code used by the instrument series and their meanings and functions.
Code
Meaning
Action
01H
Read data
Read data from ACR220ELH/ACR320ELH
81H
Read data response
ACR220ELH/ACR320ELH
response to reading data
04H
Write data
Write data into ACR220ELH/ACR320ELH
84H
Write data response
ACR220ELH/ACR320ELH
response to writing data
C4H or C2H
Wrong response
Received data wrong
d)
Data field (data label and data) length L