High Performance Universal Converter User Manual Chapter VII Modbus Communication Protocol
— 57 —
posterior
give an example:
Host send: 01 08 00 00 12 34 ED 7C
Frequency converter response: 01 08 00 00 12 34 ED 7C
0x08 command code, write 0x1234 to 0X0000 address. The frequency converter response is exactly the same
content.
A.6. C R C calibration
Considering the need to improve the speed, CRC-16 is usually implemented in a tabular way. The following is
the implementation C language source code of CRC-16, noting that the final result has been exchanged with high
and low bytes, that is, the result is the CRC checksum to be sent:
Uint16 CRC16(const Uint16 *data, Uint16 len)
{
Uint16 crcValue = 0xffff;
Uint16 i;
while (len--)
{
crcValue ^= *data++;
for (i = 0; i <= 7; i++)
{
if (crcValue & 0x0001)
{
crcValue = (crcValue >> 1) ^ 0xa001;
}
else
{
crcValue = crcValue >> 1;
}
}
}
return (crcValue);
}
A.7 Register address
The register address is 16 bit data, 8 higher indicates the functional code group number, and 8 lower
indicates the serial number within the group. In function code register writing, to avoid memory damage, the high
level of the register address indicates whether EEPROM is stored, the highest bit is 0x8000 indicates memory
EEPROM, and 0 indicates only RAM left. For example: to 00-02 function code write operation, 0x 0002 means write
RAM power does not save; 0x 8002 means write EEPROM power save.
14-07 Select two compatible mailing address protocols, 0 is the 380 address mode, and 1 is the GD address
mode.
The Register address table is as follows: