Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5

Working with External Rail using Python API

I am trying to setup a Fanuc robot on a single axis external rail. I followed the tutorials and believe I have the rail synced with the robot. I have taught a reference frame for the table in the cell and a TCP for my tool. Teaching targets in the GUI and selecting them moves the robot as expected. However, trying to generate similar results in Python using the attached script, does not give the same result. 

.py (Size: 1.07 KB / Downloads: 285)

I tried following the steps in this post: but did not have any more luck. I attempted to interrogate the joint values of the target and it looks like the rail should be set to 0 however performing a joint move to the target sets the rail value to ~115mm. Any advice would be appreciated!

Attached Files
.rdk   TapeCell.rdk (Size: 8.21 MB / Downloads: 407)
Your robot item was set to the rail, not the robot. To solve the problem you should properly retrieve the robot arm. Example:
# Get a named robot in your cell
robot = RDK.Item('Fanuc R-2000iB/165F', ITEM_TYPE_ROBOT)

# Print the robot name

Alternatively, you can also retrieve the parent robot an axis is linked to by using getLink. Example:
# Get the first robot in your cell
robot = RDK.Item('', ITEM_TYPE_ROBOT)

# Get the parent robot of an external axis if it is synchronized
robot = robot.getLink(ITEM_TYPE_ROBOT)

# Print the robot name

Users browsing this thread:
1 Guest(s)