background image

Page   12                                                                                           KKAI808PE01-A/0-20130904

unsigned int Get_CRC(uchar *pBuf, uchar num) 
{
        unsigned i,j;   
 

unsigned int wCrc = 0xFFFF; 

 

for(i=0; i<num; i++) 

 


 

wCrc ^= (unsigned int)(pBuf[i]); 

 

for(j=0; j<8; j++) 

 

 

 

 

 

if(wCrc & 1){wCrc >>= 1; wCrc ^= 0xA001; } 

 

 

 

else 

 

 

 

 

wCrc >>= 1;   

 

 

 

              return wCrc; 
}

16 digit CRC verify program

Summary of Contents for AI808P Series

Page 1: ...e or modify the product If you have to do so please contact with us first Otherwise it may cause electric shock and fire 5 Please check the connection number while you connect the power supply wire or...

Page 2: ...ly to relay output power supply to signal input relay output to signal input 2000VDC Between the low voltage signal isolated with each other 600VDC 3 Main Technical Parameters Dielectric strength AI80...

Page 3: ...ight AL2 AL2 Indicating Light SET Function Key OUT1 OUT1 Indicating Light Shift Function Key No 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 Increase Key Decrease Key AL3 AL3 Indicating Light AT Auto turn...

Page 4: ...rol setting method 1 There are total 50 programmable segments For each segment there are 2 settable parameters SV ST 2 SV value is the object control value of a segment for example if SV 01 is 200 the...

Page 5: ...LD three status in this segment Example Here is a control process with below requirement the relevant setting is on the right side 1 Temperature raise to 300 SV01 300 ST01 0 2 Temperature raise from 3...

Page 6: ...m PV AL Cancel PV AL HY Alarm PV AL Cancel PV AL HY Alarm PV AL SV Cancel PV SV AL HY Alarm PV SV AL Cancel PV SV AL HY Absolute upper limit alarm Absolute Lower limit alarm Upper Limit deviation alar...

Page 7: ...e host computer read the float number AL1 The value of Alarm 1 is 15 4 The address code of AL1 is 0x0000 for AL1 is float number 4bits it will occupy 2 data register Reference IEEE 574 standard the he...

Page 8: ...ss Lo 0x10 6 1 x 0 2 0 x 0 0 0 x 0 0x04 0xFD Data 1 Hi Data 1 Lo Data 2 Hi Data 2 Lo CRC Hi CRC Hi 0x00 0x00 0x44 0x00 0x00 0xFC Correct answer from slave unit Read Multiple Registers 1 2 3 4 5 6 7 8...

Page 9: ...ection setting value SV3 The 3 section status setting value ST3 The 4 section setting value SV4 The 4 section status setting value ST4 The 5 section setting value SV5 The 5 section status setting valu...

Page 10: ...section setting value SV21 The 22 section setting value SV22 The 23 section setting value SV23 The 24 section setting value SV24 The 25 section setting value SV25 The 26 section setting value SV26 The...

Page 11: ...tting value SV45 The 46 section status setting value ST46 The 46 section setting value SV46 The 47 section status setting value ST47 The 47section setting value SV47 The 48 section status setting valu...

Page 12: ...20130904 unsigned int Get_CRC uchar pBuf uchar num unsigned i j unsigned int wCrc 0xFFFF for i 0 i num i wCrc unsigned int pBuf i for j 0 j 8 j if wCrc 1 wCrc 1 wCrc 0xA001 else wCrc 1 return wCrc 16...

Reviews: