Igh EtherCAT Master 的使用

EtherCAT Mater 的启动

输入命令行:/etc/init.d/ethercat start

ethercat master

Master0
  Phase: Idle
  Active: no
  Slaves: 1
  Ethernet devices:
    Main: b0:0c:d1:30:b6:fb (attached)
      Link: UP
      Tx frames:   332406
      Tx bytes:    19947112
      Rx frames:   332405
      Rx bytes:    19947052
      Tx errors:   0
      Tx frame rate [1/s]:    243    244    244
      Tx rate [KByte/s]:     14.2   14.3   14.3
      Rx frame rate [1/s]:    243    244    244
      Rx rate [KByte/s]:     14.2   14.3   14.3
    Common:
      Tx frames:   332406
      Tx bytes:    19947112
      Rx frames:   332405
      Rx bytes:    19947052
      Lost frames: 0
      Tx frame rate [1/s]:    243    244    244
      Tx rate [KByte/s]:     14.2   14.3   14.3
      Rx frame rate [1/s]:    243    244    244
      Rx rate [KByte/s]:     14.2   14.3   14.3
      Loss rate [1/s]:          0      0      0
      Frame loss [%]:         0.0    0.0    0.0
  Distributed clocks:
    Reference clock:   Slave 0
    DC reference time: 0
    Application time:  0
                       2000-01-01 00:00:00.000000000

显示主站信息,包括状态,网卡信息等等

ethercat slaves

0  0:0  PREOP  +  ET-Cia402-SPI

显示主站的简略信息

ethercat cstruct

/* Master 0, Slave 0, "ET-Cia402-SPI"
 * Vendor ID:       0x00000153
 * Product code:    0x36483054
 * Revision number: 0x00020211
 */

ec_pdo_entry_info_t slave_0_pdo_entries[] = {
    {0x6040, 0x00, 16},
    {0x60ff, 0x00, 32},
    {0x6041, 0x00, 16},
    {0x6064, 0x00, 32},
};

ec_pdo_info_t slave_0_pdos[] = {
    {0x1602, 2, slave_0_pdo_entries + 0},
    {0x1a02, 2, slave_0_pdo_entries + 2},
};

ec_sync_info_t slave_0_syncs[] = {
    {0, EC_DIR_OUTPUT, 0, NULL, EC_WD_DISABLE},
    {1, EC_DIR_INPUT, 0, NULL, EC_WD_DISABLE},
    {2, EC_DIR_OUTPUT, 1, slave_0_pdos + 0, EC_WD_ENABLE},
    {3, EC_DIR_INPUT, 1, slave_0_pdos + 1, EC_WD_DISABLE},
    {0xff}
};

显示从站的详细信息

二级目录

三级目录

  • 1
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值