Breadcrumbs

set_velx()

Definition

set_velx(vel1, vel2, clamp)

Features

This function sets the velocity of the task space motion globally. The globally set velocity velx is applied as the default velocity if the task motion such as movel(), amovel(), movec(), movesx() is called without the explicit input of the velocity value. In the set value, vel1 and vel2 define the linear velocity and rotating velocity, respectively, of TCP. If the value of vel2 is None, it will be calculated proportionally to the linear velocity. The clamp setting can be configured as follows: When the mode is activated, the speed of all movements is limited based on the TCP's linear velocity.

  • Retain current mode: None

  • Deactivate mode: DR_OFF

  • Activate mode: DR_ON

Note

  • In TCP speed clamping mode, if the safety parameter's TCP speed is lower than the desired speed, the safety parameter's TCP speed will be applied. In reduce mode, the speed will follow the limit set by the reduce mode.

  • If the clamp is set to "None" at the start of the program, the TCP speed clamping mode will remain inactive.

Parameters

Parameter Name

Data Type

Default Value

Description

vel1

float

-

velocity 1 (TCP linear velocity)

vel2

float

None

velocity 2 (TCP rotating velocity)

clamp

int

None

TCP speed clamping mode

  • Retain current mode: None

  • Deactivate mode: DR_OFF

  • Activate mode: DR_ON

Return

Value

Description

0

Success

Exception

Exception

Description

DR_Error (DR_ERROR_TYPE)

Parameter data type error occurred

Example

Python
# 0 
set_velx(30)            # The global task velocity is set to 30 (mm/sec). The global task angular velocity is automatically determined. Maintain the existing mode.
set_velx(30, 20)        # The global task velocity is set to 30(mm/sec) and 20(deg/sec). Maintain the existing mode.
set_velx(30, 20, DR_ON) # The global task velocity is set to 30(mm/sec) and 20(deg/sec). Activate the mode.

# 1
P0 = posj(0,0,90,0,90,0)
movej(Q1, 60, 30)
P1 = posx(400,500,800,0,180,0)
P2 = posx(400,500,500,0,180,0)
movel(P1, vel=10, acc=20)
set_velx(30, 20, DR_ON)   # The global task velocity is set to 30(mm/sec) and 20(deg/sec). Activate the mode.
set_accx(60, 40)          # The global task acceleration is set to 60(mm/sec2) and 40(deg/sec2).
movel(P2)                 # The task motion velocity to P2 is 30(mm/sec) and 20(deg/sec) which are the global velocity.
movel(P1, vel=20, acc=40) # The task motion velocity to P1 is 20(mm/sec) and 20(deg/sec) which are the specified velocity.

# 2
set_velx(10.5, 19.4)      # Input with decimal points is supported.

# 3
set_velx(100, 20, DR_ON)  # The global task velocity is set to 100(mm/sec) and 20(deg/sec). Activate the mode.
Q1 = posj(0,0,90,0,90,0)
Q2 = posj(0,0,0,0,90,0)
movej(Q1, vel=60, acc=60) # The global task velocity is ​limited to 100 (mm/sec).
movej(Q2, vel=60, acc=60, velx = 50) # TCP speed is limited to 50 (mm/sec) as the locally set velx takes priority.