Moog Animatics SmartMotor™ Developer's Guide,Rev. L
Page 109 of 909
NMT
Transmit NMTmessage to network
The NMTcommand transmits an NMT message to the network; it can command a specific
slave or all slaves to enter the commanded state. The command uses the form:
NMT(target address, desired state)
NMT(0,1) 'Tell everyone to go operational.
NMT(2,128) 'Tell motor 2 to go pre-operational.
x=CAN(4)
IF x!=0
' NMT command failed.
ENDIF
For more details, see NMT on page 595.
RB(2,4), x=B(2,4)
Determine if CAN error has occurred
Report/get if an error state has occurred over CAN, CANopen or Combitronic. Further
investigation through RCAN(0) will give more details. This can be cleared using the Z(2,4) or
ZS command.
For more details, see B(word,bit) on page 291.
Exceptions to NMT, SDORD and SDOWR Commands
Note the following exceptions when using the NMT, SDORD, SDOWR commands:
l
No Combitronic version of these commands, i.e., there is no ":" operator form of the
command, for example:
x=SDORD(…):3
is not allowed. Refer to each command's description in Part 2 of this guide.
l
No monitoring the heartbeat of other network nodes.
l
No special commands for sending or receiving PDOs. PDOs must be mapped to existing
objects to send or receive data as a slave device. Even the SmartMotor designated as a
master must configure its own PDO mappings.
NOTE: SmartMotors currently have 5 transmit and 5 receive PDOs.
l
No capability to read EDS files. The user is responsible for writing a program with the
relevant object index, sub-index and data type.
l
No LSS host behavior is provided from the SmartMotor. Each slave device is expected to
have the properly configured address and baud rate. Each device must have a unique
address; all devices must use the same baud rate. Any need to set the baud rate or
address is not the responsibility of Moog Animatics.
l
Only one SmartMotor may fill the master role. No other SmartMotors on the network
may issue these commands, because this implementation does not support a mult-
CANopen-master functionality.
l
No support for master read/write of segmented or block SDO protocol. Only Expedited
(32-bit or smaller) data transmission are supported by the master functionality.
Part 1: Programming: NMT