Skip to content

set_joint_speed

Runs at once Any mode Takes control

Set the default speed of queued moves, as a share of the limits. Every queued move that does not pass its own speed runs at this share of each joint's speed limit. It slows the whole move down in time: at 50 % a move takes twice as long along the same path, with half the speed and a quarter of the acceleration. A duration given with a move overrides it.

The setting is the robot's, not this client's: it applies to the moves every client sends after it, unless a move passes its own speed. Moves already sent keep the value they were sent with. It lasts until it is changed or the robot software restarts.

Syntax

robot.set_joint_speed(percent)

Arguments

Name Type Default Description
percent float required The share of each joint's speed limit, in %: above 0 and at most 100. 1 means 1 %, and 0.5 half a percent.

Default values

100 %, set each time the robot software starts.

Returns

Any

None: the robot sends no value back.

Examples

robot.set_joint_speed(50)
robot.move_joints(90, -105, 165, 0, -30, 180)
robot.wait_idle()

Further details

Note

Moves along a Cartesian path (straight lines, arcs, circles and splines) run at no more than 20 % of the speed limit, whatever this says. No status field shows the setting.

Usage restrictions 2 codes

This command runs at once; it is not queued. The robot accepts it in any mode and state, from the client that holds control or when no client does.

It answers with one of these codes when it does not carry the command out:

  • [6101] Control held by another client — another client holds control; the message names it
  • [6003] Invalid arguments — percent is not a number above 0 and at most 100

In Python, a code above raises CommandRejected; its number is the code. The call raises:

  • CommandRejected: The robot refused it: percent is not above 0 and at most 100, or another client holds control.
  • RobotTimeout: The robot did not answer within 5 s.
  • RobotConnectionError: The client is not connected.
  • ValueError: percent cannot be read as a number, for example "fast". Nothing is sent.
  • TypeError: percent is None or another type that is no number. Nothing is sent.

If the connection drops while the call waits for the robot's answer, it raises CommandRejected with the code CONNECTION_LOST (DISCONNECTED after disconnect()); while it waits for the robot's status, RobotConnectionError.

Like every immediate command, it also answers BAD_ARGS when a raw client sends a value the robot cannot read at all, and INTERNAL when it fails inside the robot.

Protocol

A client that does not use robotclient sends this over the TCP command protocol (port 29000) for the example above:

{"id": "c1", "cmd": "set_joint_speed", "args": [50.0]}

See also