Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Working with External Rail using Python API
#1
Question 
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   TargetTest.py (Size: 1.07 KB / Downloads: 24)

I tried following the steps in this post: https://robodk.com/forum/Thread-External...Python-API 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: 42)
#2
Your robot item was set to the rail, not the robot. To solve the problem you should properly retrieve the robot arm. Example:
Code:
# Get a named robot in your cell
robot = RDK.Item('Fanuc R-2000iB/165F', ITEM_TYPE_ROBOT)

# Print the robot name
print(robot.Name())


Alternatively, you can also retrieve the parent robot an axis is linked to by using getLink. Example:
Code:
# 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
print(robot.Name())
  




Users browsing this thread:
1 Guest(s)