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 2: Commands
Moog Animatics SmartMotor Developer's Guide,Rev. L
Page 620 of 909
PC(1) and PC(2) are more virtually calculated values. They do not have a direct effect on the
commanded position. However, they can be used to individually keep track of the relative
changes in those two calculated trajectories.
EXAMPLE: (Shows the use of PC, PRA and PRC)
'NOTE:This example requires an external encoder.
EIGN(W,0,12) ZS 'Disable overtravel limits and clear errors
O(0)=0 O(1)=0 O(2)=0 'Zero PC(0),PC(1) and PC(2)
MF0 MFDIV=1 MFMUL=1 'Reset CTR(1) Divisor=1 Multiplier=1
MFR 'Calculate Ratio... 1 count in equals 1 count out
MP(1) 'Mode Position in trajectory 1 while keeping Mode Follow active
PRT=0 G(2) 'Set PRT=0 and start following with phase adjust active
PRINT("Adjust external encoder to ~1000 counts.",#13)
PRINT("Then type GOSUB10",#13)
END
C10
x=CTR(1) PRINT("The external encoder CTR(1)=",x,#13)
x=PC(0) PRINT("PC(0)=",x,#13)
x=PC(1) PRINT("PC(1)=",x,#13)
x=PC(2) PRINT("PC(2)=",x,#13)
PRINT("PRA=",PRA,#13) 'PRA will be zero because PRT=0
PRINT("PRC=",PRC,#13) 'PRC will be zero because PRT=0
'Set relative distance, velocity target, and Accel/Decel values
PRT=2000 VT=5000 ADT=100 G(1) TWAIT(1) 'Start Position Relative phase adjust
PRINT("After relative move, the values are...",#13)
x=CTR(1) PRINT("The external encoder CTR(1)=",x,#13)
x=PC(0) PRINT("PC(0)=",x,#13)
x=PC(1) PRINT("PC(1)=",x,#13)
x=PC(2) PRINT("PC(2)=",x,#13)
PRINT("PRA=",PRA,#13) 'PRA=PRC-PositionError; note default PID tuning values
PRINT("PRC=",PRC,#13) 'PRC=2000 because PRT=2000
PRINT("Position Error=",EA,#13)
RETURN
Part 2: Commands: PC, PC(axis)

Table of Contents

Related product manuals