- -
HLP-C
+
Inverters
Quiet ADDR FUNC LEN
D
(n-1)
~D
(0)
CRC
Quiet
>50ms
>50ms
Length set: when one word, LEN=3
,
when one byte or
<
1byte,
LEN=2
。
⑸
DATA
:
<Data characters> data content. 2n ASCII compose
n bytes, it have fifty ASC
Ⅱ
at most.
⑹
LRC
:
longitudinal redundancy check
ASCII mode: Get LRC methods is that add ADDR to the last
data, if the result is more than 256,then the result subtract 256
until the result is less then 256 (if the result is 128H, take 28H),
then 100H subtract the result get LRC.
⑺
For example: write 30.00Hz to inverter of 01
(
write to C000
)
STX ADDR FUNC LEN
DATA
LRC
END
“:”
“0”
“1”
“0”
“2”
“0”
“2”
“0”“0”“0”
“B”“HB”“8”
“3”
“7”
“CR”
“LF”
3AH
30H
31H
30H
32H
30H
33H
30H 30H 30H
42H 42H 38H
33H
37H
0DH
0AH
Calculate LRC: 01H+02H+03H+00H+0BH+B8H=C9H
C9H subtracted from 100H: 37H
So the sent data is following
:
3AH 30H 31H 30H 32H 30H 33H
30H 30H 30H
42H 42H 38H 33H 37H 0DH 0AH
3.2 RTU Mode
⑴
Quiet: the time of no data is more than 50 ms
⑵
ADDR
:
Communication address, 8-bit data
⑶
FUNC
:
Function code, 8-bit data, refers to 3.1-3
⑷
LEN
:
Data length, the length of D
(
n-1
)
~D0
⑸
DATA
:
data content, n*8-bit
⑹
LRC
:
Longitudinal Redundancy Check
RTU mode: get CRC
(
cyclical Redundancy Check
)
.
The CRC calculation method is following:
⑴
make a 16-bit register and set value 0FFFFH(call CRC
register)
⑵
done first byte of data Exclusive OR with low byte of 16-bit