Moog Animatics SmartMotor™ Developer's Guide,Rev. L
Page 351 of 909
To set the SL17 SmartMotor to "auto address" (automatically assign the CANaddress), use the
following CADDRcommand:
CADDR=-1
(CADDR=255 has the same effect.) Note that this setting is for the SL17 SmartMotor only; if
used with any other motor, it will have no effect.
To read the CANaddress, use the following CADDRcommand:
var=CADDR
where var is any variable. Then you can use the PRINT(var) command to print the
CANaddress to the Terminal window.
RCADDR also reports the current value of the CAN ID either set from EEPROM as static
address 1-127, or from auto-address 1-127. When the CADDR=formula command is issued, it
will cause RCADDR to report the new address even through a reboot is required to actually
activate and use the new address. If CADDR=-1 or 255 (auto-address for the SL17
SmartMotor only), then 255 is reported until a reboot. Then RCADDR reports a default address
of 120. After an auto-address is assigned by a master, RCADDR reports the address that the
motor was assigned, i.e., 1, 2, 3..., etc.
To set the CANaddress to the serial address on all motors, use the following CADDR
command:
<SerialMotorNumber>CADDR=<address>
For example, 3CADDR=10 sets serial motor 3's CANaddress to 10; 0CADDR=ADDR would
globally set every serial motor's CANaddress to its serial address.
NOTE: SmartMotor commands like 0CADDR=... or 0ADDR=... with a leading
number really send a corresponding address byte (i.e., "0", which is hex 80 or
decimal 128). This can be seen by viewing the serial data with the Serial Data
Analyzer ("sniffer") tool, which is available on the SMI software View menu.
EXAMPLE: (Code sets CAN address to motor address and resets all motors. Motors should be
addressed on serial RS-232 chain first.)
NOTE: Issue these commands at serial port (SMITerminal window) only. The "0"
in front of these commands will not be recognized by a user program.
0CADDR=ADDR 'Set if not same as motor address
0Z 'Reset all motors to enable CAN address
RELATED COMMANDS:
R
ADDR=formula Address (for RS-232 and RS-485) (see page 255)
CANCTL(function,value) CANControl (see page 354)
R
CBAUD=formula CAN Baud Rate (see page 358)
Part 2: Commands: CADDR=formula