Moog Animatics SmartMotor™ Developer's Guide,Rev. L
Page 598 of 909
NOTE: Consider using the OSH command when the amount of position shift is
already known. In other words, if you know that you want to remove 1000 counts
from the present position, then use the command OSH=-1000 instead. For details,
see OSH=formula, OSH(trj#)=formula on page 611.
EXAMPLE: (Reassigning origin does not modify buffered PT and PRT values)
ADT=20 'Set accel/decel target
VT=100000 'Set velocity target
PT=5000 'Set position target
MP 'Set Position mode
O=-1000 'Current position set to negative 10000
GOSUB5
O=12345 'Current position set to 12345
GOSUB5
PRT=5000
O=3000 'Current position set to 3000
GOSUB5
END
C5
PRINT(#13,"Move origin is ",PA)
G
WHILE Bt LOOP
WAIT=4000
PRINT(#13,"Position is ")
RPA
RETURN
Program output is:
Move origin is -1000
Position is 5000
Move origin is 12345
Position is 5000
Move origin is 3000
Position is 8000
RELATED COMMANDS:
R
EA Error Actual (see page 394)
OSH=formula, OSH(trj#)=formula Origin Shift (see page 611)
R
PA Position, Actual (see page 615)
R
PC, PC(axis) Position, Commanded (see page 619)
Part 2: Commands: O=formula, O(trj#)=formula