torayeff / fanucpy

Python Interface for FANUC robots
Apache License 2.0
109 stars 29 forks source link

How to make function for different Tools #21

Closed madinwei closed 1 year ago

madinwei commented 1 year ago

@torayeff, again Thank you for this awesome repository and your help and response in earlier issues.

I am working on a welding scenario, so I want to make a function for the welding like robot.gripper(True) from your code, is it possible to give me some instructions or information on how you made the gripper function?

torayeff commented 1 year ago

Essentially gripper function is a wrapper around the robot.set_rdo (rdo_num=7, value=True) function. If your end effector is connected to one of the robot inputs, you can set/unset values using set_rdo. Alternatively, you can write a teach pendant program and call it from fanucpy as robot.call_prog(prog_name)

madinwei commented 1 year ago

@torayeff, thank you so much for your help. with using the robot.call_prog(prog_name) and adding a .tp program to the teach pendant it works fine. regarding the robot.set_rdo (rdo_num=7, value=True) I have not fully understood it, but I will also try to use it.