【CSEN101】How to create MOBUS RTU communication with tools for CS series robot



CS series support both MODBUS TCP and MODBUS RTU communication,which is the same as EC series. 

This post describes how to use MOSBUS RTU for tool flange port, a shielded and twisted pair RS485 cable is used. 

While in real application the robot may act as server/Client to send singal to end effector, like gripper, vacuum suckers. Here we installed DH gripper, and connected the gripper to CS series flange port with dedicated cable in advance. 

First configure the parameter on the teachpendant like picture below, from “Config” tab, selec the "Tool IO", which is under the "General" node.

Check the "Modbus RTU Mode" ,and select the "Script Mode". 

And please configure the Baund Rate, Parity and Stop bits according to the end effector (DH gripper) poperties.



After the configuration, use script to drive the GH gripper.




The script for an example

# these register addresses were get from user manual of the end effector(DH gripper) 
IO_MODE = 0x0402
INIT = 0x0100
TARGET_WIDTH = 0x0103
# these commands are get from script manual of the Elite CS series robot 
tool_serial_config(True, 115200, 0, 1,8,True)#Close the IO mode of DH gripper
tool_modbus_write_registers(1, IO_MODE, 0)#Initialize the DH gripper
tool_modbus_write_registers(1, INIT, 1)
sleep(1)
# Confugure the width of the gripper to define the open and close position of 2 fingers.
# 1000 means 1000‰,which is open the gripper completely
tool_modbus_write_registers(1, TARGET_WIDTH, 1000)
# 0 means 0‰,which is close the gripper completely
tool_modbus_write_registers(1, TARGET_WIDTH, 0)

#tool_modbus_write_registers(1, TARGET_WIDTH, num)

By the way, we have made plugins for many types of end effectors. For our cooperative ecological tools, users do not need to write their own scripts for communication.

点击显示全文
赞同0
发表评论
分享

手机扫码分享
0
332
收藏
举报
收起
登录
  • 密码登录
  • 验证码登录
还没有账号,立即注册
还没有账号,立即注册
注册
已有账号,立即登录
选择发帖板块
上传文件
举报
请选择举报理由
举报
举报说明