SOEM编译Ubuntu 22.04

下载SOEM源码

$ git clone https://github.com/OpenEtherCATsociety/SOEM.git

编译源码

进入SOEM源码目录

$ mkdir build && cd build
$ cmake ..
$ make

测试

eth1 位网卡名

$ cd test/linux/slaveinfo/
$ sudo ./slaveinfo eth1

SOEM (Simple Open EtherCAT Master)
Slaveinfo
Starting slaveinfo
ec_init on eth1 succeeded.
ec_config_init 0
DEBUG 1- wkc:1
DEBUG wkc:1
ec_config_map_group IOmap:0x55883f0208 group:0
 >Slave 1, configadr 1001, state 02
  CoE Osize:0 Isize:0
  SII Isize:0
  SII Osize:0
     ISIZE:0 0 OSIZE:0
  SM programming
    SM2 Type:3 StartAddr:1800 Flags:00000064
    SM3 Type:4 StartAddr:1c00 Flags:00000020
IOmapSize 0
Time:   14468.473 SDO slave:1 index:1c00.00 error:06020000 The object does not exist in the object directory
Time:   14468.475 SDO slave:1 index:1c00.00 error:06020000 The object does not exist in the object directory
1 slaves found and configured.
Calculated workcounter 0
Not all slaves reached safe operational state.
Slave 1 State=12 StatusCode=  1e : Invalid input configuration

Slave:1
 Name:EA7000-V2
 Output size: 0bits
 Input size: 0bits
 State: 18
 Delay: 0[ns]
 Has DC: 1
 DCParentport:0
 Activeports:1.0.0.0
 Configured address: 1001
 Man: 0000177a ID: 00000001 Rev: 00010001
 SM0 A:1000 L: 529 F:00010026 Type:1
 SM1 A:1400 L: 529 F:00010022 Type:2
 SM2 A:1800 L:   0 F:00000064 Type:3
 SM3 A:1c00 L:   0 F:00000020 Type:4
 FMMUfunc 0:1 1:2 2:3 3:0
 MBX length wr: 529 rd: 529 MBX protocols : 04
 CoE details: 23 FoE details: 00 EoE details: 00 SoE details: 00
 Ebus current: 0[mA]
 only LRD/LWR:0
End slaveinfo, close socket
End program
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值