Skip to main content
Skip table of contents

amovesx()

Features

The asynchronous movesx motion operates in the same way as movesx() except for the asynchronous processing.

Generating a new command for the motion before the amovesj() motion results in an error for safety reasons. Therefore, the termination of the amovesx() motion must be confirmed using mwait() or check_motion() between amovesx() and the following motion command.

Note

  • movesx(pos_list): The next command is executed after the robot starts from the current position and reaches (stops at) the end point of pos_list.
  • amovesx(pos_list): The next command is executed regardless of whether the robot starts from the current position and reaches (stops at) the end point of pos_list.

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
#Example 1. D-Out 3 seconds after the spline motion through x1 - x6 begins
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
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.

amovesx(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). The next command is executed immediately after the motion starts.
wait(3)              # Temporarily suspends the program execution for 3 seconds (while the motion continues).
set_digital_output(1, 1)            # D-Out (no. 1 channel) ON
mwait(0)                            # Temporarily suspends the program execution until the motion is terminated.

Related commands


JavaScript errors detected

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

If this problem persists, please contact our support.