GD200A series VFD
Communication protocol
-131-
int i;
unsigned int crc_value=0xffff;
while(data_length--)
{ crc_value^=*dat+;
for(i=0;i<8;i++)
{
if(crc_value&0x0001)crc_value=(crc_value>>1)^0xa001;
else crc_value=crc_value>>1;
} }
return(crc_value);
}
In ladder logic, CKSM calculated the CRC value according to the frame with the table inquiry. The
method is advanced with easy program and quick calculation speed. But the ROM space the
program occupied is huge. So use it with caution according to the program required space.
9.4 RTU command code and communication data illustration
9.4.1 RTU mode
9.4.1.1 Command code: 03H
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. 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 step of the VFD.
For example, read continuous 2 data content from0004H from the VFD with the address of 01H
(read the content of data address of 0004H and 0005H), the frame structure is as below:
RTU master command message (from the master to the VFD)
START
T1-T2-T3-T4 (transmission time of 3.5 bytes)
ADDR
01H
CMD
03H
High bit of the start address
00H
Low bit of the start address
04H
High bit of data number
00H
Low bit of data number
02H
CRC low bit
85H
CRC high bit
CAH
END
T1-T2-T3-T4 (transmission time of 3.5 bytes)
Содержание GD200A-004G-4
Страница 1: ......
Страница 182: ...6 6 0 0 1 0 0 3 4 2 202103 V2 6...