12.07.2015 Views

Modbus Protocol for ION 7500, ION 7600 and ION 8000 series

Modbus Protocol for ION 7500, ION 7600 and ION 8000 series

Modbus Protocol for ION 7500, ION 7600 and ION 8000 series

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>Modbus</strong> Register MapPseudocode For CRC-16 GenerationPseudocode For CRC-16 GenerationFor users familiar with computer programming, the following is the pseudocode<strong>for</strong> calculating the 16-bit Cyclic Redundancy Check.Initialize a 16-bit register to FFFF HexInitialize the generator polynomial to A001 HexFOR n=1 to # of bytes in packetBEGINXOR nth data byte with the 16-bit registerFOR bits_shifted = 1 to 8BEGINSHIFT 1 bit to the rightIF (bit shifted out EQUAL 1)XOR generator polynomial with the 16-bit register<strong>and</strong> store result in the 16-bit registerENDENDThe resultant 16-bit register contains the CRC-16 checksum.Page 25

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!