Skip to main content
Skip table of contents

movesx()

Features

The robot moves along a spline curve path that connects the current position to the target position (the last waypoint in pos_list) via the waypoints of the task space input in pos_list.

The input velocity/acceleration means the maximum velocity/acceleration in the path and the constant velocity motion is performed with the input velocity according to the condition if the option for the constant speed motion is selected.

Parameters

Parameter Name

Data Type

Default Value

Description

pos_list

list (posx)

-

posx list

vel (v)

float

None

velocity or

velocity1, velocity2

list (float[2])

acc (a)

float

None

acceleration or

acceleration1, acceleration2

list (float[2])

time (t)

float

None

Reach time [sec]

ref

int

None

reference coordinate

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

mod

int

DR_MV_MOD_ABS

Movement basis

  • DR_MV_MOD_ABS: Absolute
  • DR_MV_MOD_REL: Relative

vel_opt

int

DR_MVS_VEL_NONE

Velocity option

  • DR_MVS_VEL_NONE: None
  • DR_MVS_VEL_CONST: Constant velocity

Note

  • Abbreviated parameter names are supported. (v:vel, a:acc, t:time)
  • _global_velx is applied if vel is None. (The initial value of _global_velx is 0.0 and can be set by set_velx.)
  • _global_accx is applied if acc is None. (The initial value of _global_accx is 0.0 and can be set by set_accx.)
  • If an argument is inputted to vel (e.g., vel=30), the input argument corresponds to the linear velocity of the motion while the angular velocity is determined proportionally to the linear velocity.
  • If an argument is inputted to acc (e.g., acc=60), the input argument corresponds to the linear acceleration of the motion while the angular acceleration is determined proportionally to the linear acceleration.
  • If the time is specified, values are processed based on time, ignoring vel and acc.
  • If the time is None, it is set to 0.
  • _g_coord is applied if the ref is None. (The initial value of _g_coord is DR_BASE, and it can be set by the set_ref_coord command.)
  • If the mod is DR_MV_MOD_REL, each pos in the pos_list is defined in the relative coordinate of the previous pos. (If pos_list=[p1, p2, ...,p(n-1), p(n)], p1 is the relative angle of the starting point while p(n) is the relative coordinate of p(n-1).)
  • This function does not support online blending of previous and subsequent motions.

Caution

The constant velocity motion according to the distance and velocity between the waypoints cannot be used if the "vel_opt= DR_MVS_VEL_CONST" option (constant velocity option) is selected, and the motion is automatically switched to the variable velocity motion (vel_opt= DR_MVS_VEL_NONE) in that case.

Return

ValueDescription

0

Success

Negative value

Error

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
#CASE 1) Absolute coordinate input (mod= DR_MV_MOD_ABS)
P0 = posj(0,0,90,0,90,0)
movej(P0, v=30, a=30)
x0 = posx(600, 43, 500, 0, 180, 0)	# Defines the posx variable (space coordinate/pose) x0.
movel(x0, vel=100, acc=200)	# Linear movement to the initial position x0
x1 = posx(600, 600, 600, 0, 175, 0)	# Defines the posx variable (space coordinate/pose) x1.
x2 = posx(600, 750, 600, 0, 175, 0)
x3 = posx(150, 600, 450, 0, 175, 0)
x4 = posx(-300, 300, 300, 0, 175, 0)
x5 = posx(-200, 700, 500, 0, 175, 0)
x6 = posx(600, 600, 400, 0, 175, 0)

xlist = [x1, x2, x3, x5, x6]	# Defines the list (xlist) which is a set of x1-x6 as the waypoints.

movesx(xlist, vel=[100, 30], acc=[200, 60], vel_opt=DR_MVS_VEL_NONE)
	# Moves the spline curve that connects the waypoints defined in the xlist 
	# with a maximum velocity of 100, 30(mm/sec, deg/sec) and maximum acceleration of 200(mm/sec2) and
	# 60(deg/sec2).
movesx(xlist, vel=[100, 30], acc=[200, 60], time=5, vel_opt=DR_MVS_VEL_CONST)
	# Moves the spline curve that connects the waypoints defined in the xlist 
	# with a constant velocity of 100, 30(mm/sec, deg/sec).

#CASE 2) Relative coordinate input (mod= DR_MV_MOD_REL)
P0 = posj(0,0,90,0,90,0)
movej(P0)
x0 = posx(600, 43, 500, 0, 180, 0)	# Defines the posx variable (space coordinate/pose) x0.
movel(x0, vel=100, acc=200)	# Linear movement to the initial position x0
dx1 = posx(0, 557, 100, 0, -5, 0)
	# Definition of relative coordinate dx1 to x0 (Homogeneous transformation of dx1 based in x1= x0)
dx2 = posx(0, 150, 0, 0, 0, 0)
	# Definition of relative coordinate dx2 to x1 (Homogeneous transformation of dx2 based in x2= x1)
dx3 = posx(-450, -150, -150, 0, 0, 0)
	# Definition of relative coordinate dx3 to x2 (Homogeneous transformation of dx3 based in x3= x2)
dx4 = posx(-450, -300, -150, 0, 0, 0)
	# Definition of relative coordinate dx4 to x3 (Homogeneous transformation of dx4 based in x4= x3)
dx5 = posx(100, 400, 200, 0, 0, 0)
	# Definition of relative coordinate dx5 to x4 (Homogeneous transformation of dx5 based in x5= x4)
dx6 = posx(800, -100, -100, 0, 0, 0)
	# Definition of relative coordinate dx6 to x5 (Homogeneous transformation of dx6 based in x6= x5)

dxlist = [dx1, dx2, dx3, dx4, dx5, dx6]        
	# Defines the list (dxlist) which is a set of dx1-dx6 as the waypoints.

movesx(dxlist, vel=[100, 30], acc=[200, 60], mod= DR_MV_MOD_REL, vel_opt=DR_MVS_VEL_NONE)
	# Moves the spline curve that connects the waypoints defined in the dxlist 
	# with a maximum velocity of 100, 30 (mm/sec, deg/sec) 
	# and maximum acceleration of 200(mm/sec2), and 60(deg/sec2) (same motion as CASE-1).

Related commands

JavaScript errors detected

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

If this problem persists, please contact our support.