Get Target Speed Fraction
SUMMARY
Get Target Speed Fraction returns the target speed fraction set by the teach-pendant speed slider as a float in [0.0, 1.0]. It is one of the two factors whose product is reported by Get Speed Scaling Combined.
SUPPORTED ROBOTS
Currently supported only on Universal Robots.
UNITS
Returns a dimensionless fraction in [0.0, 1.0].
The Skill
fraction = robot.get_target_speed_fraction()The Code
Example: Read the Teach-Pendant Speed Slider
Connect to the robot, read the target speed fraction, and log it.
"""
Read target speed fraction example for the Synapse SDK.
``get_target_speed_fraction`` returns the **target/desired** speed fraction
set by the operator — either via the teach-pendant speed slider
Currently supported only for Universal Robots (UR10e).
Usage:
python get_target_speed_fraction.py --ip <ROBOT_IP>
"""
import argparse
from loguru import logger
from telekinesis.synapse.robots.manipulators import universal_robots
def main(ip: str):
"""Log the target speed fraction [0.0, 1.0]."""
# Create and connect to the robot
robot = universal_robots.UniversalRobotsUR10E()
robot.connect(ip=ip)
try:
fraction = robot.get_target_speed_fraction()
logger.success(f"Target speed fraction: {fraction:.3f}")
finally:
robot.disconnect()
if __name__ == "__main__":
parser = argparse.ArgumentParser(description="Read target speed fraction Synapse example")
parser.add_argument("--ip", type=str, required=True, help="UR robot IP address")
args = parser.parse_args()
main(ip=args.ip)The Explanation of the Code
get_target_speed_fraction returns the teach-pendant speed slider value as a float in [0.0, 1.0]. A value of 1.0 means the slider is at 100%; 0.5 means the operator has limited motion to 50% of the programmed speed. This factor is combined with the controller's runtime speed-scaling factor (safety slowdowns, program-level overrides, etc.) to produce the effective scaling returned by Get Speed Scaling Combined.
How to Tune the Parameters
This skill takes no parameters.
Return Value
| Type | Description |
|---|---|
float | Target speed fraction [0.0, 1.0] from the teach-pendant speed slider. |
Where to Use the Skill
- Operator-override detection - Detect when the operator has lowered the speed slider mid-task.
- Adaptive program logic - Skip or extend dwell times based on the operator-selected speed.
When Not to Use the Skill
- You need the effective scaling actually applied - use Get Speed Scaling Combined, which folds in runtime safety / program scaling on top of the slider value.

