Skip to main content
Skip table of contents

movec()

Features

The robot moves along an arc to the target pos (pos2) via a waypoint (pos1) or to a specified angle from the current position in the task space.

Parameters

Parameter Name

Data Type

Default Value

Description

pos

posj

-

posx or

position list

list (float[6])

pos2

posx


posx or

position list

list (float[6]

vel (v)

float

None

velocity or

velocity1, velocity2

list (float[2])

None

acc (a)

float

None

acceleration or

acceleration1, acceleration2

list (float[2])

None

time (t)

float

None

Reach time [sec]

radius (r)

float

None

Radius for blending

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

angle (an)

float

None

angle or

angle1, angle2

list (float[2])

ra

int

DR_MV_RA_DUPLICATE

Reactive motion mode

  • DR_MV_RA_DUPLICATE: duplicate
  • DR_MV_RA_OVERRIDE: override

ori

int

DR_MV_ORI_TEACH

Orientation mode

  • DR_MV_ORI_TEACH: orientation changes continuously from the initial to the final taught value
  • DR_MV_ORI_FIXED: orientation holds with the initial orientation
  • DR_MV_ORI_RADIAL: orientation changes radially from the initial. 

app_type

int

DR_MV_APP_NONE

Application mode

  • DR_MV_APP_NONE: application related
  • DR_MV_APP_WELD: Welding application related

Note

  • Abbreviated parameter names are supported. (v:vel, a:acc, t:time, r:radius, angle:an)
  • _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.
  • If the radius is None, it is set to the blending radius in the blending section and 0 otherwise.
  • _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, pos1 and pos2 are defined in the relative coordinate system of the previous pos. (pos1 is the relative coordinate from the starting point while pos2 is the relative coordinate from pos1.)
  • If the angle is None, it is set to 0.
  • If only one angle is entered, the angle applied will be the total rotation angle of the circular path.
  • If two angle values are inputted, angle1 refers to the total rotating angle moving at a constant velocity on the circular path while angle2 refers to the rotating angle in the rotating section for acceleration and deceleration. In that case, the total moving angle angle1 + 2 X angle2 moves along the circular path.
  • If ‘app_type’ is ‘DR_MV_APP_WELD’, parameter ‘vel’ is internally replaced by the speed setting entered in app_weld_set_weld_cond(), not the input value of ‘vel’.
  • ‘ori’(orientation mode) is defined as below.
    1. DR_MV_ORI_TEACH(orientation based on teaching) : It moves while changing the current pose to the teaching pose of Pose 2, proportionate to the movement distance. The orientation of the taught pose, ‘pose 1’ is ignored.
    2. DR_MV_ORI_FIXED(fixed orientation) : Move along the path while maintaining the initial orientation up to the taught pose, ‘pose2’.
    3. DR_MV_ORI_RADIAL(orientation constrained radially) : Move along the path while maintaining radial orientation at the initial pose to the ‘pose 2’.
  • If a new motion (following motion) is executed before the motion being executed (previous motion) is completed, the previous motion and the following motion are smoothly connected (Motion Blending). It is possible to set the option ra, which can determine whether to maintain or cancel the target of the previous motion, for the following motion. (Maintain: ra=DR_MV_RA_DUPLICATE / Cancel: ra=DR_MV_RA_OVERRIDE) For example, in the figure below, if the following motion is executed at the “2nd motion event” point of a previous motion with the target, “Target#1,” and if the option ra=DR_MV_RA_DUPLICATE is set for the following motion, the motion will follow the orange trajectory, as the motion maintains the target of the previous motion, and if option ra=DR_MV_RA_OVERRIDE is set for the following motion, the motion will follow the green trajectory, as it cancels the target of the previous motion.

Caution

If the following motion is blended with the conditions of ra=DR_MV_RA_DUPLICATE and radius>0, the preceding motion can be terminated when the following motion is terminated while the remaining motion time determined by the remaining distance, velocity, and acceleration of the preceding motion is greater than the motion time of the following motion. Refer to the following image for more information.

  • In versions below SW V2.8, if the blending radius exceeds 1/2 of the total moving distance, the motion is not operated because it affects the motion after blending, and the running task program is terminated when a blending error occurs
  • In SW V2.8 or later, if the blending radius exceeds 1/2 of the total moving distance, the blending radius size is automatically changed to 1/2 of the total moving distance, and the change history can be checked in the information log message.

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
#1
P0 = posj(0,0,90,0,90,0)
movej(P0)
set_velx(30,20) # Set the global task velocity to 30(mm/sec) and 20(deg/sec).
set_accx(60,40) # Set the global task acceleration to 60(mm/sec2) and 40(deg/sec2). 

P1 = posx(400,500,800,0,180,0)
P2 = posx(400,500,500,0,180,0)
P3 = posx(100, 300, 700, 45, 0, 0)
P4 = posx(500, 400, 800, 45, 45, 0)

movec(P1, P2, vel=30)   
# Moves to P2 with a velocity of 30(mm/sec) and global acceleration of 60(mm/sec2) 
# via P1 along the arc trajectory.
movej(P0)
movec(P3, P4, vel=30, acc=60)   
# Moves to P4 with a velocity of 30(mm/sec) and acceleration of 60(mm/sec2). 
# via P3 along the arc trajectory
movej(P0).
movec(P2, P1, time=5)   
# Moves with a global velocity of 30(mm/sec) and acceleration of 60(mm/sec2). 
# to P1 along the arc trajectory via P2 at the 5-second point.
movec(P3, P4, time=3, radius=100)           
# Moves along the arc trajectory to P4 via P3 with a reach time of 3 seconds 
# and then executes the next motion at a distance of 100mm from the P4 position.
movec(P2, P1, ra=DR_MV_RA_OVERRIDE) 
# Immediately terminates the last motion and blends it to move to the P1 position.

Related commands

JavaScript errors detected

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

If this problem persists, please contact our support.