Appendix a: little and big endians, Appendix a – ElmoMC CANopen DS 301 Implementation Guide User Manual
Page 118

Appendix A: Little and Big Endians
The “end” in “endians” refers to the address of the most significant or least significant
byte in a multiple-byte data type (such as short, long or float). The address of big endians
is the most significant byte (the “big” end) while the address of little endians is the least
significant byte (the “little” end).
Example using standard C conventions:
long lType;
short sType[2]
char cType[5] = “ABCD”;
lType = 0x12345678;
sType[1] = 0x1234 ;
sType[2] = 0x5678 ;
Memory structure: big endians (starts with MSB):
00 08
12 34 56 78 - lType
12 34 56 78 - sType
AB CD 0 - cType
Memory structure: little endians (starts with LSB):
00 08
78 56 34 12 - lType
34 12 78 56 - sType
AB CD 0 - cType
The CANopen protocol supports the little endian method; for example, a node replies to
a TPDO with three objects:
Object 1: Signed24 - 0x12ABCD
Object 2: Unsigned32 - 0x123456AB
Object 3: Unsigned8 - 0x1F
The CAN octet will be as follows:
CD AB 12 AB 56 34 12 1F
CANopen DS 301 Implementation Guide
Initial CAN Communication Setup
MAN-CAN301IG (Ver. 2.1)
A-1
- Gold Line Digital Servo Drives-Gold Bell (84 pages)
- Gold Line Digital Servo Drives-Gold DC Bell (61 pages)
- Gold Line Digital Servo Drives-Gold Whistle (85 pages)
- Gold Line Digital Servo Drives-Gold Solo Whistle (61 pages)
- Gold Line Digital Servo Drives-Gold Drum Ver 1_400 D-Sub connectors (67 pages)
- Gold Line Digital Servo Drives-Gold Drum Ver 1_400 RJ-45 connectors (67 pages)
- Gold Line Digital Servo Drives-Gold DC Whistle (61 pages)
- Gold Line Digital Servo Drives-Gold Drum HV (102 pages)
- Gold Line Digital Servo Drives-Gold Duo (59 pages)
- Gold Line Digital Servo Drives-Gold Solo Whistle Cable Kit (16 pages)
- Gold Line Digital Servo Drives-Gold Drum Cable Kit RJ-45 connectors (17 pages)
- Gold Line Digital Servo Drives-Gold DC Whistle Cable Kit (13 pages)
- Gold Line Digital Servo Drives-Gold Drum HV Cable Kit (18 pages)
- Gold Line Digital Servo Drives-Gold Duo Cable Kit (12 pages)
- Gold Line Digital Servo Drives-Gold Guitar (84 pages)
- Gold Line Digital Servo Drives-Gold Solo Guitar (65 pages)
- Gold Line Digital Servo Drives-Gold Cello (59 pages)
- Gold Line Digital Servo Drives-Gold Trombone (92 pages)
- Gold Line Digital Servo Drives-Gold Solo Trombone (110 pages)
- Gold Line Digital Servo Drives-Gold DC Trombone (69 pages)
- Gold Line Digital Servo Drives-Gold Tuba (81 pages)
- Gold Line Digital Servo Drives-Gold Bassoon (66 pages)
- Gold Line Digital Servo Drives-Gold Solo Guitar Cable Kit (12 pages)
- Gold Line Digital Servo Drives-Gold Cello Cable Kit (15 pages)
- Gold Line Digital Servo Drives-Gold Solo Trombone Cable Kit (16 pages)
- Gold Line Digital Servo Drives-Gold DC Trombone Cable Kit (15 pages)
- Gold Line Digital Servo Drives-Gold Tuba Cable Kit (20 pages)
- Gold Line Digital Servo Drives-Gold Bassoon Cable Kit (16 pages)
- ExtrIQ Gold Line Servo Drives-Gold Hornet (88 pages)
- ExtrIQ Gold Line Servo Drives-Gold Solo Hornet (90 pages)
- ExtrIQ Gold Line Servo Drives-Gold Eagle (68 pages)
- ExtrIQ Gold Line Servo Drives-Gold Hawk (90 pages)
- ExtrIQ Gold Line Servo Drives-Gold Panther (64 pages)
- ExtrIQ Gold Line Servo Drives-Gold Tiger (64 pages)
- Multi-Axis Motion Controller-Gold Maestro (32 pages)
- SimplIQ Digital Servo Drives-Bell Installation Guide (57 pages)
- SimplIQ Digital Servo Drives-Bell Getting Started (94 pages)
- SimplIQ Digital Servo Drives-Bell Command Reference (315 pages)
- SimplIQ Digital Servo Drives-Bell Evaluation Board User Guide (93 pages)
- SimplIQ Digital Servo Drives-Tweeter Installation Guide (71 pages)
- SimplIQ Digital Servo Drives-Whistle DC Installation Guide (75 pages)
- SimplIQ Digital Servo Drives-Whi-Solo Installation Guide (69 pages)
- SimplIQ Digital Servo Drives-Whi-Solo Cable Kit (10 pages)
- SimplIQ Digital Servo Drives-Whi-Duo Installation Guide (69 pages)
- SimplIQ Digital Servo Drives-Whi-Trio Installation Guide (62 pages)