P
ar
t
2: C
omman
d
s
Moog Animatics SmartMotor™ Developer's Guide, Rev. L
Page 692 of 909
SDORD(...)
SDO Read
APPLICATION:
Communications control
DESCRIPTION:
Reads the value from SDO; assigns value read to a variable
EXECUTION:
Immediate
CONDITIONAL TO:
Enabled through CANCTL(17,value), see CANCTL(func-
tion,value) on page 354.
LIMITATIONS:
Does not apply to Class 6 systems.
READ/REPORT:
RSDORD
WRITE:
Read only
LANGUAGE ACCESS:
Communications control
UNITS:
N/A
RANGE OF VALUES:
N/A
TYPICAL VALUES:
N/A
DEFAULT VALUE:
N/A
FIRMWARE VERSION:
5.x.4.30 or later
COMBITRONIC:
N/A
DETAILED DESCRIPTION:
The SDORD command gets (reads) the value from the specified SDO on a specified device. It
can assign that value to a variable. To do this, use:
x=SDORD(slave addr, index, sub-index, length)
where:
slave addr is a variable such as: x, ab[x], aw[x], al[x], or a constant such as: 2 (a
motor with CAN address 2). The valid range is from 1 to 127. SDO’s cannot
be broadcast. If slave addr is to itself, then internal loopback is used instead.
index
is a variable such as: x, ab[x], aw[x], al[x], or a constant such as: 24640
(for object 6040hex).
sub-index
is a variable such as: x, ab[x], aw[x], al[x], or a constant such as: 0 (for
sub-index 0).
length
is a variable such as: x, ab[x], aw[x], al[x], or a constant such as: 4. This is
the number of bytes in the data; 1, 2, and 4 are the only valid values.
RSDORD(slave addr, index, sub-index, length) is the report version of the command. See
above for a description of the parameters.
The function will pause (not proceed) a user program until a confirmation is received or a
timeout occurs. In the event of a timeout, the value 0 is returned and an error code will be
Part 2: Commands: SDORD(...)