Discussion

Left ArrowBack to discussions page
bcastetsbcastets Posts: 36Vacuum Beta tester Handy
Clients ask us form time to time how to control the gripper from a PC using UR controller client interface.

Here is an example of Python script made by my colleague to control the gripper remotely by the port 30002.

Native UR command like moveL or servoJ can be sent directly to port 30002.  All functions implemented by a URCap like the Robotiq Gripper function are unknown even if the URCap is installed.  When a program is written on the teach pendant, all URCap function definitions are implemented in this program each time it is compiled and executed by the UR controller.  This means if you try to send the command line rq_move_and_wait(58) function to the controller by the port 30003, it will never work because it's unknown to the controller.
To achieve a gripper function, the definition of this function must also be sent.

If you look at the attached example where the python program sends a file called gripper.script, there is 650 line of function definitions to achieve a single activate and a move function of the gripper.  These 650 includes all the gripper functions.  At the end of the file, the desired commands are there.



The definition of gripper function is evolving with time. You can find the latest gripper function definition in the .script file save with your program on the controller. You can get it using UR backup magic file or using FTP.

For more information about client interface you can have a look to UR documentation:
https://www.universal-robots.com/how-tos-and-faqs/how-to/ur-how-tos/overview-of-client-interfaces-21744/

Comments

  • albertgoalbertgo Posts: 5 Apprentice
    So, to make the gripper move, I put in a command at the bottom of the Gripper.script file and send it to the correct port?
  • bcastetsbcastets Posts: 36Vacuum Beta tester Handy
    albertgo said:
    So, to make the gripper move, I put in a command at the bottom of the Gripper.script file and send it to the correct port?
    Yes, that it. It should work but may take some time to send the script.
  • albertgoalbertgo Posts: 5 Apprentice
    How do I know if the script was sent properly?
Sign In or Register to comment.
Left ArrowBack to discussions page