1) Applicable version of the Robotiq Gripper

 

2) Connection method of the Robotiq Gripper and the xArm 

●  Connector of the Robotiq Gripper

●  The tool/end connector of the xArm

●  Connection method of the Robotiq Gripper and xArm

The following table shows the corresponding connection between the connector of the robotiq gripper and the end/tool connector of the xArm:

3) Control the Robotiq Gripper through xArm-Python-SDK

Example:
Example of controlling the Robotiq Gripper ( 2F-85 / 2F-140 ) by sending commands through xArm-Python-SDK.

https://github.com/xArm-Developer/xArm-Python-SDK/blob/master/example/wrapper/thridparty/set_robotiq_gripper.py

#!/usr/bin/env python3  
# Software License Agreement (BSD License)  
#
# Copyright (c) 2019, UFACTORY, Inc.
# All rights reserved.  
#  
# Author: Vinman      

"""  
Example: Robotiq Gripper Control  Please make sure that the gripper is attached to the end.
"""    
import os  
import sys  
import time  
sys.path.append(os.path.join(os.path.dirname(__file__), '../../..'))
   
from xarm.wrapper import XArmAPI  
from configparser import ConfigParser  
parser = ConfigParser()  
parser.read('../robot.conf')  
try:      
    ip = parser.get('xArm', 'ip')  
except:      
    ip = input('Please input the xArm ip address[192.168.1.194]:')      
    if not ip:          
        ip = '192.168.1.194'      

arm = XArmAPI(ip)  
time.sleep(0.5)  

if arm.warn_code != 0:      
    arm.clean_warn()  
if arm.error_code != 0:      
    arm.clean_error()    

ret = arm.core.set_modbus_timeout(5)  
print('set modbus timeout, ret = %d' % (ret[0]))    
ret = arm.core.set_modbus_baudrate(115200)  
print('set modbus baudrate, ret = %d' % (ret[0]))    

# robotiq open/close test  
data_frame = [0x09, 0x10, 0x03, 0xE8, 0x00, 0x03, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00]  
ret = arm.core.tgpio_set_modbus(data_frame, len(data_frame))  
print('set modbus, ret = %d' % (ret[0]))  
time.sleep(0.1)    

data_frame = [0x09, 0x10, 0x03, 0xE8, 0x00, 0x03, 0x06, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00]  
ret = arm.core.tgpio_set_modbus(data_frame, len(data_frame))
print('set modbus, ret = %d' % (ret[0]))    

arm.disconnect() 

Did this answer your question?