EasyManuals Logo

TECO JSDAP-100A3 User Manual

TECO JSDAP-100A3
255 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #223 background imageLoading...
Page #223 background image
7-15
CRC Checking:
CRC check code is from Slave Address to end of the data. The calculation method is
illustrated as follow:
(1) Load a 16-bit register with FFFF hex (all1’s). Call this the CRC register.
(2) Exclusive OR the first 8-bit byte of the message with the low-order byte of the 16-bit
CRC register, putting the result in the CRC register.
(3) Shift the CRC register one bit to the right (toward the LSB), Zero-filling the MSB,
Extract and examines the LSB.
(4) (If the LSB was 0): Repeat Steps (3) (another shift) (If the LSB was 1):
Exclusive OR the CRC register with the polynomial value A001 hex (1010 0000
0000 0001).
(5) Repeat Steps (3) and (4) until 8 shifts been performed. When this is done, a complete
8-bit byte will be processed.
(6) Repeat Steps (2) through (5) for next 8-bit byte of the message, Continue doing this
until all bytes have been processed. The final content of the CRC register is the CRC value.
Placing the CRC into the message:
When the 16-bit CRC (2 8-bit bytes) is transmitted in the message, the low-order byte
will be transmitted first, followed by the high-order byte, For example, if the CRC value
is 1241 hex, the CRC-16 (Low) put the 41h, the CRC-16 (Hi) put the 12h.
Example :
An example of a C language function performing CRC generation is shown on the following
pages. All of the possible CRC values are preloaded into two arrays, which are simply indexed
as the function increments through the message buffer. One array contains all of the 256
possible CRC values for the high byte of the 16-bit CRC field, and the other array contains all
of the values for the low byte.
Indexing the CRC in this way provides faster execution than would be achieved by calculating a
new CRC value with each new character from the message buffer.
Note
This function performs the swapping of the high/low CRC bytes internally. The bytes are
already swapped in the CRC value that is returned from the function.
Therefore the CRC value returned from the function can be directly placed into the message for
transmission.
The function takes two arguments:
unsigned char *puchMsg ; A pointer to the message buffer containing binary data
to be used for generating the CRC
unsigned short usDataLen ; The quantity of bytes in the message buffer.
The function returns the CRC as a type unsigned short.

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the TECO JSDAP-100A3 and is the answer not in the manual?

TECO JSDAP-100A3 Specifications

General IconGeneral
BrandTECO
ModelJSDAP-100A3
CategoryServo Drives
LanguageEnglish

Related product manuals