![FOTEK GD20-004G-2 Operation Manual Download Page 129](http://html.mh-extra.com/html/fotek/gd20-004g-2/gd20-004g-2_operation-manual_2324086129.webp)
Goodrive20 Series VFD
Communication protocol
-124-
DATA (N-1)
…
DATA (0)
Data content:
nx8-bit data content i
s formed by combination of 2n (n≤16)
ASCII codes
LRC CHK Hi
LRC check code:
8-bit check code is formed by the combination of two ASCII
codes.
LRC CHK Lo
END Hi
End character:
END Hi=CR (0x0D), END Lo=LF (0x0A)
END Lo
7.2.3.1 ASCII mode check (LRC Check)
Check code (LRC Check) is the value combined of address and data content result. For
instance,
the
check
code
of
above
2.2.2
communication
message
is:
0x02+0x06+0x00+0x08+0x13+0x88=0xAB, then take the compliment of 2=0x55.
The following example is a simple LRC calculation function for your reference (using the C
programming language):
Static unsigned char
LRC(auchMsg,usDataLen)
unsigned char *auchMsg;
unsigned short usDataLen;
{
unsigned char uchLRC=0;
while(usDataLen--)
=*+;
return((unsigned char)(
–((char)uchLRC)));
}
7.3 Command code and communication data
7.3.1 RTU mode
7.3.1.1 Command code 03H (corresponding to binary 0000 0011), read N words (Word)
(N
≤16)
Command code 03H means that if the master read data from the VFD, the reading number
depends on the "data number" in the command code. The max continuous reading number is
16 and the parameter address should be continuous. The byte length of every data is 2 (one
word). The following command format is illustrated by hex (a number with "H" means hex) and
one hex occupies one byte.
The command code is used to read the working state of the VFD.
Summary of Contents for GD20-004G-2
Page 1: ......
Page 171: ...6 6 0 0 7 0 0 9 5 7 ...