Skip to content

jog

Runs at once JOG mode Takes control

Start jogging one joint: it moves until jog_stop() or a limit. The joint speeds up to speed % of its speed limit and keeps moving until jog_stop(). It speeds up and brakes at the jog's acceleration and jerk (set_jog_accel(), set_jog_profile(), set_jog_jerk_factor()). Near the end of its range it brakes by itself and comes to rest exactly at its joint limit, at any speed; with self-collision checking on, it also comes to rest at the jog margin before two parts of the arm would touch. Asking for the same direction again there moves nothing.

Calling jog() again for the same joint and direction changes the speed smoothly, as a joystick does. For another joint or direction, the moving joint first brakes to rest, then the new jog starts: one joint moves at a time. The call returns once the robot has accepted the jog; it does not wait for the motion.

Syntax

robot.jog(joint, direction, speed)

Arguments

Name Type Default Description
joint int required The joint to move, counted from 0: 0 is J1 and 5 is J6 on a six-joint arm, a whole number. A joint that does not exist is refused.
direction int required 1 for the joint's positive direction, -1 for its negative one; a larger whole number counts by its sign. 0 stops the jog as jog_stop() does.
speed float required The speed in percent of the joint's speed limit, from 0 to 100: 10 is 10 %. 0 moves nothing.

Returns

Any

None: the robot sends no value back.

Examples

import time
robot.enter_jog_mode(wait=True)
robot.jog(0, 1, 5)
time.sleep(0.5)
robot.jog_stop()

Further details

Note

The braking is planned, so a stop takes time: with the start settings about 0.4 s from 20 % speed and 0.9 s from full speed, while the joint moves on at about half its speed.

Further details

Warning

A jog has no time limit. The joint keeps moving until jog_stop(), a mode change, an error or the end of your program's connection, which stops it as jog_stop() does. A program that hangs while connected keeps it moving to its joint limit. It does not brake for safety zones: entering a stop zone stops the robot with an error. Keep a hand near the E-stop.

Usage restrictions 4 codes

This command runs at once; it is not queued. The robot accepts it only when it is in JOG mode, 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:

  • [6010] Command not allowed now — the message names the mode or state it needs
  • [6101] Control held by another client — another client holds control; the message names it
  • [6003] Invalid arguments — the joint does not exist, the direction is not a whole number, the speed is not a number from 0 to 100, or the command did not carry exactly these three values
  • [6025] RTI not running or not answering — rTI did not answer within 1 s: it is not running or not responding. The command may still have taken effect

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

  • CommandRejected: The robot refused it, for example outside JOG mode, or another client holds control. Or RTI refused it or did not answer within 1 s (Errors:).
  • RobotTimeout: The robot did not answer within 5 s.
  • RobotConnectionError: The client is not connected.
  • ValueError: joint, direction or speed cannot be read as a number, or joint or direction is not a whole number. Nothing is sent.
  • TypeError: An argument 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": "jog", "args": [0, 1, 5.0]}

See also