Skip to main content
Skip table of contents

enable_alter_motion(n,mode,ref,limit_dPOS,limit_dPOS_per)

Features

enable_alter_motion() and alter_motion() functions enable to alter motion trajectory.

This function sets the configurations for altering function and allows the input quantity of alter_motion() to be applied to motion trajectory. The unit cycle time of generating alter motion is 100msec. Cycle time(n*100msec) can be changed through input parameter n. This function provide 2 modes(Accumulation mode, Increment mode). Input quantity of alter_motion() can be applied to motion trajectory in two ways as accumulated value or increment value. In accumulation mode, the input quantity means absolute altering amount(dX,dY,dZ,dRX,dRY,dRZ) from current motion trajectory. On the contrary in increment mode, the quantity means increment value from the previous absolute altering amount. The reference coordinate can be changed through input parameter ref. Limitations of accumulation amout and increment amount can be set through input paramet limit_dPOS (accumulated limit) and limit_dPOS_per(increment input limit during 1 cycle). The actual alter amount is limited to these limits.

Parameters

Parameter NameData TypeDefault ValueDescription

n

int

None

Cycle time number

mode

Int

None

Mode

  • DR_DPOS : accumulation amount
  • DR_DVEL : increment amount

ref

int

None

reference coordinate

  • DR_BASE: base coordinate
  • DR_WORLD: world coordinate
  • DR_TOOL: tool coordinate
  • user coordinate: user defined

limit_dPOS

list(float[2])

None

First value : limitation of position[mm]

Second value : limitation of orientation[deg]

limit_dPOS_per

list(float[2])

None

Fist value : limitation of position[mm]

Second value : limitation of orientation[deg]

Note

  • _global_ref is applied if ref is None
  • Accumulation amount or increment amout isn’t be limited if limit_dPOS or limit_dPOS_per is None.
  • alter_motion() can be executed only in user thread.

Exception

ExceptionDescription

DR_Error (DR_ERROR_TYPE)

Parameter data type error occurred

DR_Error (DR_ERROR_VALUE)

Parameter value is invalid

DR_Error (DR_ERROR_RUNTIME)

C extension module error occurred

DR_Error (DR_ERROR_STOP)

Program terminated forcefully

Example

PY
def alter_thread():
          alter_motion(dX) #dX : amount of alter motion

dX = [10,0,0,10,0,0]

J00 = posj(0,0,90,0,90)
X1 = posx(559.0, 200, 651.5, 180, -180.0, 180)
X2 = posx(559.0, 200, 400, 180, -180.0, 180)

movej(J00,vel=50,acc=100)

enable_alter_motion(n=10,mode=DR_DPOS, ref=DR_BASE, limit_dPOS=[50,90], limit_dPOS_per=[50,50])
# cycle time:(5*100)msec, mode:accumulate, reference coordination:base coordination
# Lmitation of accumulation amount :50mm,50deg
# Limitation of increment amount :10mm, 10deg

th_id = thread_run(alter_thread, loop=True)

movel(X1,v=50,a=100,r=30)
movel(X2,v=50,a=100)

thread_stop(th_id)
disable_alter_motion() # deactivates alter motion

Related commands


JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.