Note that before using myblockly for development, you need to run mc.set_gripper_mode(0)
with a python program to set the gripper to 485 mode. Or use the module in myblockly to set the gripper mode to "Transparent Transmission"
Preparation before you begin
Make sure the robotic arm is connected to the computer
Make sure the machine is normal
Make sure the machine is power on
Grippers include adaptive grippers, electric grippers and pneumatic grippers. Here we take the adaptive gripper as an example to explain how to use myBlockly to control the gripper.
How to use myBlockly to control the adaptive gripper attached to the myCobot 320 M5Stack robotic arm
Method module 1: Set gripper status
Parameter introduction:
This module has two parameters that can be adjusted:
Clamp status parameter: 1 indicates the clamp claws closed state, 0 indicates the clamp claws open state
Speed parameter: indicates the speed at which to rotate, the value range is 0~100
Clamp type parameter: select adaptive clamp here
Purpose: Make the gripper enter the specified state (open or closed) at a specified speed
Method module 2: Set the value of the gripper
Parameter introduction:
This module has two parameters that can be adjusted:
The parameter of the gripper value: indicates the position that the gripper wants to reach, and the value range is 0~100.
Speed parameter: indicates the speed at which to rotate, the value range is 0~100.
Clamp type parameter: select adaptive clamp here
Purpose: Make the gripper rotate to a specified position at a specified speed.
Method module 3: Is the gripper in motion
Purpose: To determine whether the gripper is running
The graphics code is as follows:
Implementation content:
Move joint 2 of the robotic arm to 30 degrees at a speed of 50. After two seconds,
The gripper opens at a speed of 70. After two seconds,
The gripper close at speed 70,
After the process of opening and closing the gripper is cycled 5 times, the program ends.
Note:
If you can't control the girpper from the above example, maybe you need to set the gripper mode
And run the program
Note: If you are using an M5 version of the machine, you need to change the port parameter to COM