ElmoMC CANopen DS 301 Implementation Guide User Manual

Page 45

Advertising
background image

Notes:
ƒ

In array commands in which the index is used (as in ET[100]), the lowest
significant bits are in byte 2 (bits 0 to 7) and the most significant bits are in
byte 3.

ƒ

Always use the bit 7 of byte 3 to indicate the data type (float or integer) in the
transmitted message, even if the numerical data type is known in advance and
given in the reference manual. This enables Elmo to guarantee that the type of
numerical data returned for any interpreter command will remain unchanged in
future versions.

Example 1:
CL[1] is set to 1.0, which is 3F800000h in hex IEEE format.
CL[1]=1.0
Byte

0 1 2 3 4 5 6 7

Hex value

43 4C 01 80 00 00 80 3F

Note: Bit 7 in byte 3 is set to 1 to indicate that the value is float.

Example 2:
AC is set to 150,000 (0249F0h):
AC=150000

Byte

0 1 2 3 4 5 6 7

Hex value

41 43 0 0 F0 49 02 0

Example 3:
AC is queried and the DLC is 4:
AC

Byte

0 1 2 3

Hex value

41 43 0 0

Example 4:
This is the same query as in Example 3, but with a DLC of 8 (“Byte 3, bit 6” note).
AC

Byte

0 1 2 3 4 5 6 7

Hex value

41 43 0 40 0 0 0 0

In both Example 3 and Example 4, the reply from the server is:

Byte

0 1 2 3 4 5 6 7

Hex value

41 43 0 0 F0 49 02 0

CANopen DS 301 Implementation Guide

Binary Interpreter Commands

MAN-CAN301IG (Ver. 2.1)

9-3

Advertising