KROHNE MFC 010 C Converter User Manual
Page 93
MFC010 Interface Manual
91
unsigned short Calculate_Checksum (unsigned char uc_Telegram_Length, unsigned short *Buffer_Pointer )
{
// Declare Local Variables
unsigned char uc_Byte_Loop;
unsigned char uc_Bit_Loop;
unsigned short us_Temporary_Checksum;
// Initialise the checksum value
unsigned short us_Checksum = 0xFFFF;
// Loop through each byte of the telegram Buffer
for (uc_Byte_Loop = 0; uc_Byte_Loop < uc_ Telegram_Length; uc_Byte_Loop++)
{
// XOR the newly indexed buffer location with the current value of the checksum
us_Checksum ^= (*(Buffer_Pointer + uc_Byte_Loop) & 0x00FF);
// Perform an 8 bit rotation and Polynomial addition on the checksum
for(uc_Bit_Loop = 0; uc_Bit_Loop < 8; uc_Bit_Loop++)
{
// Store the current value of the checksum in a temporary local variable
us_Temporary_Checksum = us_Checksum;
// Right shift the Checksum by one bit
us_Checksum >>= 1;
// Was the first bit of he checksum set?
if (us_Temporary_Checksum & 0x0001)
{
// If so, XOR the Checksum with the Polynomial value
us_Checksum ^= 0xA001;
}
}
}
// Return the calculated checksum result
return us_Checksum;
}
- BATCHFLUX 5500 C Quickstart EN (20 pages)
- IFC 050 Converter Quickstart EN (28 pages)
- IFC 100 Converter Quickstart EN (32 pages)
- IFC 300 Converter Quickstart EN (68 pages)
- OPTIFLUX 1000 Quickstart EN (20 pages)
- OPTIFLUX 2000 Quickstart EN (24 pages)
- OPTIFLUX 4000 Quickstart EN (24 pages)
- OPTIFLUX 4040C Quickstart EN (16 pages)
- OPTIFLUX 5000 Flange Quickstart EN (20 pages)
- OPTIFLUX 5000 Sandwich Quickstart EN (20 pages)
- OPTIFLUX 6000 Quickstart EN (28 pages)
- OPTIFLUX 7300 Quickstart EN (24 pages)
- OPTIPROBE Quickstart EN (16 pages)
- TIDALFLUX 2300 F EN (44 pages)
- TIDALFLUX 2300 F Quickstart EN (24 pages)
- WATERFLUX 3000 EN (40 pages)
- WATERFLUX 3000 Quickstart EN (24 pages)
- WATERFLUX 3070 EN (80 pages)
- WATERFLUX 3070 Quickstart EN (32 pages)
- USB ADAPTER PLUS EMF EN (16 pages)
- IFC 050 Converter Modbus EN (20 pages)
- IFC 100 Converter FOUNDATION FIELDBUS EN (64 pages)
- IFC 100 Converter Modbus EN (20 pages)
- IFC 300 Converter FOUNDATION FIELDBUS EN (60 pages)
- IFC 300 Converter HART 0102 EN (20 pages)
- IFC 300 Converter HART 0201 EN (23 pages)
- IFC 300 Converter Modbus EN (24 pages)
- IFC 300 Converter PROFIBUS PA DP EN (40 pages)
- OPTIFLUX 2000-4000 IECEx EN (16 pages)
- OPTIFLUX 2000-4000-5000-6000-7300-IFC 300 Ex EN (40 pages)
- OPTIFLUX 2000-4000-5000-6000 -IFC 100 Ex EN (24 pages)
- OPTIFLUX 4040 C Ex EN (20 pages)
- OPTIFLUX x300 Ex Zone2 EN (1 page)
- H250 M9 ES EN (36 pages)
- VA 40-VA 45 EN (36 pages)
- H250 M10 ATEX II2G Ex d EN (16 pages)
- H250 M10 ATEX II3D Ex t EN (16 pages)
- H250 M40 ATEX II2D Ex t-II2G Ex d EN (20 pages)
- H250 M40 ATEX II2G Ex i EN (20 pages)
- H250 M40 ATEX II3G Ex nA EN (20 pages)
- H250 M40 Ex II2G Reed EN (2 pages)
- H250 M9 ATEX II2G Ex i EN (16 pages)
- H250 M9S ATEX II3D Ex t-II3G Ex nA EN (20 pages)
- M8E Converter HART 0101 EN (13 pages)
- DK 32-DK 34 ATEX II2G Ex i EN (16 pages)