speedj()
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 velocity that is continuously delivered, within maximum acceleration.
Parameters
Parameter Name | Data Type | Default Value | Description |
---|---|---|---|
vel | list (float[6]) | - | target joint velocity [deg/s] |
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. (a:acc, t:time)
- _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 and acceleration, the reach time is adjusted automatically and notice through information message.
- If you want to stop normally during movement, input vel as [0,0,0,0,0,0] or use the stop command.
- For safety, if a new speedj command is not transmitted for 0.1 [sec] during movement, an error message is displayed and it stops.
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
movej(posj(0,0,90,0,90,0), v=30, a=60)
v1 = 30
go_plus = True
while True:
q = get_desired_posj()
if go_plus:
speedj([v1, 5, 5, 5, 5, 5], a=60)
if q[0] > 90:
go_plus = False
else:
speedj([-v1, -5, -5, -5, -5, -5], a=60)
if q[0] < -90:
go_plus = True