servol()
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 task position that is continuously delivered, within maximum velocity, acceleration.
Parameters
Parameter Name | Data Type | Default Value | Description |
---|---|---|---|
pos | posx | - | posx or position list |
list (float[6]) | |||
vel (v) | float | None | maximum velocity[mm/s] or maximum velocity[mm/s], maximum velocity[deg/s] |
list (float[2]) | |||
acc (a) | float | None | maximum acceleration[mm/s2] or maximum acceleration[mm/s2], maximum acceleration[deg/s2] |
list (float[2]) | |||
time (t) | float | None | reach time [sec] |
Note
- Abbreviated parameter names are supported. (v:vel, a:acc, t:time)
- _global_velx is applied if vel is None. (The initial value of _global_velx is 0.0 and can be set by set_velj.)
- _global_accx is applied if acc is None. (The initial value of _global_accx 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 the DR_VAR_VEL option among the singularity options. When set with the DR_VAR_VEL option, it is automatically changed to DR_AVOID option and notice through information message.
- Currently, it is not linked with the force/compliance control function.
- 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
set_velj(30)
set_accj(60)
set_velx(50)
set_accx(100)
movej(posj(0,0,90,0,90,0))
Xt=posx(368, 34.5, 442.5, 50.26, -180, 50.26)
servol(Xt,v=[100, 100], a=[200,300])
Xt=posx(368, 34.5, 442.5, 50.26, -180, 50.26)
target =posx(368, 34.5, 200, 50.26, -180, 50.26)
del_t = [0, 0, -3, 0, 3, 0]
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]
servol(Xt,v=[100, 100], a=[200,300])