Here is the Zip file with the python program.
I did not had time to work on this. Will try to do something next week.s0972456 said:Hi, wonder if you have any update on that, still haven't figured out a way to control the epick remotely. Thanks
@nicolasmarcstephan
This post is about communicating with a robotiq gripper in modbus TCP. It involve the use of a universal controller.
I suppose that in your case you don't use a universal controller and have the gripper directly connected on your PC and try to communicate in Modbus RTU.
You can check the following article to learn how to do that:
https://dof.robotiq.com/discussion/1382/control-grippers-from-python-using-modbus-rtu#latest
@TXSTUni
pyModbusTCP is a python library that you need to install to be able to run this script.
https://pypi.org/project/pyModbusTCP/
You can PIP install it:
sudo pip install pyModbusTCP
@TXSTUni
This sample code activate the gripper. It is not a simple closing and opening.
The gripper activation is necessary before doing any action with the gripper. During activation the gripper check what is its maximum and minimum opening position.
To control the gripper, you need to read and write its modbus registers. Please check the section control of the manaul to learn more about modbus registers and gripper control.
https://assets.robotiq.com/website-assets/support_documents/document/2F-85_2F-140_General_PDF_20200211.pdf
Hi @bcastetsbcastets said:Here is the Zip file with the python program.
In your sample, what is the driver for the gripper? Was it on Ubuntu or Windows? Is the code still working?
I tried to follow the ROS library at http://wiki.ros.org/robotiq, but failed at Modbus TCP installation, as it said "Rosdep cannot find all required resouces of robotiq_modbus_tcp. How to configure it btw?
Thanks,
@ bcastets
Thank you @ bcastets so much for the answer and detailed explanation. It was very helpful and understandable. I tried to close it using your instruction by the following code, but nothing happens after gripper activation (the gripper gets closed and opened once). Could you help me with this? What could be the reason for this?
You may be interested in controlling from your PC Robotiq grippers (2F85, 2F140, Hand-e, ePick, airPick,...) using modbusTCP, Python and Robotiq universal controller.
I made a sample program which activate the gripper. I would like to share it with you.
I hope it will help in your projects !
For more details about how to control Robotiq gripper by reading and writing its memory registers, I recommend to check the user manual.