Skip to main content

Simple FANUC RMI client

Project description

FANUC RMI Client

Python client for FANUC RMI with reusable functions (no CLI entrypoint).

Install (pip)

python3 -m venv .venv
source .venv/bin/activate
pip install fanuc-rmi

Create Client + Connect

from fanuc_rmi import RobotClient

# create client (no network calls yet)
robot = RobotClient(
    host="192.168.1.22",
    startup_port=16001,
    main_port=16002,
    connect_timeout=5.0,
    socket_timeout=100.0,
    reader_timeout=100.0,
    attempts=5,
    retry_delay=0.5,
    startup_pause=0.25,
)

robot.connect()            # returns None
robot.initialize(uframe=0, utool=1)  # returns None

Speed Override

# set speed override (controller-specific range)
robot.speed_override(50)  # returns None

Wait Time

# wait in seconds (uses sequence_id for ordering)
robot.wait_time(2.5, sequence_id=5)  # returns None

Linear Relative Motion

# move relative to current pose (mm / deg)
relative_displacement = {"X": 100, "Y": 0, "Z": 0, "W": 0, "P": 0, "R": 0}
robot.linear_relative(relative_displacement, speed=500, sequence_id=1)  # mm/sec, returns None

Linear Absolute Motion

# move to absolute pose (mm / deg)
absolute_position = {"X": 491.320, "Y": -507.016, "Z": 223.397, "W": -179.577, "P": 52.380, "R": -93.233}
robot.linear_absolute(absolute_position, speed=300, sequence_id=2)  # mm/sec, returns None

Joint Relative Motion

# move joints relative to current (deg)
relative_joints = {"J0": 0, "J1": 0, "J2": 0, "J3": 0, "J4": 0, "J5": 0, "J6": 0, "J7": 0, "J8": 0, "J9": 0}
robot.joint_relative(relative_joints, speed_percentage=40, sequence_id=3)  # returns None

Joint Absolute Motion

# move to absolute joint angles (deg)
absolute_joints = {"J1": 63.252, "J2": 31.488, "J3": -35.602, "J4": 18.504, "J5": -101.313, "J6": 108.650, "J7": 0.000, "J8": 0.000, "J9": 0.000}
robot.joint_absolute(absolute_joints, speed_percentage=40, sequence_id=4)  # returns None

Read Cartesian Position (writes file)

robot.read_cartesian_coordinates()  # returns None
# writes to ./robot_position_cartesian.txt (auto-created)

Read Joint Angles (writes file)

robot.read_joint_coordinates()  # returns None
# writes to ./robot_position_joint.txt (auto-created)

Disconnect

robot.close()  # returns None

Output Files

  • robot_position_cartesian.txt: created automatically when reading Cartesian poses
  • robot_position_joint.txt: created automatically when reading joint poses

Notes

  • Requires Python 3.11+.
  • If you cloned the repo, main.py is a runnable example.
  • For back-to-back moves, increment sequence_id to preserve ordering.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fanuc_rmi-0.1.4.tar.gz (6.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fanuc_rmi-0.1.4-py3-none-any.whl (7.0 kB view details)

Uploaded Python 3

File details

Details for the file fanuc_rmi-0.1.4.tar.gz.

File metadata

  • Download URL: fanuc_rmi-0.1.4.tar.gz
  • Upload date:
  • Size: 6.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for fanuc_rmi-0.1.4.tar.gz
Algorithm Hash digest
SHA256 d3cf58058b4e649d4aed91ef2f2c986e394e8ff4244fe74dff5e4937ef521c84
MD5 664294cc49e37cc8a9276115ad1fd9b0
BLAKE2b-256 2337fa4bedf8429b564c8399bd549a936e8de200686aae6743bafc0d80c063c4

See more details on using hashes here.

File details

Details for the file fanuc_rmi-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: fanuc_rmi-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 7.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for fanuc_rmi-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 3078052ab2560d6d69928ae5bd0510e10f7c78fb9af109ec90c758eda9fb1a46
MD5 9aa9869ce892fb3ee236a42e62176738
BLAKE2b-256 cf44ef900ee81cee1cfc4bb3e4a4b16b335e2b3ee1b3f2c2228580d21db7a12b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page