Features
This function applies altering amount of motion trajectory when the alter function is activated. The meaning of the input values is defined in the description of enable_alter_motion().
-
alter_motion() can be executed only in user thread.
-
alter_motion() can be executed only in user thread.
-
Alter motion can be adjusted through setting value limit_dPOS or limit_dPOS_per in enable_alter_motion function.
-
Orientation of Input pose follows fixed XYZ notation.
Parameters
|
Parameter Name |
Data Type |
Default Value |
Description |
|---|---|---|---|
|
pos |
list (float[6]) posx |
- |
position list posx |
Exception
|
Exception |
Description |
|---|---|
|
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
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=5,mode=DR_DPOS, ref=DR_BASE, limit_dPOS=[50,90], limit_dPOS_per=[10,10])
# cycle time:(5*100)msec, mode:accumulate, reference coordination:base coordination
# Lmitation of accumulation amount :50mm,90deg
# 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