Appendix I
EM12 User’s Manual
124
is exclusive ORed with the register contents. Then the result is shifted in the direction of the least significant bit
(LSB), with a zero filled into the most significant bit (MSB) position. The LSB is extracted and examined. If the
LSB was a 1, the register is then exclusive ORed with a preset, fixed value. If the LSB was a 0, no exclusive OR
takes place. This process is repeated until eight shifts have been performed. After the last (eighth) shift, the next
eight-bit byte is exclusive ORed with the register's current value, and the process repeats for eight more shifts as
described above. The final contents of the register, after all the bytes of the message have been applied, is the
CRC value.
When the CRC is appended to the message, the low-order byte is appended first, followed by the high-order byte.
unsigned int crc_chk_value(unsigned char *data_value,unsigned char length
{
unsigned int crc_value=0xFFFF;
int i;
while(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);
}
Definition of communication parameter address
Read and write function-code parameters (Some functional code is not changed, only for the manufacturer use.)
The group number and mark of function code is the parameter address for indicating the rules.
High level bytes: Group A0~AF(GroupA0-A2/ Groupb0-bC), Groupb0-bF(Group C0-C6/Groupd0-d6),
70-7F(Group U)
Low level bytes: 00 to FF
For example: b0-03, address indicates to 0xA303.
Note:
Group U: Only for reading parameter, cannot be changed parameters, some parameters cannot be changed
during operation, some parameters regardless of what kind of state the inverter in, the parameters cannot be
changed. Change the function code parameters, pay attention to the scope of the parameters, units, and relative
instructions.
Содержание EM12 Series
Страница 5: ......