The Use of Gripper
Preparation
M5Stack series: Make sure the robot is connected with PC (Go to 5.1 myBlockly for more information).
Other series: Make sure the robot is in normal status.
This section takes myPalletizer 260 M5Stack as an example to explain the use of gripper. Go to 2.8 Accessories for more information about gripper.
Purpose for this section
This section introduces instructions for using gripper.
Introduction to API
set_gripper_ini()
Applicable to myCobot 280 series, mechArm 270 series, and myPalletizer 260 series
- Function: Set the current position to zero
set_gripper_state(flag, speed)
Applicable to myCobot 280 series, mechArm 270 series, and myPalletizer 260 series
Parameter:
- flag (int):
0
means open, and1
means close - speed (int): range from 0 to 100
- flag (int):
Function: set gripper switch state
set_gripper_value(value, speed)
Applicable to myCobot 280 series, mechArm 270 series, and myPalletizer 260 series
Parameter:
value()
: range from 0 to 100speed()
: range from 0 to 100
Function: set gripper value
is_gripper_moving()
Applicable to myCobot 280 series, mechArm 270 series, and myPalletizer 260 series
- Function: Judge whether the gripper is moving or not
Simple Demo
Program for display
Motion:
Joint 2 move to 30 degree at the speed of 50,
after 2 seconds, gripper opens at the speed of 70,
after 2 seconds, gripper closes at the speed of 70,
the process loops 5 times.