set_accj()

Definition

set_accj(acc)

Features

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

Parameters

Parameter Name

Data Type

Default Value

Description

acc

float

-

acceleration (same to all axes) or

acceleration (acceleration 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_accj 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_accj() 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 acceleration set by this command applies to joint motions (movej, movejx, amovej, amovejx, movesj, amovesj). Use set_accx() for the global acceleration 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). [See set_velj().]
set_accj(60) # The global joint acceleration is set to 60 (deg/sec2).
movej(Q2)    # The joint motion acceleration to Q2 is 60(deg/sec2) which is the global acceleration.
movej(Q1, vel=20, acc=40) # The joint motion acceleration to Q1 is 40(deg/sec2) which is the specified acceleration.

#2
set_accj(30.55)
set_accj([30, 40, 30, 30, 30, 10])

Keyword

set / set_ / accj