! (A) MPTP MOTION - making a cyrcle
! This program uses axes X and A to draw a circle comprising 30 points - using the PTP command.
! The middle of the circle is (0,0), the radius is 2000.
!------------- Set motion parameters ----------
<X軸のプロファイル設定>
X_VEL = 5000 ! Set velocity
X_ACC = 100000 ! Set acceleration
X_DEC = 100000 ! Set deceleration
X_JERK = 20000000 ! Set jerk
X_KDEC = 100000 ! Set kill deceleration
<Y軸のプロファイル設定>
A_VEL = 5000 ! Set velocity
A_ACC = 100000 ! Set acceleration
A_DEC = 100000 ! Set deceleration
A_JERK = 20000000 ! Set jerk
A_KDEC = 100000 ! Set kill deceleration
!-------------- Initialization ---------------------
<プログラムの初期設定>
SET A_RPOS=0
SET X_RPOS=2000
REAL J ! Define J as real number
J=0
!-------------Axis activation ----------------------
<実際のプログラミング>
ENABLE XA
LOOP 30 ! Make the loop 30 times
PTP XA, 2000*COS(2*3.14159/30*J), 2000*SIN(2*3.14159/30*J)
J=J+1
END ! End of the loop
STOP