DEF Motion_Example( )
DECL INT I
;------------Motion1------------------------------------------------
BAS(#VEL_PTP,30) ;;Set PTP Axis Velocity
BAS(#ACC_PTP,50) ;;Set PTP Axis Acceleration
PTP{A1 0,A2 -80,A3 80,A4 50,A5 60,A6 90}
;-------------------------------------------------------------------
;------------Motion2------------------------------------------------
FOR I=1 TO 6
$VEL_AXIS[I]=40 ;;Set PTP Axis Velocity
$ACC_AXIS[I]=70 ;;Set PTP Axis Acceleration
ENDFOR
PTP{A1 0,A2 -90,A3 90,A4 0,A5 0,A6 0}
;-------------------------------------------------------------------
;------------Motion3------------------------------------------------
$BASE=BASE_DATA[1] ;; Set Base data
$TOOL=TOOL_DATA[1] ;; Set Tool data
$LOAD=LOAD_DATA[2] ;; Set Load Data
$VEL.CP=0.3 ;; Set CP motion Velocity
$VEL.ORI1=100 ;; Set CP Swivel Velocity
$VEL.ORI2=100 ;; Set CP Rotational Velocity
$ACC.CP=2.0 ;; Set CP Acceleration
$ACC.ORI1=200 ;; Set CP Swivel Acceleration
$ACC.ORI2=200 ;; Set CP Rotational Acceleration
$APO.CDIS=0.5 ;; Set Approximation Distance
LIN {X 100 ,Y -100 ,Z 810 ,A -10 ,B -20 ,C 75 } C_DIS
;----------------------------------------------------------------------
;------------Motion4---------------------------------------------------
BAS(#BASE,1) ;; Set Base Data
BAS(#TOOL,1) ;; Set Tool Data
BAS(#VEL_CP,0.5) ;; Set CP Motion Velocity
BAS(#ACC_CP,80) ;; Set CP Motion Acceleration
LIN {X 200 ,Y 210 ,Z 1010 ,A 10 ,B 10 ,C -75 }
;----------------------------------------------------------------------
;------------Motion5---------------------------------------------------
$BASE={X 0,Y 0,Z 0,A 0,B 0,C 0} ;; Set Base Data
$TOOL={X 0,Y 0,Z 0,A 0,B 0,C 0} ;; Set Tool Data
$LOAD={M -1.0,CM {X 0.0,Y 0.0,Z 0.0,A 0.0,B 0.0,C 0.0},J {X 0.0,Y 0.0,Z 0.0}}
$VEL={CP 0.3,ORI1 100,ORI2 100} ;; Set CP Motion Velocity
$ACC={CP 2.0,ORI1 200,ORI2 200} ;; Set CP Motion Acceleration
$APO={CVEL 50,CPTP 50,CDIS 1,CORI 1} ;; Set Approximation Data
$IPO_MODE = #TCP ;; Set External TCP
LIN {X 100 ,Y -100 ,Z 810 ,A -10 ,B -20 ,C 75 } C_DIS
;-----------------------------------------------------------------------
;------------Motion6----------------------------------------------------
FDAT_ACT=FDEFAULT
FDAT_ACT.TOOL_NO=1 ;; Set Tool Data
FDAT_ACT.TOOL_NO=1 ;; Set Base Data
FDAT_ACT.IPO_FRAME=#BASE ;; Set IPO Mode
BAS(#FRAMES) ;; Set FDat data
BAS(#TOOL,1) ;; Set Tool and activate load
LDAT_ACT=LDEFAULT
LDAT_ACT.VEL=0.5 ;; Set CP Velocity
LDAT_ACT.ACC=20 ;; Set CP Acceleration
LDAT_ACT.APO_DIST=5 ;; Set Aproximation Distance
LDAT_ACT.ORI_TYP=#VAR ;; Set Orientation type
BAS(#CP_DAT) ;; Set LDAT
LIN {X 200 ,Y 210 ,Z 1010 ,A 10 ,B 10 ,C -75 } C_DIS
;-----------------------------------------------------------------------
;------------Motion7----------------------------------------------------
FDAT_ACT=FDEFAULT
FDAT_ACT.TOOL_NO=1 ;; Set Tool Data
FDAT_ACT.TOOL_NO=1 ;; Set Base Data
FDAT_ACT.IPO_FRAME=#BASE ;; Set IPO Mode
BAS(#FRAMES) ;; Set FDAT Data
BAS(#TOOL,1) ;; Set Tool and activate load
PDAT_ACT=PDEFAULT
PDAT_ACT.VEL=50 ;; Set PTP Velocity
LDAT_ACT.ACC=20 ;; Set PTP Acceleration
LDAT_ACT.APO_DIST=5 ;; Set Aproximation Distance
BAS(#PTP_DAT) ;; Set PDAT Data
PTP {X 100 ,Y -100 ,Z 810 ,A -10 ,B -20 ,C 75,S 2,T 8 } C_DIS
;-------------------------------------------------------------------
;------------Motion8------------------------------------------------
PDAT_ACT={VEL 30,ACC 100,APO_DIST 50} ;; Set PDAT Data
FDAT_ACT={TOOL_NO 6,BASE_NO 1,IPO_FRAME #BASE} ;; Set FDAT Data
PTP {A1 5,A2 -90,A3 100,A4 5,A5 10,A6 -5,E1 0,E2 0,E3 0,E4 O,E5 0,E6 0}
;-------------------------------------------------------------------
;------------Motion9------------------------------------------------
$BASE={X 0,Y 0,Z 0,A 0,B 0,C 0} ;; Set Base Data
$TOOL={X 0,Y 0,Z 0,A 0,B 0,C 0} ;; Set Tool Data
$LOAD.M=-1.0
$LOAD.CN={X 0.0,Y 0.0,Z 0.0,A 0.0,B 0.0,C 0.0}
$LOAD.J={X 0.0,Y 0.0,Z 0.0}
$VEL={CP 0.3,ORI1 100,ORI2 100} ;; Set CP Motion Velocity
$ACC={CP 2.0,ORI1 200,ORI2 200} ;; Set CP Motion Acceleration
$APO={CVEL 50,CPTP 50,CDIS 1,CORI 1} ;; Set Approximation Data
$IPO_MODE = #BASE ;; Set Robot guided TCP
$ORI_TYPE = #CONSTANT ;; Set CP Orientation Mode
$CIRC_TYPE = #BASE ;; Set CIRC Orientation Mode
CIRC {X 5,Y 0, Z 9.2},{X 12.3,Y 0,Z -5.3,A 9.2,B -5,C 20}, CA 260 C_ORI
;-------------------------------------------------------------------
;------------Motion9------------------------------------------------
PTP_REL {A2 -30} ;; Axis Relative Move
PTP_REL {X 100,Z -200} ;; Base Relative PTP Move
LIN_REL {X 100,Z -200} ;; Base Relative LIN Move
LIN_REL {X -100} #TOOL ;; Tool Relative LIN Move
CIRC_REL {X 100,Y 3.2,Z -20},{Y 50},CA 500 C_VEL ;; Base Relative CIRC Move
END