EasyManua.ls Logo

Moog SmartMotor

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 3: Examples
Moog Animatics SmartMotor Developer's Guide,Rev. L
Page 829 of 909
Maintain Velocity During Analog Drift
This example causes the SmartMotor's velocity to track an analog input. Analog signals drift
and dither, so a dead-band feature has been added to maintain a stable velocity when the
operator is not changing the signal. There is also a wait feature to slow the speed of the loop.
EIGN(W,0) 'Disable hardware limits
KP=3020 'Increase stiffness from default
KD=10010 'Increase damping from default
F 'Activate new tuning parameters
ADT=100 'Set maximum accel/decel
MV 'Set to Velocity mode
d=10 'Analog dead band, 5000 = full scale
o=2500 'Offset to allow negative swings
m=40 'Multiplier for speed
w=10 'Time delay between reads
b=0 'Seed b
C10 'Label to create infinite loop
a=INA(V1,3)-o 'Take analog 5 Volt FS reading
x=a-b 'Set x to determine change in input
IF x>d 'Check if change beyond dead band
VT=b*m 'Multiplier for appropriate speed
G 'Initiate new velocity
ELSEIF x<-d 'Check if change beyond dead band
VT=b*m 'Multiplier for appropriate speed
G 'Initiate new velocity
ENDIF 'End IF statement
b=a 'Update b for prevention of hunting
WAIT=w 'Pause before next read
GOTO10 'Loop back to label
END 'Obligatory END (never reached)
Part 3: Examples: Maintain Velocity During Analog Drift

Table of Contents

Related product manuals