EasyManua.ls Logo

Moog SmartMotor - Page 640

Moog SmartMotor
909 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Part 2: Commands
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
PRINT("Demonstration:",#13)
PRINT("a=",a)
PRINT(" and b=",b,#13)
PRINT("a+b=",a+b,#13)
PRINT("Position: ",PA,#13)
WAIT=10 'Allow time for serial buffer processing
PRINT("KP=",KP,#13)
PRINT("Hello World",#13,#13)
PRINT("Run Subroutines",#13)
WAIT=10
PRINT(#128,"GOSUB5 ",#13) 'tell all motors to run subroutine
C5
WAIT=10
PRINT(#129,"GOSUB10",#13) 'Tell Motor-1 to run subroutine
C10
WAIT=10
PRINT(#130,"GOSUB20",#13) 'Tell Motor-2 to run subroutine
C20
WAIT=10
PRINT(#131,"GOSUB30",#13) 'Tell Motor-3 to run subroutine
C30
x=123
PRINT(#132,"GOSUB",x,#13) 'Tell Motor-4 to run subroutine
C123
v=100000
a=100
p=2000
PRINT(#130,"ADT=",a," VT=",v,#13) 'Set speed and accel/decel in motor 2
WAIT=10
PRINT(#130,"MP PT=",p," G",#13) 'Command Motor-2 to position 2000
WAIT=10
PRINT(#13,#13,"End of Demonstration.",#13)
END
Part 2: Commands: PRINT(...)

Table of Contents

Related product manuals