Igh EtherCAT Master 的使用

Igh EtherCAT Master 的使用

  • EtherCAT Mater 的启动
  • ethercat master
  • ethercat slaves
  • ethercat cstruct
    • 二级目录
      • 三级目录

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}
};

显示从站的详细信息

二级目录

三级目录

你可能感兴趣的:(Igh EtherCAT Master 的使用)