E5
−
H High Performance Universal Inverter User Manual
Appendix A Modbus Communication Protocol
121
◆
Register for function code characteristics of the inverter
Attached Table
−
5
Register
address
Meaning
Range
Read (R) and Write (W)
0xF080
Relative address of the
function code
See Attached Table
−
1
R/W
0xF081
Current value
0 ~ 65535
R/W
0xF082
High limit
0 ~ 65535
R
0xF083
Low limit
0 ~ 65535
R
0xF084
Factory default value of the
function code
0 ~ 65535
R
It can write the function code No. into 0xF080 by reading and writing multiple register commands 0x17
firstly and then read several attributes of this function code.
6. CRC16 Function
unsigned int crc16(unsigned char *data,unsigned char length)
{
int i,crc_result=0xffff;
while(length
−−
)
{
crc_result^=*data++;
for(i=0; i<8; i++)
{
if(crc_result&0x01)
crc_result=(crc_result>>1) ^0xa001;
else
crc_result=crc_result>>1;
}
}
return (crc_result=((crc_result&0xff) <<8) |(crc_result>>8) ) ; //Exchange CRC16 check sum and bytes at
higher and lower orders
}