[toc]
Before using the Python API, please ensure that the following hardware and environment are complete:
-
Hardware
- MyCobot Pro 450 robot arm
- Network cable (for connecting the robot arm to the computer)
- Power adapter
- Emergency stop switch (for safe operation)
-
Software and Environment
- Python 3.6 or later installed
- The
pymycobotlibrary installed (using thepip install pymycobotterminal command) - Ensure that the MyCobot Pro 450 is properly powered on and in standby mode.
- Note: The Pro 450 server automatically starts upon powering on; no manual operation is required.
-
Network Configuration
-
MyCobot Pro 450 default IP address:
192.168.0.232 -
Default port number:
4500 -
Note: PC The local network card IP address must be set to the same network segment as the robot (e.g., 192.168.0.xxx, where xxx is a number between 2 and 254 and must not conflict with the robot).
-
Example:
- Robot IP:
192.168.0.232 - PC IP:
192.168.0.100 - Subnet mask:
255.255.255.0 - DNS Service:
114.114.114.114
- Robot IP:
-
Verification: After completing the network configuration, execute the following command on the PC terminal. If data packets are successfully returned, the network connection is normal:
ping 192.168.0.232
-
API (Application Programming Interface), also known as Application Programming Interface functions, are predefined functions. When using the following function interfaces, please import our API library at the beginning by entering the following code, otherwise it will not run successfully:
Note: Before use, please make sure that the MyCobot Pro 450 server is turned on and the PC and the robot are in the same network segment.
# Example
from pymycobot import Pro450Client
# The default IP address is "192.168.0.232" and the default port number is 4500
mc = Pro450Client('192.168.0.232', 4500)
if mc.is_power_on() !=1:
mc.power_on()
print(mc.get_angles())- function: get system version
- Return value: system version
- function: Read the revision number, for internal use only
- Return value: Correction version number
-
function: Detection robot model
-
Return value: Definition Rule: Actual machine model. For example, the MyCobot Pro 450 model is 4503
- function: Get the end version number
- Return value: End parameters(
float)
- function: Read end correction version number
- Return value: end correction version
- Function: Starts the robot (power on)
- Return value:
1- Power on successfully.2- Power on failed0- Power not on
-
Function: Shuts down the robot (power off)
-
Return value:
1- Command received successfully.
-
Function: Checks whether the robot is powered on
-
Return value:
1: Power on successfully0: Power not on2: Power on failed
-
function: Check if the robot is initialized for calibration
-
Return value:
bool: True if the robot is initialized for calibration, False otherwise
-
function: Query sports mode
-
Return value:
0: Interpolation mode1: Refresh mode
-
function: Set command refresh mode
-
Parameters:
1: Always execute the latest command first.0: Execute instructions sequentially in the form of a queue.
-
Function: Get the current robot's debug logging mode.
-
Return value:
int: Current debug logging state.0: No debug logs1: General debug log only (_debug.log)2: Motion-related log only (_move.log)3: General and motion-related logs (_debug.log + _move.log)4: Motor read/control frequency log only (_clock_rate_debug.log)5: General and motor frequency logs (_debug.log + _clock_rate_debug.log)6: Motion and motor frequency logs (_move.log + _clock_rate_debug.log)7: All logs
-
Function: Set the debug logging mode for the current robot.
-
Parameters:
log_state:int, debug log state (0 to 7)0: Do not log any debug logs1: General debug log only (_debug.log)2: Motion-related log only (_move.log)3: General and motion-related logs (_debug.log + _move.log)4: Motor read/control frequency log only (_clock_rate_debug.log)5: General and motor frequency logs (_debug.log + _clock_rate_debug.log)6: Motion and motor frequency logs (_move.log + _clock_rate_debug.log)7: Log all logs
-
Return value:
int- 1 - Success
- 0 - Failure
- 1 - Error
-
Function: Sets the current robot Modbus communication mode.
-
Parameters:
-
protocol_mode:int0 or 1-
0: close Modbus protocol -
1: open Modbus protocol
-
-
-
Return value:
int- 1 - Success
- 0 - Failure
- 1 - Error
-
Function: Gets the current robot communication mode.
-
Return value:
communication_mode:int- 0 - Socket communication mode
- 1 - 485 communication mode
protocol_mode:int0: Custom protocol1: Modbus protocol
-
Function: Reads the free movement mode
-
Return Value:
-
0: Disables free movement mode -
1: Enables free movement mode
-
-
Function: Sets the free movement mode (only when free movement is enabled can the joint be released by holding down the end button)
-
Parameters:
-
1: Enables free movement mode. -
0: Disables free movement mode.
-
-
Function: Read robot error and safety status
-
Return Value: 0 - Normal. For example, [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], Other - Robot abnormal
[Joint collision, whether in motion, whether J1 exceeds limits, whether J2 exceeds limits, whether J3 exceeds limits, whether J4 exceeds limits, whether J5 exceeds limits, whether J6 exceeds limits, whether J1 has a motor hardware error, whether J2 has a motor hardware error, whether J3 has a motor hardware error, whether J4 has a motor hardware error, whether J5 has a motor hardware error, whether J6 has a motor hardware error, whether J1 has a software communication error, whether J2 has a software communication error, whether J3 has a software communication error, whether J4 has a software communication error, whether J5 has a software communication error, whether J6 has a software communication error]
- function:Clear joint abnormalities
- Parameters:
joint_id: int. joint id 1 - 6, 254-All joints restored.
-
function:Read the number of communication exceptions
-
Parameters:
joint_id: int. joint id 1 - 6
-
Return value:
listA list of length 4, such as [0, 0, 0, 0], represents:-
[0]: Number of joint sending exceptions -
[1]: Number of joint reading exceptions -
[2]: Number of end-point sending exceptions -
[3]: Number of end-point sending exceptions
-
- Function: Read robot error information
- Return value:
int0: No error information1-6: The corresponding joint exceeds the limit position.32-36: Coordinate motion error.32: No coordinate solution. Please check if the arm span is near the limit.33: No adjacent solution for linear motion.34: Velocity fusion error.35: No adjacent solution for null space motion.36: No solution for singular position. Please use joint control to leave the singular point.
81~86: Collision triggered at joints J1 to J6. Please use theresumeinterface to recover.
- Function: Clear robot error information
- Function: Return to zero for a joint exceeding the limit
- Function: Read motor error information during robot motion
- Return value:
list, a list of 6, all zeros, indicating normal operation
- Function: Set the robot motion mode
- Parameter:
mode:int, 0 to 1, default 00: Position mode1: Torque mode
- Function: Get the robot motion mode
- Return value:
0: Position mode1: Torque mode
- function: get the degree of all joints
- Return value:
lista float list of all degree
- function: Get single joint angle
- Parameters:
joint_id(int): 1 ~ 6 - Return value:
float, single joint angle
- function: send one degree of joint to robot arm
- Parameters:
-
id: Joint id(genre.Angle), range int 1-6 -
degree: degree value(float)Joint Id range 1 -162 ~ 162 2 -125 ~ 125 3 -154 ~ 154 4 -162 ~ 162 5 -162 ~ 162 6 -165 ~ 165 -
speed:the speed and range of the robotic arm's movement 1~100
-
- function: Send all angles to all joints of the robotic arm
- Parameters:
angles: a list of degree value(List[float]), length 6speed: (int) 1 ~ 100
- function: Obtain robot arm coordinates from a base based coordinate system
- Return value: a float list of coord:[x, y, z, rx, ry, rz]
- function: send one coord to robot arm
- Parameters:
id:send one coord to robot arm, 1-6 corresponds to [x, y, z, rx, ry, rz]coord: coord value(float)Coord Id range x -474 ~ 474 y -474 ~ 474 z -180 ~ 677 rx -180 ~ 180 ry -180 ~ 180 rz -180 ~ 180 speed: (int) 1-100
- function:: Send overall coordinates and posture to move the head of the robotic arm from its original point to your specified point
- Parameters:
- coords: : a list of coords value
[x,y,z,rx,ry,rz],length6 - speed
(int): 1 ~ 100
- coords: : a list of coords value
- Function: Controls the core and stops all motion commands.
- Parameters:
deceleration: Whether to decelerate and stop. The default value is 0. 1 indicates a deceleration.
- Return Value:
1- stopped0- not stopped-1- error
- Function: Checks whether the program has paused a motion command.
- Return Value:
1- paused0- not paused-1- error
- Function: Resume robot motion and complete the previous command.
- Function: Stops robot motion.
- Parameters:
deceleration: Whether to decelerate and stop. Defaults to 0. 1 indicates a slow stop.
- Return Value:
1- Stopped0- Not stopped-1- Error
- function : judge whether in the position.
- Parameters:
data: Provide a set of data that can be angles or coordinate values. If the input angle length range is 7, and if the input coordinate value length range is 6flag: data type (value range 0 or 1)0: angle1: coord
- Return value:
1- true0- false-1- error
- function: judge whether the robot is moving
- Return value:
1moving0not moving-1error
- function: jog control angle
- Parameters:
joint_id: Represents the joints of the robotic arm, represented by joint IDs ranging from 1 to 6direction(int): To control the direction of movement of the robotic arm, input0as negative value movement and input1as positive value movementspeed: 1 ~ 100
- function: jog control coord.
- Parameters:
coord_id: (int) Coordinate range of the robotic arm: 1~6direction:(int) To control the direction of machine arm movement,0- negative value movement,1- positive value movementspeed: 1 ~ 100
- function: Single joint angle increment control
- Parameters:
joint_id: 1-6increment: Incremental movement based on the current position anglespeed: 1 ~ 100
- function: Single joint angle increment control
- Parameters:
joint_id: axis id 1 - 6.increment: Incremental movement based on the current position coordspeed: 1 ~ 100
- Function: Get the maximum speed
- Parameters:
mode:int0: Angular speed1: Coordinate speed
- Return value: Angular speed range: 1-150°/s, coordinate speed range: 1-200mm/s
- Function: Set the maximum speed
- Parameters:
mode:int0: Angular speed1: Coordinate speed
max_speed: Angular speed range: 1-150°/s, coordinate speed range: 1-200mm/s
- Function: Get the maximum acceleration
- Parameters:
mode:int0: Angular acceleration1: Coordinate acceleration
- Return value: Angular acceleration range 1 to 150°/s, coordinate acceleration range 1 to 400 mm/s
- Function: Set maximum motion acceleration
- Parameters:
mode:int0: Angular acceleration1: Coordinate accelerationmax_acc: Angular acceleration range 1 to 150°/s, coordinate acceleration range 1 to 400 mm/s
- function: Read the minimum joint angle
- Parameters:
joint_id: Enter joint ID (range 1-6)
- Return value:
floatAngle value
- function: Read the maximum joint angle
- Parameters:
joint_id: Enter joint ID (range 1-6)
- Return value:
floatAngle value
- function: Set minimum joint angle limit
- Parameters:
id: Enter joint ID (range 1-6)angle: Refer to the limit information of the corresponding joint in the send_angle() interface, which must not be less than the minimum value
- function: Set minimum joint angle limit
- Parameters:
id: Enter joint ID (range 1-6)angle: Refer to the limit information of the corresponding joint in the send_angle() interface, which must not be greater than the maximum value
- function:Read the full joint encoder value
- Return value: A list of length 6
- function: The current position of the calibration joint actuator is the angle zero point
- Parameters:
servo_id: 1 - 6
- function: Set break point
- Parameters:
joint_id: int. joint id 1 - 6value: int. 0 - disable, 1 - enable
- Return value: 0 : faile; 1 : success
- function: Set the robot torque state.(Release joint interface)
- Parameters:
joint_id: int. joint id 1 - 6, 254-all jointsstate: int. 0 - disable, 1 - enable
- Function: Start recording and dragging the teach point.
- Note: For optimal motion performance, the recording time should not exceed 120 seconds.
- Function: Pause dragging the teach point
- Function: Start dragging the teach point. Execute only once.
- Function: Clear the sampling point.
-
Function: Sets the Pro force control gripper offset. When executing a teaching trajectory with gripper dragging, the actual gripper angle will be reduced by offset (default is 2).
-
Parameters:
intoffset: Range -5 ~ 5, default 2
-
Function: Gets the Pro force control gripper offset. When executing a teaching trajectory with gripper dragging, the actual gripper angle will be reduced by offset (default is 2).
-
Return Value:
int, range -5 ~ 5
- Function: Query the collision detection mode
- Return value:
0: Off1: On
- Function: Set the joint collision detection mode
- Parameter:
intmode:0: Off1: On
-
Function: Sets joint collision detection
-
Parameters:
-
mode:intJoint ID, range 1 ~ 6 -
threshold_value:intCollision threshold, range 50 ~ 250, default value is 100. The smaller the value, the easier it is to trigger a collision.
-
- Function: Get the joint collision threshold
- Return value: A list of all joint collision thresholds
- Function: Set the torque compensation coefficient
- Parameter:
joint_idint: Joint ID, range 1 to 6dampingint: Range 0 ~ 1. 1 - On, 0 - Offcomp_value: Compensation value, range 0-250, default 100. Smaller values result in more difficult joint dragging.
- Function: Get torque compensation coefficients
- Return value: A list of torque compensation coefficients for all joints
- Function: Execute dynamic identification trajectory
- Parameter:
trajectory:int, range 0-1
- Function: Kinetic parameter identification
- Function: Circular arc motion (specify transit points)
- Parameter:
transpoint(list): Arc transit pointsendpoint(list): Arc endpointspeed(int): 1 to 100
- function: Read the zero encoder value
- Return value:
listThe value of the zero encoder for seven joints
- function:Get the movement speed of all joints
- Return value: unit step/s
- function:Get the movement current of all joints
- Return value: 0 ~ 5000 mA
- function:Get the movement status of all joints
- Return value: a value of 0 means no error
- Function: Set terminal IO status
- Parameters
pin_no(int): Pin number, range 1 to 2pin_signal(int): 0 / 1, 0 - low level, 1 - high level
- Return Value:
1: Completed
- Function: Get terminal IO status
- Parameters:
pin_no(int), range 1 to 2 - Return Value:
int0 / 1, 0 - low level, 1 - high level
-
Function: Reads the status of all pins at the end, including: IN1, IN2, Button 1 (right side), and Button 2 (Button 2 is closer to the emergency stop button, located on the left side).
-
Return Value:
list[int]0 / 1, 0 - low level, 1 - high level. e.g., [0, 0, 1, 0] represents button 1 being pressed.
-
Function: Set the color of the end light of the robot arm
-
Parameter:
-
r (int): 0 to 255 -
g (int): 0 to 255 -
b (int): 0 to 255
-
- function:Set Base IO Output
- Parameters:
pin_no(int) Pin port number, range 1 ~ 12pin_signal(int): 0 - low. 1 - high
- function: Read base IO input
- Parameters:
pin_no(int) pin number, range 1 ~ 12
- Return value: 0 - low. 1 - high
- Function: Set the bottom external device configuration
- Parameter:
communicate_mode(int) Range: 1 to 21: 4852: can
baud_rate(int): Baud ratetimeout: (int) Timeout period, in milliseconds
- Function: Read the bottom external device configuration
- Return value:
listreturns a list: [communication mode, baud rate, timeout]
- Function: Controls CAN devices on the bottom
- Parameters:
can_id(int) Range: 1 to 4can_data(list) List contents are in hexadecimal format, with a maximum length of 64 characters.
- Function: Controls 485 devices on the bottom
- Parameters:
data(list) List contents are in hexadecimal format, with a maximum length of 64 characters.
- function: End 485 sends data, Data length range is 1 ~ 45 bytes
- Parameters:
command(list): Data instructions in modbus format
- Return value: Modbus data list
- Function: Flash the terminal firmware
- Parameters:
main_version (str): Major and minor version numbers, e.g.1.1modified_version (int): Modified version number, range 0 to 255, default is 0
-
Function: Sets the terminal 485 baud rate, default 115200
-
Parameter:
baud_rate(int): Standard baud rate, only supports 115200 and 1000000 -
Return Value: 1
-
Function: Sets the terminal 485 timeout, default 10 seconds
-
Parameter:
timeout (int): Timeout duration, in milliseconds, range 1 ~ 10000 -
Return Value: 1
-
Function: Retrieves the terminal 485 baud rate and timeout duration
-
Return Value: (
list) A list containing baud rates and timeout durations, e.g., [baud rate, timeout duration]
- Function: Set the tool coordinate system
- Parameters:
-
coords: (list) [x, y, z, rx, ry, rz].Coord Id range x -1000 ~ 1000 y -1000 ~ 1000 z -1000 ~ 1000 rx -180 ~ 180 ry -180 ~ 180 rz -180 ~ 180
-
- Function: Get the tool coordinate system
- Return value: (
list) [x, y, z, rx, ry, rz]
- Function: Set the world coordinate system
- Parameters:
-
coords: (list) [x, y, z, rx, ry, rz].Coord Id range x -1000 ~ 1000 y -1000 ~ 1000 z -1000 ~ 1000 rx -180 ~ 180 ry -180 ~ 180 rz -180 ~ 180
-
- Function: Get the world coordinate system.
- Return value:
list[x, y, z, rx, ry, rz].
- Function: Set the base coordinate system
- Parameters:
rftype: 0 - Base coordinates (default), 1 - World coordinates.
- Function: Get the base coordinate system
- Return value: (list`) [x, y, z, rx, ry, rz].
- Function: Set the movement type
- Parameters:
move_type: 1 - moveL, 0 - moveJ.
- Function: Get the movement type
- Return value:
1- moveL0- moveJ
- Function: Set the end coordinate system
- Parameters:
end (int):0- Flange (default),1- Tool
- Function: Get the end coordinate system
- Return value:
0- Flange (default)1- Tool
- Function: Get the joint model direction
- Return value: Model direction of joints 1-6
1- Same direction as the motor0- Opposite direction from the motor
- Function: Set the joint model direction
- Parameters:
joint_id (int): 1 to 6direction (int):1- Same direction as the motor.0- Opposite direction from the motor
- Function: Get filter parameters
- Parameters:
rank:int1: Drag teach sampling filter2: Drag teach execution filter3: Joint velocity fusion filter4: Coordinate velocity fusion filter5: Drag teach sampling period
- Return value:
int1 to 255
- Function: Set filter parameters
- Parameters:
rank (int): 1 to 51: Drag teach sampling filter2: Drag teach execution filter3: Joint velocity fusion filter4: Coordinate velocity fusion filter5: Drag teach sampling period
value (int): 1 to 255
- Function: Get velocity fusion planning parameters
- Parameters:
rank_mode: 1 to 41: Fusion joint velocity2: Fusion joint acceleration3: Fusion coordinate velocity4: Fusion coordinate acceleration
- Return value:
(int): 0 to 1000
- Function: Set velocity fusion planning parameters
- Parameters:
rank_mode (int): 1 to 4value (int): 0 to 1000
- Function: Convert coordinates to angles.
- Parameters
target_coords:listA list of floating-point values for all coordinates.current_angles:listA list of floating-point values for all angles, indicating the current angles of the robot arm.
- Return Value:
listA list of floating-point values for all angles.
-
Function: Read the major and minor versions of the Pro Force Control Gripper firmware.
-
Parameter:
gripper_id(int): Gripper ID, default is 14, value range is 1 to 254.
-
Return value: (
float) Version number, x.x
-
Function: Read the modified version of the Pro Force Control Gripper firmware.
-
Parameter:
gripper_id(int): Gripper ID, default is 14, value range is 1 to 254.
-
Return value: (int) Correction version number
- Function: Set the force-controlled gripper ID.
- Parameter:
target_id(int): Range: 1 to 254.gripper_id(int): Gripper ID, default: 14, range: 1 to 254.
- Return value:
- 0 - Failure
- 1 - Success
- Function: Read the force-controlled gripper ID.
- Parameter:
gripper_id(int): Gripper ID, default: 14, range: 1 to 254.
- Return value:
intRange: 1 to 254.
- Function: Set the force-controlled gripper angle.
- Parameter:
gripper_angle(int): Gripper angle, value range 0 ~ 100.gripper_id(int) Gripper ID, default 14, value range 1 ~ 254.
- Return value:
- 0 - Failed
- 1 - Success
- Function: Read the angle of the force-controlled gripper.
- Parameter:
gripper_id(int): Gripper ID, default 14, value range 1 ~ 254.
- Return value:
int0 ~ 100
- Function: Open the force-controlled gripper.
- Parameter:
gripper_id(int): Gripper ID, default 14, value range 1 ~ 254.
- Return value:
- 0 - Failed
- 1 - Success
- Function: Close the force-controlled gripper.
- Parameter:
gripper_id(int): Gripper ID, default 14, value range 1 ~ 254.
- Return value:
- 0 - Failed
- 1 - Success
- 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 14, value range 1 ~ 254.
- Return value:
- 0 - Failed
- 1 - Success
- Function: Read the gripping status of the force-controlled gripper.
- Parameter:
gripper_id(int): Gripper ID, default 14, value range 1 ~ 254.
- Return value:
0- Moving.1- Stopped moving, no object was detected.2- Stopped moving, object was detected.3- After the object was detected, it fell.
- Function: Sets the force-controlled gripper enable state.
- Parameter:
state(bool): 0 or 1, 0 - disable, 1 - enablegripper_id(int): Gripper ID, default 14, range 1 to 254.
- Return Value:
- 0 - Failure
- 1 - Success
- Function: Set the torque of the force-controlled gripper.
- Parameter:
torque_value(int): Torque value, value range 0 ~ 100.gripper_id(int): Gripper ID, default 14, value range 1 ~ 254.
- Return value:
- 0 - Failed
- 1 - Success
- Function: Read the torque of the force-controlled gripper.
- Parameter:
gripper_id(int): Gripper ID, default 14, value range 1 ~ 254.
- Return value: (
int) 0 ~ 100
- Function: Set the force-controlled gripper speed.
- Parameter:
speed(int): Gripper movement speed, value range 1 ~ 100.gripper_id(int) Gripper ID, default 14, value range 1 ~ 254.
- Return value:
- 0 - Failed
- 1 - Success
- Function: Read the speed of the force-controlled gripper.
- Parameter:
gripper_id(int): Gripper ID, default 14, value range 1 ~ 254.
- Return value: Gripper default movement speed, range 1 ~ 100.
- Function: Set the absolute angle of the force-controlled gripper.
- Parameter:
gripper_angle(int): Gripper angle, value range 0 ~ 100.gripper_id(int) Gripper ID, default 14, value range 1 ~ 254.
- Return value:
- 0 - Failed
- 1 - Success
- Function: Sets the force-controlled gripper I/O opening angle.
- Parameter:
gripper_angle(int): Gripper angle, value range 0 to 100.gripper_id(int): Gripper ID, default 14, value range 1 to 254.
- Return Value:
- 0 - Failure
- 1 - Success
- Function: Reads the force-controlled gripper I/O opening angle.
- Parameter:
gripper_id(int): Gripper ID, default 14, value range 1 to 254.
- Return value:
int0 to 100
- Function: Sets the force-controlled gripper IO closing angle.
- Parameter:
gripper_angle(int): Gripper angle, value range 0 to 100.gripper_id(int): Gripper ID, default 14, value range 1 to 254.
- Return value:
- 0 - Failure
- 1 - Success
- Function: Read the force-controlled gripper IO closing angle.
- Parameter:
gripper_id(int): Gripper ID, default 14, value range 1 to 254.
- Return value:
int0 to 100
- Function: Set the minimum actuation force of the force-controlled gripper
- Parameter:
pressure_value(int): Actuation force value, range 0 to 254.gripper_id(int): Gripper ID, default 14, range 1 to 254.
- Return value:
- 0 - Failure
- 1 - Success
- Function: Read the minimum actuation force of the force-controlled gripper
- Parameter:
gripper_id(int): Gripper ID, default 14, range 1 to 254.
- Return value: (
int) Starting force value, range 0 to 254.
- Function: Set the gripping current of the force-controlled gripper
- Parameter:
current_value(int): Gripping current value, range 100 to 300.gripper_id(int) Gripper ID, default 14, range 1 to 254.
- Return value:
- 0 - Failure
- 1 - Success
- Function: Read the gripping current of the force-controlled gripper
- Parameter:
gripper_id(int) Gripper ID, default 14, range 1 to 254.
- Return value: (
int) Clamping current value, range 100 ~ 300.
-
Function: Sets the baud rate of the force control gripper
-
Parameters:
-
baud_rate(int): Baud rate index, range 0 ~ 1, default 0 - 115200-
0- 115200 -
1- 1000000
-
-
gripper_id(int): Gripper ID, default 14, value range 1 ~ 254.
-
-
Return Value:
-
0 - Failure
-
1 - Success
-
-
Function: Reads the baud rate of the force control gripper
-
Parameters:
gripper_id(int) Gripper ID, default 14, value range 1 ~ 254.
-
Return Value: (
int) Baud rate index, default 0 - 115200-
0- 115200 -
1- 1000000
-
-
Function: Sets the force control gripper's Modbus communication mode
-
Parameters:
-
state(int): Range 0 ~ 1.-
0: Disables Modbus communication mode, enables custom communication mode -
1: Enables Modbus communication mode, disables custom communication mode
-
-
custom_mode(bool): Custom communication mode identifier, default False (currently in Modbus mode). If the current communication mode is custom, to enable Modbus communication mode, you need to changecustom_modetoTrue. For example:set_pro_gripper_modbus(1, True) -
gripper_id(int) Gripper ID, default 14, value range 1 ~ 254.
-
-
Return value:
-
0 - Failure
-
1 - Success
-
-
Function: Initializes the gripper, restoring it to Modbus mode at 115200 baud rate.
-
Parameters:
gripper_id(int): Gripper ID, default 14, value range 1 ~ 254.
-
Return Value: (
bool)-
True- Success -
False- Failure
-