Get Controller Frequency
SUMMARY
Get Controller Frequency measures and returns the controller update rate in Hz by sampling the timestamp field over a short window.
SUPPORTED ROBOTS
Currently supported only on Universal Robots.
UNITS
Returns the controller update rate in Hz.
The Skill
frequency = robot.get_controller_frequency()The Code
Example: Measure and Log Controller Frequency
Read the controller update frequency and log the result.
"""
Read controller frequency example for the Synapse SDK.
``get_controller_frequency`` measures the controller's update rate by
polling ``get_timestamp()`` for ``window_s`` seconds and computing
``1 / mean_step_time``.
Currently supported only for Universal Robots (UR10e).
Usage:
python get_controller_frequency.py --ip <ROBOT_IP>
"""
import argparse
from loguru import logger
from telekinesis.synapse.robots.manipulators import universal_robots
def main(ip: str):
"""Log the measured controller update frequency [Hz]."""
# Create and connect to the robot
robot = universal_robots.UniversalRobotsUR10E()
robot.connect(ip=ip)
try:
# window_s defaults to 0.2 s; pass explicitly for clarity
frequency = robot.get_controller_frequency(window_s=0.2)
logger.success(f"Controller frequency [Hz]: {frequency:.2f}")
finally:
robot.disconnect()
if __name__ == "__main__":
parser = argparse.ArgumentParser(description="Read controller frequency 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_controller_frequency measures the controller update rate by sampling timestamps over a short window (approximately 0.2 seconds) and computing the average inter-sample rate. The result is in Hz. On Universal Robots UR3/UR5/UR10 series the typical value is 500 Hz. Use this value to set sampling intervals, validate that the controller is running at its rated frequency, or compute the number of control steps per unit time.
How to Tune the Parameters
This skill takes no input parameters.
Return Value
| Return Type | Description |
|---|---|
float | Controller update frequency in Hz. |
Where to Use the Skill
- Validate controller health before starting a time-critical task.
- Compute sampling intervals for state-logging loops.
- Confirm the controller is not operating in a degraded or reduced-rate mode.

