This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

3359 ice v2做ethercat问题

Other Parts Discussed in Thread: SYSBIOS, AM3359, AM3357

hi all,

我现在用3359 ice v2做ethercat从站,

使用的是,sysbios_ind_sdk_02.01.02.02

当ethercat主站使用的是倍福的TwinCAT的时候,3359作为从站测试效果良好,

但是当主站使用的是IGH ethercat master for linux(在bbb上跑的),

会出现一个问题,在预运行状态下,3359作为从站可以在任意位置加入到从站总线上,且可以由INIT状态切换到预运行状态,

但是,当要把3359由预运行状态切换到OP状态的时候(会切换失败),3359作为从站会把主站发送的数据帧全部吞噬掉(主站发送的数据帧经过3359后,数据帧再也不反回)。

请问这是什么原因?

谢谢。

jason

  • TwinCAT没有类似问题么?这个会不会和你主站的协议有些关系。

  • TwinCAT可以正常的运行。

    我的iGH是在xenomai+linux环境下跑的,运行其他的型号的从站都没有问题,唯独运行3359作为从站出现了上述问题。

  • 问下你的Linux+xenomai是用的谁家的主站协议栈?要看他发出的frame的机制是否和从站不匹配,需要调整。

  • 你好,

    我用的是iGH ethercat master for linux,只不过在linux我打了xenoma补丁,这个主站协议站对其他公司比如倍福的从站支持良好,他发出的帧可以使3359由init转化为预运行状态,说明他的frame的机制是匹配的。

    具体的执行过程是这样的:

    加载igh开发的ethercat master for linux之后,所有从站都会由init状态转化为预运行状态。

    但是当我运行,配置代码把从站转化为op状态的时候,3359好像黑洞似的,所有通往他的帧都被他吸收了。

  • iGH这个主站我没有听说过,这边接触的都是TwinCAT或者Acontics的主站。

    有没有比对过AM3359在连接2个不同主站的log信息。

  • 谢谢楼的主回复 EC MASTER 2.7的文档 果然讲的不是很清楚, 现在用你给的文档里的链接下载了1.1.0.8sdk EC master2.9 手上有两块ICE 3359 一个做主一个做从 主站程序还是有些问题有些地方没有配置好 007282 : ===================== 007282 : Start EtherCAT Master 007282 : ===================== 007312 : ecatSetMasterStateEx() Error 0x9811002d in McSm state 'START' for requested state 'START' 007312 : Scan bus mismatch for the first slave on the bus! BUS VendorId: ---- (0x0); ProductCode: Unknown (0x0). 007312 : CFG/BUS VendorId: Beckhoff Automation GmbH (0x2) / ---- (0x0); ProductCode: EK1100 (0x44c2c52) / Unknown (0x0) 007312 : Scan bus mismatch for the first slave on the bus! BUS VendorId: ---- (0x0); ProductCode: Unknown (0x0). 007312 : CFG/BUS VendorId: Beckhoff Automation GmbH (0x2) / ---- (0x0); ProductCode: EK1100 (0x44c2c52) / Unknown (0x0) 从站程序用twincat测试 可以查找到,但并不能控制LED 好纠结,求助楼主和ti大牛,提供些帮助,谢过LOL
  • IGH 主站的兼容性不是很好,我们的industrial sdk的release note中有提到和IGH主站不匹配的地方,您可以对照下。

    谢谢!

  • 是不是xml有问题?

  • 你好,我在勘误表上看到如下:

    Slaves do not go to OP state in DC mode when TI ESC is reference slave in DC Slave Mode

    • Issue/ Failure Description or state

    – SDOCM00121174: Slaves do not go to OP state in DC mode when TI ESC is reference slave in DC slave mode (IgH or Acontis EtherCAT master)

    • Conditions in which failures occur

    – DC Slave mode is configured at master (IgH or Acontis EtherCAT master) and TI ESC is reference slave

    • Root cause

    – Firmware used System Time Delay (non-zero) to enable drift compensation loop at slave

    • Workaround

    – Set non-zero System Time Delay(0x928:0x92b) value for reference slave – say 1ns

    首先,我用IGH并没有设置从站为DC模式,但是还是切换不到op模式。

    其次在DC模式下,就算我不把3359 slave设置成参考时钟,也会无法切换到OP。

  • xml 是要根据主站的要求生成的,这边可以识别出从站,但是不能正确切换状态,可以看看xml中对从站属性的配置部分是否正确

    建议您看看igh的文档了,这部分我这边也不大懂了。

  • hi yaoming,

    嗯,感谢你的回复,

    我这边IGH对于其他公司出的从站是可以通过测试的,

    3359比较特殊,是pru编写的。

    我呢现在想了解这个PRU与其他公司的存在比如倍福的从站芯片,再设计功能方面有哪些不同之处,

    我想,了解了这些不同之处,可能更有利于处理这个错误。

    再次表示感谢。

  • 你好,我把问题描述了一下,你能让他们pru ethercat开发技术人员看一下么?

    下面是我的描述的问题。

    3359 ice v2 get a problem when run IGH ethercat for linux

    i am install igh ethercat master for linux 1.5.2 on my beagbone black with xenomai real-time operating system.

    now two ethercat slaves were link with my BBB, and one is 3359 icev2(asysbios_ind_sdk_02.01.02.02),another is xmc4800(infineon).

    when i insmod ec_master.ko & ec_generic.ko , now two slaves will go to PREOP state.

    here is more infomation:
    root@beaglebone:bin#./ethercat slave
    0 0:0 PREOP + XMC4800_Relax_Generic_EtherCat_Slave
    1 0:1 PREOP + AM3357/AM3359 (PRU-ICSS v1.0

    when i run my application, DC Slave mode is configured at master (IgH) and xmc4800 is reference slave.

    goes wrong while going to OP state :

    ethercat master display some errors on terminal,for example


    [ 2116.441292] EtherCAT ERROR 0: Failed to receive delay measuring datagram on main link: Datagram timed out.
    [ 2116.693289] EtherCAT ERROR 0: Failed to receive address clearing datagram on main link: Datagram timed out.

    and, when i execute command "./ethercat slave' ,nothing i can get:


    root@beaglebone:bin#./ethercat slave
    root@beaglebone:bin#

    and ,now two slaves still in PREOP state.
    so ,what should i do.

    note:

    3359 slave work well when the ethercat master is TwinCAT.

    when 3359 is not on ethertcat slave bus ,IGH work well.

  • 1. 建议您把这个问题也发到e2e.ti.com, 回头把链接也贴到这里,我会内部帮您去推动下。

    2. 如果不是DC的问题,那么我这边有客户也用的是IGH,都是OK的,您可能需要再自己查下。

    3. 即使是DC的问题,最新的sdk中也已经解决了问题,我也有客户已经准备量产了,供您参考。

    谢谢!

  • hi Yaoming 

    我发现我的这个问题在勘误表里出现了:

    Rx Time Port1 (0x904) time stamping not done correctly when write to 0x900 is done cyclically

    • Issue/ Failure Description or state

    – SDOCM00108541: Rx Time Port1 (0x904) time stamping is missed when write (BWR) to 0x900 is done cyclically

    • Conditions in which failures occur

    – When EtherCAT master cyclically write to 0x900 register and two ports of EtherCAT slave is active or randomly for first write 0x900 after a link up event

    • Root cause

    – Parsing algorithm was not scheduled on time due to cycle budget crunch in firmware and this resulted in RX L2 FIFO overflow and parsing errors

    – Parsing algorithm and firmware optimizations were done to fix overflow

    – Parsing algorithm had a bug : which missed to detect write to 0x900 when datagram address (ado) word is split into two banks of L2 FIFO as separate bytes

    但是我还是对这个问题感觉无从下手,

    感谢你的回复。

    下面是我在e2e.ti.com发的帖子的连接,谢谢。

    http://e2e.ti.com/support/arm/sitara_arm/f/791/p/541398/1973777#1973777

  • 您应该看的也是 http://processors.wiki.ti.com/images/f/fc/EtherCAT_Slave_Errata_PINDSW_01_00_00.pdf

    这个文档中说明,这个问题已经在最新的sdk中解决了,您可以把EtherCAT slave升级到最新的sdk,再看看。

  • hi Yaoming,

    非常感谢你再次回复。

    我用的工程如下所示:

    sysbios_ind_sdk_02.01.02.02\sdk\protocols\ethercat_slave\ecat_appl

    这里对应的版本是02.01.02.02,应该是最新的了吧。

    祝好。

  • 从官网上看,这个应该是最新的工业SDK。

  • jason Lee5 说:

    hi Yaoming,

    非常感谢你再次回复。

    我用的工程如下所示:

    sysbios_ind_sdk_02.01.02.02\sdk\protocols\ethercat_slave\ecat_appl

    这里对应的版本是02.01.02.02,应该是最新的了吧。

    祝好。

    是的,这个是最新的sdk,您说的问题应该是没有的。

    您要不要再查查igh的代码,会不会是xml什么的小问题没有搞定。

  • 您好,

    我这个问题一直存在的,现在还没有解决,而且我在e2e.ti.com发的问题也没有能得到回复,

    IGH我也检测过了,没啥问题,对于其他的存在完全可以完成任务。

    您看,还有其他的方式查看下原因么?

    谢谢。

     

  • Hi, all

    我遇到的问题跟jasson Lee5完全一样。

    主站:Beaglebone Black,Linux+xenomai+IGH1.5.2;

    从站:ICE3359v2,SDK2.1.2.2;

    程序:C:\ti\sysbios_ind_sdk_02.01.02.02\sdk\protocols\ethercat_slave\ecat_appl\;

    从站ECAT协议栈是Full版本。

    TwinCAT可以与ICE3359v2通讯,DC模式下带电机转都没有问题。

    IGH带另外两个公司的伺服也没有问题,就是带ICE3359v2时无法切换到OP状态。

    这是否会是一个共性问题?现在有这个问题的解决方法不?

  • Hi Mr LV

    建议抓取一份出问题的LOG发到论坛这里,我们可能需要和正常的比较一下,谢谢!

  • 您好。请查收附件。

    错误提示:EtherCAT ERROR 0-0: Failed to receive state datagram: Datagram timed out.

    是状态切换时的timeout么。

    谢谢

  • 通过抓包,发现从站在PreOP状态时时有返回信息:AL Status (0x130): 0x0002, Al Status: PREOP。

    但在SafeOP时为何从站就不返回AL Stastus信息呢。

    这时,主站无法收到从站的Al Status: SAFEOP报文,就报错提示TIME OUT!!!当然也就无法切换到下一个状态OP。

    附1:从站在PreOP时可以发送ALStatus的状态报文;

    Frame 7956: 60 bytes on wire (480 bits), 60 bytes captured (480 bits) on interface 0
    Ethernet II, Src: 86:eb:18:94:8f:b4 (86:eb:18:94:8f:b4), Dst: Broadcast (ff:ff:ff:ff:ff:ff)
    EtherCAT frame header
    EtherCAT datagram(s): 2 Cmds, 'LRW': len 12, 'FPRD': len 2
    EtherCAT datagram: Cmd: 'LRW' (12), Len: 12, Addr 0x0, Cnt 0
    Header
    Data: 000000000000000000000000
    Working Cnt: 0
    EtherCAT datagram: Cmd: 'FPRD' (4), Len: 2, Adp 0x1, Ado 0x130, Cnt 1
    Header
    AL Status (0x130): 0x0002, Al Status: PREOP
    Working Cnt: 1
    Pad bytes: 000000000000

    附2:主站打印的TIME OUT串口信息

    [ 2283.278974] EtherCAT 0: Starting EtherCAT-OP thread.
    [ 2283.286814] EtherCAT WARNING 0: 1 datagram TIMED OUT!
    [ 2283.292321] EtherCAT WARNING 0: No app_time received up to now, but master already active.
    [ 2283.390078] EtherCAT 0: Domain 0: Working counter changed to 3/3.
    [ 2283.420545] EtherCAT ERROR 0-0: Failed to receive state checking datagram: Datagram timed out.
    [ 2283.435716] EtherCAT 0: 0 slave(s) responding on main device.
    [ 2284.288088] EtherCAT WARNING 0: 165 datagrams TIMED OUT!
    [ 2284.294095] EtherCAT WARNING: Datagram de08734c (domain0-0-main) was SKIPPED 883 times.
    [ 2284.393054] EtherCAT 0: Domain 0: 3 working counter changes - now 0/3.
    [ 2285.287084] EtherCAT WARNING 0: 187 datagrams TIMED OUT!
    [ 2285.295067] EtherCAT WARNING: Datagram de08734c (domain0-0-main) was SKIPPED 982 times.

    附件3:wireshark报文

    ICE3359在PreOP时能返回AlStatus状态_但在SafeOP时却不行.zip
  • 这里有2点是我想陈诉:

    1、是的,这个问题一直存在着,我虽然在论坛反应,开发人员好像并没有重视此问题。

    2、这个抓包可能看不出来什么问题,个人感觉主要原因如下:

    一旦切换状态之后,ECAT数据帧可以发送到3359,但是3359好像黑洞似的吸收掉了,至于在哪里吸收掉了,需要在3359内部映射的那段代码上找原因吧。

  • 谢谢您的分析!

    确实像黑洞一样,事实是3359确实已经在SafeOP状态了。

    3359收到了主站给的AlCtrl SafeOP请求,自己的状态也切换到SafeOP了,但就是不给主站反馈自己的SafeOP状态。

  • 吕工,

    谢谢抓包分析,这个不排除和PRU的处理机制有关,我这边也在走查Industry SDK的代码,暂时没有发现问题。

    为加快问题定位,建议您在E2E论坛上发个帖子,我这边找美国开发人员一起定位下这个问题

  • 您好。

    已经有同行在E2E论坛上发了帖子。

    为了聚焦问题,我就直接在后面补充了我的问题,链接:

    https://e2e.ti.com/support/arm/sitara_arm/f/791/p/541398/2086199#2086199

    内容如下:

    Hi, all.
    I has encountered the similar problem.

    ethercat master: Beaglebone black, IGH1.5.2, Linux+xenomai;
    ethercat slave: ICE3359v2, SDK2.1.2.2;

    project:C:\ti\sysbios_ind_sdk_02.01.02.02\sdk\protocols\ethercat_slave\ecat_appl


    IGH1.5.2 could connect two servos from different corporations, and make them working on CSP or CSV mode.

    However, IGH1.5.2 could not change ICE3359v2 to OP state.

    when I use wireshark to capture datagram from ICE3359v2, I found there is no response datagrams in SafeOP state, but could get AlStatus datagrams in PreOP state.

    Addition Mentions: The TI_LED project works wells(TIESC_APPLICATION=1,CiA402_Device=0), but the CiA402 project(TIESC_APPLICATION=0,CiA402_Device=1) does cause the problem above.

    why?

    Thanks.

  • 这个就是我之前发的帖子,

    半年了吧,也没得到回复。

  • @jason Lee5

    我们已经在联系美国design team,会尽快给您答复