Moog Animatics SmartMotor™ Developer's Guide,Rev. L
Page 146 of 909
a=1000 'Ascend and descend distance in slave counts
b=200000 'Spool width in slave counts
c=4000 'One rev of spool in master counts
s=b-(a*2) 'Calculate MFSLEW distance
m=1000 'Gear ratio multiplier
d=1000 'Gear ratio divisor
MFMUL=m 'Set ratios for gearing
MFDIV=d
MFA(a,1) 'Set ascend into ratio distance
MFD(a,1) 'Set descend out of ratio distance
MFSLEW(s,1) 'Set slew dis. between the accel and decel points
MFSDC(c,1) 'Set dwell for "c" counts, auto rev. after dwell
MFR 'Set mode to electronic gear ratio
G 'Start following the external master encoder
NOTE: The G command assumes the cycle starts at the same end of the spool each
time.
A shift back and forth to the oscillation can be achieved by running in dual-trajectory mode.
For more information on dual-trajectory mode, see Dual Trajectories on page 172.
SRC(2) 'Set signal source to internal 8K counts/sec
MFMUL=100 'Default is 1
MFDIV=100 'Default is 1
MFA(500,1) 'Set ascend ratio distance of 500 slave counts
MFD(500,1) 'set descend ratio distance of 500 slave counts
MFR(2) 'calculate ratio, set mode for SECOND TRAJECTORY
MFSLEW(8000,1) 'stay at slew ratio for 8000 counts of the slave
MFSDC(100,1) 'Dwell for 100 counts, auto repeat in reverse direction
G(2) 'Begin to follow master signal in SECOND trajectory
MP(1) 'Set FIRST TRAJECTORY mode to Position mode
VT=100000 'Set velocity to run over top of gearing
ADT=100 'Set accel/decel to run over gearing
PRT=1000 'Set relative move
G(1) 'Shift all motion 1000 counts in positive direction
CAUTION: In the above example, repeating G(1) continuously shifts
oscillation in the positive direction by 1000 counts or the value in PRT.
NOTE: A velocity MV(1) or position MP(1) mode may be used over gearing. All
distances are relative to gearing. The command X(2) stops gearing; the command
X(1) stops position or velocity moves.
Dedicated, Absolute Position, Winding Traverse Commands
This section applies to absolute positioning in electronic gearing. It is specifically tailored to
traverse and take-up winders.
Refer to the following figure. The MFMULand MFDIVcommands, which were previously
described in this chapter, are used to set the ratio of master to slave motion as a maximum
when slew is reached. The sign of MFMUL/MFDIV is ignored in this mode of operation — only
the absolute value is used. The initial direction of motion is not affected by the sign of
MFMUL/MFDIV.
Part 1: Programming: Dedicated, Absolute Position, Winding Traverse Commands