yahboom
HomeLearn
Solution
Blog
Online Store
About Us
EN/中文
myCobot 320 Arm📖
1.Product Feature
  • 1.Functional Parameters
  • 2.Controller Parameters
  • 3.Structural Parameters
  • 4.Electronic Parameters
  • 5.Coordinate System
  • 6.Introduction of Adaptive Gripper
  • 7.Introduction of force-controlled gripper
2.Common Problem
  • 1.how to ask
  • 2.driver
  • 3.software
  • 4.hardware
3.First Install and Use
  • 1.Product Standard List
  • 2.Product Unboxing Guide
  • 3.Power-on Test Guide
4.Basic Application
1. miniRoboFLow
  • 1. miniRoboFLow
  • 2. Drag & Play
  • 3. Joint Calibration
  • 4. Computer Connect
  • 5. Robot Information
2.1 myblockly
  • 1. What is myBlockly
  • 2. Preparations before using myBlockly
  • 3. myBlockly download and install
  • 4. myBlockly interface display and use of basic functions
  • 5. Control RGB light panel
  • 6. Control the robotic arm to return to the origin
  • 7. Control single joint movement
  • 8. Control multiple joints
  • 9. Use of adaptive grippers
  • 10. Use of force-controlled grippers
  • 11. Q&A
  • 12. API
3. Firmware Description
  • 1.Firmware Description
  • 2.Burn Firmware
2.2 myStudio
  • 1. myStudio
  • 2. myStudio environment setup
  • 3. Install driver
  • 4. Burn and update firmware
5.Mobile APP control
  • Mobile APP control
6.SDK Development
1.Development Environment Construction
  • 1.Development Environment Construction
2.Python
  • 1.What is Python
  • 2.Environment Building
  • 3.Python API usage instaructions
  • 4.TCP IP
  • 5.Drag to teach
  • 6.Use Cases
  • 7.Use of adaptive grippers
  • 8.Use of force-controlled grippers
3.ROS1
  • 1.ROS
  • 2.Environment Building
  • 3.ROS basics
  • 4.Rviz use
  • 5.Basic function case
  • 6.Use of adaptive grippers
  • 7.Use of force-controlled grippers
4.ROS2
  • 1.ROS2 introduction
  • 2.Environment Building
  • 3.ROS2 basics
  • 4.Rviz2 use
  • 5.Basic function case
5.C Sharp(C#)
  • 1.C#
  • 2.Environmental construction
  • 3.Mechanical control
  • 4.myCobot API
  • 5.Use Cases
  • 6.Use of adaptive grippers
6.c plus plus (C++)
  • 1.C++
  • 2.CPlus Download
  • 3.build
  • 4.API
  • 5.example
7.Arduino
  • 1.Arduino
  • 2.Arduino Download
  • 3.API
  • 4.example
  • 5.Use of adaptive grippers
8.Serial communication
  • 1.Serial communication
  • 2.Use of force-controlled grippers
7.Documents Download
  • 1.Product Brochure
  • 2.Software and Source Code
  • 3.System lnformation
Download
  • 3D_Model_File
  • Android Mobile APP
  • Manual
Download ZIP

Welcome to myCobot 320 Arm repository

8.Use of force-controlled grippers

Use of force-controlled grippers

1 Python control API description

Note : The time interval between calling each instruction of the gripper must be greater than 1.5 seconds.

set_pro_gripper(gripper_id, address, value)

  • Function : Set the parameters of the Pro force-controlled gripper. You can set a variety of parameter functions. Please see the following table for details.

  • parameter:

    • gripper_id ( int ): gripper ID, default value is 14, value range is 1 ~ 254.

    • address ( int ): The command number of the gripper.

    • value : the parameter value corresponding to the instruction number.

Functiongripper_idaddressvalue
Set the gripper ID1431 ~ 254
Set the gripper enable state14100 or 1, 0 - disable; 1 - enable
Set the clockwise runnable error of the gripper14210 ~ 16
Set the anti-clockwise runnable error of the gripper14230 ~ 16
Setting the minimum actuation force of the gripper14250 ~ 254
IO output settings14290, 1, 16, 17
Set the IO opening angle14300 ~ 100
Set IO closing angle14310 ~ 100
Set the virtual position value of the servo14410 ~ 100
Setting the holding current14431 ~ 254
  • Return Value

    • Please see the following table:

FunctionReturn Value
Set the gripper ID0 - failed; 1 - successful
Set the gripper enable state0 - failed; 1 - successful
Set the clockwise runnable error of the gripper0 - failed; 1 - successful
Set the anti-clockwise runnable error of the gripper0 - failed; 1 - successful
Setting the minimum actuation force of the gripper0 - failed; 1 - successful
IO output settings0 - failed; 1 - successful
Set the IO opening angle0 - failed; 1 - successful
Set IO closing angle0 - failed; 1 - successful
Set the virtual position value of the servo0 - failed; 1 - successful
Setting the holding current0 - failed; 1 - successful

get_pro_gripper(gripper_id, address)

  • Function : Get the parameters of Pro force-controlled gripper, and you can get various parameter functions. Please see the following table for details.

  • parameter:

    • gripper_id ( int ): gripper ID, default value is 14, value range is 1 ~ 254.

    • address ( int ): The command number of the gripper.

Functiongripper_idaddress
Read the firmware major version number141
Read the firmware minor version number142
Read the gripper ID143
Read the clockwise runnable error of the gripper1422
Read the anti-clockwise runnable error of the gripper1424
Read the minimum actuation force of the gripper jaws1426
Read IO opening angle1434
Read IO closing angle1435
Get the amount of data in the current queue1440
Read the virtual position value of the servo1442
Reading the holding current1444
  • Return value:

    • Check the following table (if the return value is -1, it means no data can be read):

FunctionReturn Value
Read the firmware major version numberMajor version number
Read the firmware minor version numberMinor version number
Read the gripper ID1 ~ 254
Read the clockwise runnable error of the gripper0 ~ 254
Read the anti-clockwise runnable error of the gripper0 ~ 254
Read the minimum actuation force of the gripper jaws0 ~ 254
Read IO opening angle0 ~ 100
Read IO closing angle0 ~ 100
Get the amount of data in the current queueReturns the amount of data in the current absolute control queue
Read the virtual position value of the servo0 ~ 100
Reading the holding current1 ~ 254

set_pro_gripper_angle(gripper_id, gripper_angle)

  • Function : Set the angle of the force-controlled gripper.

  • parameter:

    • gripper_id ( int ): gripper ID, default value is 14, value range is 1 ~ 254.

    • gripper_angle ( int ): Gripper angle, value range 0 ~ 100.

  • Return value:

    • 0 - Failed

    • 1 - Success

get_pro_gripper_angle(gripper_id)

  • Function : Read the angle of the force-controlled gripper jaws.

  • parameter:

    • gripper_id ( int ): gripper ID, default value is 14, value range is 1 ~ 254.

  • Return value : int 0 ~ 100

set_pro_gripper_open(gripper_id)

  • Function : Open the force-controlled gripper.

  • parameter:

    • gripper_id ( int ): gripper ID, default value is 14, value range is 1 ~ 254.

  • Return value:

    • 0 - Failed

    • 1 - Success

set_pro_gripper_close(gripper_id)

  • Function : Close the force-controlled gripper.

  • parameter:

    • gripper_id ( int ): gripper ID, default value is 14, value range is 1 ~ 254.

  • Return value:

    • 0 - Failed

    • 1 - Success

set_pro_gripper_calibration(gripper_id)

  • Function : Set the zero position of the force-controlled gripper. (The zero position needs to be set first when using it for the first time)

  • parameter:

    • gripper_id ( int ): gripper ID, default value is 14, value range is 1 ~ 254.

  • Return value:

    • 0 - Failed

    • 1 - Success

get_pro_gripper_status(gripper_id)

  • Function : Read the clamping status of the force-controlled gripper.

  • parameter:

    • gripper_id ( int ): gripper ID, default value is 14, value range is 1 ~ 254.

  • Return value:

    • 0 - Moving.

    • 1 - Motion stopped, no clamping detected.

    • 2 - Stop motion, clamping object detected.

    • 3 - After the clamping object is detected, the object falls.

set_pro_gripper_torque(gripper_id, torque_value)

  • Function : Set the torque of the force-controlled gripper.

  • parameter:

    • gripper_id ( int ): gripper ID, default value is 14, value range is 1 ~ 254.

    • torque_value ( int ): Torque value, ranging from 1 to 100.

  • Return value:

    • 0 - Failed

    • 1 - Success

get_pro_gripper_torque(gripper_id)

  • Function : Read the torque of the force-controlled gripper.

  • parameter:

    • gripper_id ( int ): gripper ID, default value is 14, value range is 1 ~ 254.

  • Return value: ( int ) 100 ~ 300

set_pro_gripper_speed(gripper_id, speed)

  • Function : Set the force-controlled gripper speed.

  • parameter:

    • gripper_id ( int ): gripper ID, default value is 14, value range is 1 ~ 254.

    • speed (int): Gripper movement speed, ranging from 1 to 100.

  • Return value:

    • 0 - Failed

    • 1 - Success

get_pro_gripper_default_speed(gripper_id, speed)

  • Function : Read the default speed of the force-controlled gripper.

  • parameter:

    • gripper_id ( int ): gripper ID, default value is 14, value range is 1 ~ 254.

  • Return value : the default movement speed of the gripper, ranging from 1 to 100.

set_pro_gripper_abs_angle(gripper_id, gripper_angle)

  • Function : Set the absolute angle of the force-controlled gripper.

  • parameter:

    • gripper_id ( int ): gripper ID, default value is 14, value range is 1 ~ 254.

    • gripper_angle ( int ): Gripper angle, value range 0 ~ 100.

  • Return value:

    • 0 - Failed

    • 1 - Success

set_pro_gripper_pause(gripper_id)

  • Function : Pause movement.

  • parameter:

    • gripper_id ( int ) Gripper ID, default value is 14, value range is 1 ~ 254.

  • Return value:

    • 0 - Failed

    • 1 - Success

set_pro_gripper_resume(gripper_id)

  • Function : Sports recovery.

  • parameter:

    • gripper_id ( int ) Gripper ID, default value is 14, value range is 1 ~ 254.

  • Return value:

    • 0 - Failed

    • 1 - Success

set_pro_gripper_stop(gripper_id)

  • Function : Stop motion.

  • parameter:

    • gripper_id ( int ) Gripper ID, default value is 14, value range is 1 ~ 254.

  • Return value:

    • 0 - Failed

    • 1 - Success

2 Python zero calibration instructions

After attaching the gripper to the end of the robotic arm, run the following code, and the gripper will first open to its maximum, then fully close to complete the calibration.

x
from pymycobot import MyCobot320
mc=MyCobot320("COM1")#Enter the serial port number of the robot
mc.set_pro_gripper_calibration(14)#The default ID of the gripper is 14

3 Python control scenario examples

demo1: torque value adaptation

The user can observe the deformation degree of the force-controlled gripper after clamping the object under the premise of setting the corresponding torque value and select a torque value with the smallest deformation but can clamp the object normally. This torque value is the most suitable torque value for the current object.

x
from pymycobot import MyCobot320
import time
mc=MyCobot320("COM1")#Fill in the serial port number of the robot
mc.set_pro_gripper_torque(14,10)#Set the torque value
print(mc.get_pro_gripper_torque(14))#View the set torque value
mc.set_pro_gripper_open(14)#Gripper fully opens
time.sleep(3)
mc.set_pro_gripper_close(14)#Gripper fully closes

demo2: grab and move objects at points AB

x
from pymycobot import MyCobot320
import time
mc=MyCobot320("COM1")#Fill in the serial port number of the robot
mc.set_pro_gripper_torque(14,10)#Set the torque value of the gripper
print(mc.get_pro_gripper_torque(14))#Print the set gripper torque value
mc.set_pro_gripper_open(14)#First open the gripper completely
start_angles=[19.68, -1.23, -91.4, -0.52, 90.08, 60.29]
target_coords=[[231.3, -61.3, 232.7, 178.35, -2.7, -130.56],[231.3, 65.3, 232.7, 178.35, -2.7, -130.56]]
end_angles=[80,0,-85,0,90,60]
for i in range(len(target_coords)):
    mc.sync_send_angles(start_angles,50)
    mc.send_coords(target_coords[i],100,1)
    time.sleep(2)
    mc.send_coord(3,165,50)
    time.sleep(2)
    mc.set_pro_gripper_close(14)
    time.sleep(2)
    mc.send_coords(target_coords[i],100,1)
    mc.sync_send_angles(end_angles,100)
    mc.set_pro_gripper_open(14)
    time.sleep(2)

img

Use of adaptive grippers
ROS

COMPANY

  • About us
  • Team Style
  • Blog

LEARNING & EXPLORATION

  • Tutorials
  • Edge AI hardware
  • Educational robots
  • Embedded intelligent hardware

WHERE TO BUY

  • Yahboom Online Store
  • Amazon
  • Alibaba
  • AliExpress
  • Mercado

TECHNOLOGY SUPPORT

  • Email: support@yahboom.com

BE A DISTRIBUTOR

  • Email: sales@yahboom.com
QR Code

Copyright © 2017-2026 Yahboom. All Rights Reserved.

EN/中文