P
ar
t
2: C
omman
d
s
Moog Animatics SmartMotor™ Developer's Guide, Rev. L
Page 640 of 909
EXAMPLE:
OFF
KP
=100
'Set Proportional Gain
O
=1234
'Set origin to 1234
a
=1
b=2
("Demonstration:",#13)
("a=",a)
(" and b=",b,#13)
("a+b=",a+b,#13)
("Position: ",PA,#13)
WAIT
=10
'Allow time for serial buffer processing
("KP=",KP,#13)
("Hello World",#13,#13)
("Run Subroutines",#13)
WAIT
=10
(#128,"GOSUB5 ",#13)
'tell all motors to run subroutine
C5
WAIT
=10
(#129,"GOSUB10",#13)
'Tell Motor-1 to run subroutine
C10
WAIT
=10
(#130,"GOSUB20",#13)
'Tell Motor-2 to run subroutine
C20
WAIT
=10
(#131,"GOSUB30",#13)
'Tell Motor-3 to run subroutine
C30
x=123
(#132,"GOSUB",x,#13)
'Tell Motor-4 to run subroutine
C123
v=100000
a=100
p=2000
(#130,"ADT=",a," VT=",v,#13)
'Set speed and accel/decel in motor 2
WAIT
=10
(#130,"MP PT=",p," G",#13)
'Command Motor-2 to position 2000
WAIT
=10
(#13,#13,"End of Demonstration.",#13)
END
Part 2: Commands: PRINT(...)
Содержание SmartMotor
Страница 1: ...Developer s Guide Class 5 Later SmartMotor Technology with TM ...
Страница 909: ...PN SC80100003 002 Rev L ...