yahboom
HomeTutorialsProduct
Solution
Blog
Online Store
About Us
EN/中文
Store
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
2.2 myStudio
  • 1. myStudio
  • 2. myStudio environment setup
  • 3. Install driver
  • 4. Burn and update firmware
3. Firmware Description
  • 1.Firmware Description
  • 2.Burn 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

7.Use of adaptive grippers

Use of adaptive grippers

Python API Usage Instructions

End-of-arm gripper control

1 set_gripper_state(flag, speed, _type_1=None)

  • Function : Let the gripper enter the specified state at a specified speed

  • parameter :

    • flag (int) : 0 - open, 1 - close, 254 - release

    • speed (int) : 1 ~ 100

    • _type_1 (int) :

      • 1 : Adaptive gripper (adaptive gripper by default)

      • 2 : Five-finger dexterity

      • 3 : Parallel jaws

      • 4 : Flexible gripper

  • Return value:

    • 1 - Complete

2 set_gripper_value(gripper_value, speed, gripper_type=None)

  • Function : Allow the gripper to rotate to a specified position at a specified speed

  • parameter :

    • gripper_value (int) : 0 ~ 100

    • speed (int) : 1 ~ 100

    • gripper_type (int) :

      • 1 : Adaptive gripper (adaptive gripper by default)

      • 2 : Five-finger dexterity

      • 3 : Parallel jaws

      • 4 : Flexible gripper

  • Return value:

    • 1 - Complete

3 set_gripper_calibration()

  • Function : Set the current position of the gripper to zero

  • Return value:

    • 1 - Complete

4 set_gripper_mode(mode)

  • Function : Set the gripper mode

  • parameter:

    • mode : 0 - transparent transmission. 1 - port mode.

  • Return value:

    • 1 - Complete

5 get_gripper_mode()

  • Function : Get the gripper mode

  • Return value:

    • mode : 0 - transparent transmission. 1 - port mode.

Simple Case

x
from pymycobot.mycobot320 import MyCobot320
import time


# MyCobot320 class initialization requires two parameters:
# The first is the serial port string, such as:
# linux: "/dev/ttyUSB0"
# windows: "COM3"
# The second is the baud rate:
# M5 version: 115200
#
# Example:
# mycobot-M5:
# linux:
# mc = MyCobot320("/dev/ttyUSB0", 115200)
# windows:
# mc = MyCobot320("COM3", 115200)


# Initialize MyCobot320 object
mc = MyCobot320("COM13", 115200)
# Move it to zero position
mc.send_angles([0, 0, 0, 0, 0, 0], 40)
time.sleep(3)
# The professional adaptive gripper needs to be set to transparent transmission mode before use
mc.set_gripper_mode(0)
time.sleep(1.5)

num = 5
while num > 0:
# Set the gripper state, open the gripper quickly at a speed of 70, parameter 1 represents the professional adaptive gripper type
mc.set_gripper_state(0, 70, 1)
time.sleep(3)
# Set the gripper state, close the gripper quickly at a speed of 70, parameter 1 represents the professional adaptive gripper type
mc.set_gripper_state(1, 70, 1)
time.sleep(3)
num -= 1

num = 3
while num > 0:
# Set the gripper value to 0, the speed to 70, and parameter 1 represents the professional adaptive gripper type
mc.set_gripper_value(0, 70, 1)
time.sleep(3)
# Set the gripper value to 50, the speed to 70, and parameter 1 represents the professional adaptive gripper type
mc.set_gripper_value(50, 70, 1)
time.sleep(3)
# Set the gripper value to 0, the speed to 70, and parameter 1 represents the professional adaptive gripper type
mc.set_gripper_value(0, 70, 1)
time.sleep(3)
num -= 1

# Get the gripper value
print("gripper value:", mc.get_gripper_value())
Use Cases
Use of force-controlled grippers

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/中文