【睿尔曼-RealMan】睿尔曼超轻量仿人机械臂--集成PG140夹爪

l 2024-03-28

一、末端执行器集成生态库简介

       睿尔曼系列机械臂有着丰富的外设接口,可十分便捷的与其他执行器相结合。如:二指夹爪、五指灵巧手、吸盘等。

       本文主要介绍PG140夹爪与机械臂集成的使用。

二、大寰夹爪参数介绍

2.1夹爪概况

PGI-140 夹爪为工业型平行夹爪,具有驱控一体(集成工业总线通讯)、掉电自锁、抓

取掉落检测、高防护等级、适配多种机器人等特点。PGI-140 夹爪的具体参数如图: 

2.2 引脚定义

夹爪航插线共引出 8 根线,夹爪本体上的引脚定义和具体引脚文字说明如图所示。 

机械臂末端外接工具接口通过 1 个 6 芯航插对外连接,航插引脚及定义如下所示。

我司提供航插线连接机械臂末端和夹爪。

三、夹爪控制

夹爪与机械臂之间通过Modbus RTU通信。机械臂可以通过Modbus RTU协议向夹爪发送命令和控制信息,并从夹爪接收状态和数据。机械臂末端16 芯线可对外输出 12V/24V 电源,为夹爪供电,末端电源输出电气特性如下表所示:

注意:在通过控制器电源为外部设备进行供电时,参考上表电流参数限制,以防过载,烧毁控制器。

 

控制流程:

1)发送命令到服务器

def send_cmd(client, cmd_6axis):

    client.send(cmd_6axis.encode('utf-8'))

2)配置机械臂IP地址和端口号

ip = '192.168.1.18' # 服务器的IP地址

port_no = 8080 # 服务器的端口号

3)建立socket连接

client = socket.socket(socket.AF_INET, socket.SOCK_STREAM)

client.connect((ip, port_no))

4)设置工具端电源输出24V

point6_00 = '{"command":"set_tool_voltage","voltage_type":3}\r\n'

_ = send_cmd(client, cmd_6axis=point6_00)

5)配置通讯端口 ModbusRTU 模式

point6_00 = '{"command":"set_modbus_mode","port":1,"baudrate":115200,"timeout ":2}\r\n'

6)初始化夹爪

point6_00='{"command":"write_single_register","port":1,"address":256,"data":1,"device":1}\r\n'

7)设置力值

point6_00 = '{"command":"write_single_register","port":1,"address":257,"data":30, "device":1}\r\n'

8)设置夹爪位置为1000

point6_00 = '{"command":"write_single_register","port":1,"address":259,"data":1000, "device":1}\r\n'

四。代码示例

import socket

import time

def send_cmd(client, cmd_6axis):

    client.send(cmd_6axis.encode('utf-8'))

    # Optional: Receive a response from the server

    # _ = client.recv(1024).decode()

    return True

# IP and port configuration

ip = '192.168.1.18'

port_no = 8080

# Create a socket and connect to the server

client = socket.socket(socket.AF_INET, socket.SOCK_STREAM)

client.connect((ip, port_no))

print("机械臂第一次连接", ip)

time.sleep(3)

point6_00 = '{"command":"set_tool_voltage","voltage_type":3}\r\n'

_ = send_cmd(client, cmd_6axis=point6_00)

time.sleep(3)

print("//设置工具端电源输出 24V")

point6_00 = '{"command":"set_modbus_mode","port":1,"baudrate":115200,"timeout ":2}\r\n'

_ = send_cmd(client, cmd_6axis=point6_00)

time.sleep(2)

print("配置通讯端口 ModbusRTU 模式")

point6_00 = '{"command":"write_single_register","port":1,"address":256,"data":1, "device":1}\r\n'

_ = send_cmd(client, cmd_6axis=point6_00)

time.sleep(2)

print(" 执行初始化成功")

point6_00 = '{"command":"write_single_register","port":1,"address":257,"data":30, "device":1}\r\n'

_ = send_cmd(client, cmd_6axis=point6_00)

time.sleep(2)

print(" 设置30% 力值 (写操作)")

while True:

    point6_00 = '{"command":"write_single_register","port":1,"address":259,"data":500, "device":1}\r\n'

    _ = send_cmd(client, cmd_6axis=point6_00)

    time.sleep(3)

    print("设置 500 位置 ")

    point6_00 = '{"command":"write_single_register","port":1,"address":259,"data":1000, "device":1}\r\n'

    _ = send_cmd(client, cmd_6axis=point6_00)

    time.sleep(3)

    print("设置 1000 位置 ")

    point6_00 = '{"command":"write_single_register","port":1,"address":259,"data":200, "device":1}\r\n'

    _ = send_cmd(client, cmd_6axis=point6_00)

    time.sleep(3)

    print("设置 200 位置 ")

 

 

 

 

 

 

 

 

 

 

 

附件下载

0 条评论

关于作者

l

这家伙很懒,什么也没写!

选择发帖板块
选择发帖板块