Skip to main content
Skip table of contents

move_spiral()

Features

In the specified coordinate system (ref), it performs the motion of a conical spiral trajectory that moves outward in the radial direction (rad_dir) with the current position as the center of the spiral, or moves inward in the radial direction with the target point as the center of the spiral. The target point can be defined by X, Y, Z coordinate values or by the maximum radius (rmax) and the axial distance traveled (lmax). It follows a spiral trajectory that rotates on the specified axis (axis) in a plane perpendicular to it, rotating the specified number of revolutions (rev).

Parameters

Parameter NameData TypeDefault ValueRangeDescription

rev

float

10

rev > 0

Total number of revolutions

rmax

float

None

rmax > 0

Final spiral radius [mm]

lmax

float

0


Distance moved in the axis direction [mm]

vel (v)

float

None


velocity

acc (a)

float

None


acceleration

time (t)

float

None

time ≥ 0

Total execution time <sec>

axis

int

DR_AXIS_Z

-

axis

  • DR_AXIS_X: x-axis
  • DR_AXIS_Y: y-axis
  • DR_AXIS_Z: z-axis

ref

Int

DR_TOOL

-

reference coordinate

  • DR_BASE : base coordinate
  • DR_WORLD : world coordinate
  • DR_TOOL : tool coordinate
  • user coordinate : user defined 
posposxNone
posx or position list (X,Y,Z)
list(float[3])
list(float[6])
modintDR_MV_MOD_ABS

Movement basis

  • DR_MV_MOD_ABS : Absolute
  • DR_MV_MOD_REL : Relative
rad_dirintDR_SPIRAL_OUTWARD

Radial direction

  • DR_SPIRAL_OUTWARD: toward outward
  • DR_SPIRAL_INWARD: toward inward
rot_dirintDR_ROT_FORWARD

Rotation direction

  • DR_ROT_FORWARD : Forward rotation (+)
  • DR_ROT_REVERSE : Reverse rotation (-)
radius (r)floatNone
Radius for blending
raintDR_MV_RA_DUPLICATE

Reactive motion mode

  • DR_MV_RA_DUPLICATE: duplicate
  • DR_MV_RA_OVERRIDE: override

Note

  • Abbreviated parameter names are supported. (v:vel, a:acc, t:time)
  • rev refers to the total number of revolutions of the spiral motion.
  • Rmax refers to the maximum radius of the spiral motion.
  • Lmax refers to the parallel distance in the axis direction during the motion. A negative value means the parallel distance in the –axis direction.
  • Vel refers to the moving velocity of the spiral motion.
  • The first value of _global_velx (parallel velocity) is applied if vel is None. (The initial value of _global_velx is 0.0 and can be set by set_velx.)
  • acc refers to the moving acceleration of the spiral motion.
  • The first value of _global_accx (parallel acceleration) is applied if acc is None. (The initial value of _global_accx is 0.0 and can be set by set_accx.)
  • 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.
  • The axis defines the axis that is perpendicular to the surface defined by the spiral motion.
  • Ref refers to the reference coordinate system defined by the spiral motion.
  • rad_dir refers to the radial direction of spiral

  • rot_dir refers to the rotation direction of spiral along axis.

  • If the radius is None, it is set to the blending radius in the blending section and 0 otherwise.
  • 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.

image2021-11-4_14-15-53.png

Caution

  • An error can be generated to ensure safe motion if the rotating acceleration calculated by the spiral path is too great.
    In this case, reduce the vel, acc, or increase time value.

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
# Model: M1013

J00 = posj(0,0,90,0,90,0)
P1 = [559,34.5,651.5]
P2 = [579, 65, 641.5]

D1 = [20,0,10]
D2 = [-20,0,-10]

movej(J00,vel=100,acc=100) # Move to Initial Poisition

# Max Radius with Blending
move_spiral(rev=5,rmax=20.0,lmax=-10,v=40,a=40,axis=DR_AXIS_Z,ref=DR_TOOL,rad_dir=DR_SPIRAL_OUTWARD, rot_dir=DR_ROT_FORWARD, r=20)
move_spiral(rev=5,rmax=20.0,lmax=-10,v=40,a=40,axis=DR_AXIS_Z,ref=DR_TOOL,rad_dir=DR_SPIRAL_INWARD, rot_dir=DR_ROT_FORWARD)

# Coordinate values with Blending
move_spiral(rev=5,pos=P2,v=40,a=40,axis=DR_AXIS_Z,ref=DR_BASE,rad_dir=DR_SPIRAL_OUTWARD, rot_dir=DR_ROT_FORWARD, r=20)
move_spiral(rev=5,pos=P1,v=40,a=40,axis=DR_AXIS_Z,ref=DR_BASE,rad_dir=DR_SPIRAL_INWARD, rot_dir=DR_ROT_FORWARD)

# Relative motion with Blending
move_spiral(rev=5,pos=D1,mod=DR_MV_MOD_REL,v=40,a=40,axis=DR_AXIS_Z,ref=DR_BASE,rad_dir=DR_SPIRAL_OUTWARD, rot_dir=DR_ROT_FORWARD, r=20)
move_spiral(rev=5,pos=D2,mod=DR_MV_MOD_REL,v=40,a=40,axis=DR_AXIS_Z,ref=DR_BASE,rad_dir=DR_SPIRAL_INWARD, rot_dir=DR_ROT_FORWARD)

Related commands

JavaScript errors detected

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

If this problem persists, please contact our support.