Skip to main content
Skip table of contents

servoj()

Features

The command is the asynchronous motion command, and the next command is executed at the same time the motion begins. That motion follows the most recent target joint position that is continuously delivered, within maximum velocity, acceleration.

Parameters

Parameter Name

Data Type

Default Value

Description

pos

posj

-

posj or

joint angle list

list (float[6])

vel (v)

float

None

maximum velocity (same to all axes) or

maximum velocity (to an axis) [deg/s]

list (float[6])

acc (a)

float

None

maximum acceleration (same to all axes) or

maximum acceleration (acceleration to an axis) [deg/s2]

list (float[6])

time (t)

float

None

reach time [sec]

 

Note

  • Abbreviated parameter names are supported. (v:vel, a:acc, t:time)
  • _global_velj is applied if vel is None. (The initial value of _global_velj is 0.0 and can be set by set_velj.)
  • _global_accj is applied if acc is None. (The initial value of _global_accj is 0.0 and can be set by set_accj.)
  • After time is set, If reach time can’t be keep because of condition of maximum velocity and acceleration, the reach time is adjusted automatically and notice through information message.

Caution

  • Currently, it is not linked with the speed control function of the speed slide bar.
  • Currently, it is not linked with check_motion(), change_operation_speed() functions.

Return

Value

Description

0

Success

Negative value

Error

Exception

Exception

Description

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
set_velj(30)
set_accj(60)

Xt=posj(0, 0, 0, 0, 0, 0)
servoj(Xt)

Xt=posj(0, 0, 0, 0, 0, 0)
target = posx(90, 0, 120, -50, 50, -90)
del_t = [3, 0.1, 3, -3, 3, -3]

while 1:
    for i in range(0,6):
        Xt[i] = Xt[i] + del_t[i]    
    
        if del_t[i] > 0:
            if Xt[i] > target[i]:  
                Xt[i] = target[i]
        else:
            if Xt[i] < target[i]:
                Xt[i] = target[i]
            
    servoj(Xt)

Related commands

JavaScript errors detected

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

If this problem persists, please contact our support.