Chapter 8 Operation Procedures and Fault Protection
133
8
The following example of using C language to create a sample program for CRC
checksum algorithm
Example: C language sample program
unsigned char *data;
// Message pointer
unsigned char length;
// Message length
unsigned int crc_chk(unsigned char *data,unsigned char length)
{
int i;
unsigned int reg_crc=0xffff;
while(length--)
{
reg_crc^=*data++;
for(i=0;i<8;i++)
if(reg_crc&0x01)
reg_crc=(reg_crc>>1)^0xa001;
else
reg_crc=reg_crc>>1;
}
}
7-6 Processing Time of Communication Transmission
Host
Drive
Communication Starts/Resets
10ms
10ms
5ms
(Note)
Time
The communication waits for 10ms to start the communication transmission after the
drive powers on or the communication function of the drive changes. The drive
needs 5ms processing time to return the message to the host after the message are
received from the host. If the host only broadcasts to the drive, the host can start
sending the message code after 5ms.
Note:
if the message
code is to ―Read‖ or ―Write‖ the parameter, the drive needs
100ms processing time to return the message to the host.
Summary of Contents for RM6F5 series
Page 1: ...AC MOTOR DRIVE Operation Manual RM6F5 series ...
Page 194: ...Notes 194 Notes ...
Page 195: ...Notes 195 Notes ...