睿尔曼超轻量仿人机械臂--集成大寰夹爪

本文详细介绍了大寰PG140夹爪如何与睿尔曼机械臂集成,涉及参数、引脚定义、通过ModbusRTU通信进行控制的过程,以及提供了一个Python示例来展示如何设置电压、模式、力值和位置。
摘要由CSDN通过智能技术生成

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

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

       本文主要介绍大寰夹爪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 位置 ")

  • 13
    点赞
  • 11
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值