Skip to main content
Skip table of contents

CRC calculation

This page explains how to obtain the proper CRC value of the MCB protocol.

CRC description (CRC-CCITT "XMODEM")

ParameterValue
Width16 bits
Polynomial0x1021
Initial value (seed)0x0000

Example

The example consist in a write command to the position set-point parameter and a read command on the velocity actual value. 

CRC calculation on SPI based protocols (transfer done in word size)

Simple write example

Write access to register 0x20 (position set-point) with a value of 100000

HeaderConfig dataCRC
AddressCommandPending frame
0x0200b01000x186A00xA2C7
0x0204186A0000000000000A2C7

Successful reply

HeaderConfig dataCRC
AddressCommandPending frame
0x0200b01100x00xB5D8
0x02060000000000000000B5D8

Simple read example

Read access to register 0x31 (velocity actual) with a value of 1000.0

HeaderConfig dataCRC
AddressCommandPending frame
0x0100b001000x6758
0x031200000000000000006758

Successful reply

HeaderConfig dataCRC
AddressCommandPending frame
0x0100b01100x447A00000x919D
0x03160000447A00000000919D

CRC calculation on other protocols (transfer done in byte size)

Simple write example

Write access to register 0x20 (position set-point) with a value of 100000

Node IDHeaderConfig dataCRC
AddressCommandPending frame
0x00010x0200b01000x186A00xA1B2
0x01000402A086010000000000B2A1

Successful reply

Node IDHeaderConfig dataCRC
AddressCommandPending frame
0x00010x0200b01100x00xB6AD
0x010006020000000000000000ADB6

Simple read example

Read access to register 0x31 (velocity actual) with a value of 1000.0

Node IDHeaderConfig dataCRC
AddressCommandPending frame
0x00010x0310b001000x642D
0x0100120300000000000000002D64

Successful reply

Node IDHeaderConfig dataCRC
AddressCommandPending frame
0x00010x0310b01100x44A00000x92E8

0x0100160300007A4400000000E892


JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.