
EC5000
-
104
-
-
105
-
MODBUS Communication Protocol
6
6.4 Definitions of Parameter Word Address
in Communication Protocol
Internal Setting
Parameters of
AC Drive
0nnnH
“nnn” means the configurable
parameter(Please refer to Appendix 1)
Bit0
0:STOP 1:RUN
Bit1
0:FWD 1:REV
Bit2
0:
Invalid 1: EF0
Bit3
0:
Invalid 1: RESET
Bit4
0: Invalid 1: DO0
Bit5
0: Invalid 1:DO1
2000H
Bit6~15
Reserved
Orders for
AC Drive
2001H
MODBUS Frequency order
(Error code):
01H=Uu1
02H=( Reserved)
03H=( Reserved)
04H=SC
05H=oC
06H=ou
07H=GF
08H=FB
09H=oH1
0AH=oH2
0BH=oL1
0CH=oL2
0DH=oL3
Monitoring of
AC Drive Status
2100H
0EH=EF0
Definition
Parameter
Word
Address
Function Description
Step 4: Check the value after right shift: if it is
“
0
”,
save
the
new
value
obtained
in
Step
3
to
CRC
register
,
or
,
Exclusive
OR
A
001
H
and
CRC
register
,
and
then
save
the
result
to
CRC
register
.
Step 5: Repeat Step 3~Step 4, finish the operation of all 8-bit;
Step 6: Repeat Step 2~Step 5, take the next 8-bit message instruction, until
all message instructions have been calculated. Finally, the CRC register value
is the check code of CRC. Note: The check code of CRC must be put in the
check code of message instruction in an exchange matter
In C language, the following function, which requires two parameters,
■
produces the CRC value.
Unsigned char data Index in message buffer
Unsigned char lengh Byte quantity in message buffer
This function returns CRC value in the form of unsigned integer.
unsigned int crc_chk(unsigned char data,unsigned char lengh)
{int j;
unsigned int reg_crc=0xffff;
while (lengh--){
reg_crc^=*data=++;
for(j=0;j<8;j++={
if
(
reg
_
crc
&0×
01)
{/*
LSB
(
b
0)=1*/
reg_crc=(reg_crc>>1)^0xa001;
}else{
reg_crc=reg_crc>>1;
}
}
}
return
reg
_
crc
;
}
EC5000
MODBUS Communication Protocol