零差云控关节模组
https://www.zeroerr.cn/download/eRob.html 获取零差云控最新资料
第一章 零差云控关节模组介绍
第二章 电机拆解
第三章 IGH及preempt-rt的安装
第四章 命令行读取电机的信息
第五章 机械臂的组装及控制
前言
本文中使用的linux是ubuntu18.04,双系统。IGH使用的是ethercat IGH1.5.2。
一、零差云控eRob70I的ethercat通信
图来源于零差云控关节模组使用手册。
红框内为ethercat接线方式,通过两条双绞线(共四根线)连接,线包中提供的线较短,且质量不是很好,推荐自行选购双绞线及JST接头自己做线。
由主站网卡-slave1-slave2- ···-slaveN,每台网口包括ecat in 及ecat out,ecat in连接主站网卡或上一台模组,ecat out连接下一台模组,最后一台 模组的ecat out可不连接,在使用冗余时可用。
1、IGH与单个关节模组通信
直流电源48V供电、ethercat通讯线连接、编码器电池安装并复位后,便可进行通讯测试
1、启动主站
$ sudo /etc/init.d/ethercat restart
2、查看电机的信息
$ sudo ethercat cstruct -a 0
可以看到电机的各种信息如下:
注:以下不是显示的信息,大概是这样,后期再改
static struct{
unsigned int operation_mode;
unsigned int target_position;
unsigned int digital_outputs;
unsigned int ctrl_word;
unsigned int position_actual_value;
unsigned int digital_inputs;
unsigned int status_word;
int actual_current;
unsigned int actual_speed;
int actual_torque;
}offset,offset1,offset2,offset3,offset4,offset5;
static ec_pdo_entry_info_t slave_0_pdo_entries[] = {
{
0x607a, 0x00, 32}, /* Target Position */
{
0x60fe, 0x00, 32}, /* Digital outputs */
{
0x6040, 0x00, 16}, /* Control Word */
/*TxPdo 0x1A00*/
{
0x6064, 0x00, 32}, /* Position Actual Value */
{
0x60fd, 0x00, 32}, /* Digital inputs */
{
0x6041, 0x00, 16}, /* Status Word */
};
static ec_pdo_info_t slave_0_pdos[] = {
{
0x1600, 3, slave_0_pdo_entries + 0},
{
0x1a00, 3