set_velj()

Definition

set_velj(vel)

Features

This function sets the global velocity in joint motion (movej, movejx, amovej, or amovejx) after using this command. The default velocity is applied to the globally set vel if movej() is called without the explicit input of the velocity argument.

Parameters

Parameter Name

Data Type

Default Value

Description

vel

float

-

velocity (same to all axes) or

velocity (to an axis)

list (float[6])

 Return

Value

Description

0

Success

Exception

Exception

Description

DR_Error (DR_ERROR_TYPE)

Parameter data type error occurred

Note

  • The initial value of _global_velj is 0.0, and it is reset to 0.0 each time a task program runs. A value set by a previously executed program is not retained, so set_velj() must be called in every program that relies on it.

  • While the global value is 0.0, a joint motion command that omits vel, acc, and time is not executed and stops the program with a DRL ValueError (DR_ERROR_VALUE).

  • The global velocity set by this command applies to joint motions (movej, movejx, amovej, amovejx, movesj, amovesj). Use set_velx() for the global velocity of task motions.

Example

Python
#1
Q1 = posj(0,0,90,0,90,0)
Q2 = posj(0,0,0,0,90,0)
movej(Q1, vel=10, acc=20)
set_velj(30) # The global joint velocity is set to 30 (deg/sec).
set_accj(60) # The global joint acceleration is set to 60 (deg/sec2). [See set_accj().]
movej(Q2)    # The joint motion velocity to Q2 is 30 (deg/sec) which is the global velocity.
movej(Q1, vel=20, acc=40)   # The joint motion velocity to Q1 is 20 (deg/sec) which is the specified velocity.

#2
set_velj(20.5) # Decimal point input is possible.
set_velj([10, 10, 20, 20, 30, 10]) # The global velocity can be specified to each axis.

Keyword

set / set_ / velj