This command, can be used to manage CAN bus identifiers alignment format.

Synopsis

CAN USER ALIGN [<argument>]

Arguments

Argument Meaning
<none> Used to get actual alignment format.
Returns Actual LEFT or RIGHT, followed by OK.
LEFT Used to set left aligment format.
Bit are in the same order as transmitted on the CAN bus.
Returns only OK.
RIGHT Used to set right aligment format.
Bit are in the natural order.
Returns only OK.

Examples

Getting actual aligment:

CAN USER ALIGN
LEFT
OK

Setting right aligment:

CAN USER ALIGN RIGHT
OK

Notes

  1. Left alignment (default) represents the bits in the same order as they will be presented on the bus. This representation is useful to identify the priority of the identifier. Zero bits fillers are appended at least significant side (right).
  2. Right alignment represents the bits as standard numeric values. This representation is very common in documents software tools. Zero bits fillers are appended at most significant side (left).

Extracting standard part and extended part from identifiers 29 bits length :

0x18DBFEF1

1    8    D    B    F    E    F    1
0001 1000 1101 1011 1111 1110 1111 0001

00011000110110111111111011110001

--- <---11----> <-------18------->
000 11000110110 111111111011110001

Left aligment
1100 0110 110-- ----     1111 1111 1011 1100 01-- ----
C    6    C     0        F    F    B    C    4    0
C6C0:FFBC40

Right aligment
---- -110 0011 0110      ---- --11 1111 1110 1111 0001
0    6    3    6         0    3    F    E    F    1
0636:03FEF1