beautypg.com

Examples of values within a data-frame – Campbell Hausfeld SDM-CAN User Manual

Page 61

background image

Appendix D. Examples of CAN Data
Frames and Data Encoding and
Decoding

This Appendix gives examples of typical CAN data frames with worked examples of how to
encode or decode such data using the SDM-CAN.

Bits are Transmitted (Txed) or Received (Rxed) starting from the left of the data frame.


Txed/Rxed

first

Txed/Rxed

last

64bit Data Frame

Bit order within

bytes

87654321 87654321 87654321 87654321 87654321 87654321 87654321 87654321

Byte order

Byte 1

Byte 2

Byte 3

Byte 4

Byte 5

Byte 6

Byte 7

Byte 8

Right Hand Ref

64 57

56 49

48 41

40 33

32 25

24 17

16 9

8 1

Left Hand Ref

1 8

9 16

17 24

25 32

33 40

41 48

49 56

57 64


For the Left Hand Reference, some manufacturers may number the bits in the following order:

Left Hand Ref

8 1

16 9

24 17

32 25

40 33

48 41

56 49

64 57


An additional variation is that sometimes the bit numbering starts from 0 instead of 1.

16bit Data Frame

Bit order within bytes

87654321

87654321

Byte order

Byte 1

Byte 2

Right Hand Ref

16 9

8 1

Left Hand Ref

1 8

9 16


Data encoded/decoded from right to left in all cases.


Examples of values within a data-frame

16bit data frame with a one value 16bit unsigned integer LSByte first

Rxed Bit order within bytes

87654321

87654321

Rxed Byte order

Byte 1

Byte 2

Values

A

Bit order within values

8 1

16 9

Value byte order

LSByte

MSByte

Start bit (parameter 09:) RH ref

16 9

8 1

Start bit (parameter 09:) LH ref

1 8

9 16

This number is
entered into the
P118 DLD
instruction

D-1