P
ar
t
3: Examples
Moog Animatics SmartMotor™ Developer's Guide, Rev. L
Page 849 of 909
("SmartMotor acting as encoder: starting motion.",#13)
MV VT
=100000
ADT
=50
G
' A simple constant motion.
' Follow motor is already started and will follow exactly.
("SmartMotor acting as encoder: ")
("running for 10 seconds.",#13)
WAIT
=10000
("SmartMotor acting as encoder: freewheel.",#13)
BRKRLS OFF
ENDIF
END
C10
' Check for CAN error and display
e=
CAN
(4)
IF
e!=0
(#13,"Communication Error: ")
ELSE
'
("ok",#13)
' For debugging, to see what commands passed and failed.
RETURN
ENDIF
SWITCH
e
' NOTE: Any error number < 0 is Animatics specific to the SDORD, SDOWR,
' and NMT commands.
CASE
-1
(" Timeout, no response from remote device.")
BREAK
CASE
-2
(" Multiple SDO commands simultaneously.")
BREAK
CASE
-3
(" Master mode not enabled, see CANCTL command.")
BREAK
CASE
-4
(" Protocol not supported.")
BREAK
CASE
-5
(" Transmission failure, check cable, Baud rate.")
BREAK
CASE
-6
(" Data size returned not expected size.")
BREAK
CASE
-20
(" Invalid destination address.")
BREAK
CASE
-21
(" Data size not supported.")
BREAK
CASE
-22
(" Invalid object index.")
BREAK
CASE
-23
(" Invalid object sub-index.")
BREAK
CASE
-24
(" Invalid NMT command value.")
Part 3: Examples: CAN Bus - Time Sync Follow Encoder
Содержание SmartMotor
Страница 1: ...Developer s Guide Class 5 Later SmartMotor Technology with TM ...
Страница 909: ...PN SC80100003 002 Rev L ...