Ethercat FieldBus Lost Synchronicity

Runtime
GiorgioT
2016-12-15
2018-12-02
  • GiorgioT

    GiorgioT - 2016-12-15

    Hi,
    I use a BBB with a RT kernel to control a servomotor through Ethercat.
    I use the SMC_FollowPosition block since new position values arrive in real-time each Ts milliseconds. (Ts can be 100ms or 1sec).
    I tried with MoveAbsolute and MoveRelative blocks as well with the same result.

    Unfortunately i always get this error and the motor stops spinning.
    I called the technical support of the driver's company and they told me to increase the sync offset up to 50% but i have the same error.

    How could i solve the problem?

    Thanks in advance.

    IMG: Screenshot (49).png

     
  • optymalizacja2

    optymalizacja2 - 2016-12-16

    The first thing that comes to my mind is to remove the etherCAT task from the visu task where it is duplicated...

     
  • GiorgioT

    GiorgioT - 2016-12-16

    Hi,

    Thanks, that was just an oversight during some tests. In fact the error is still present despite the fact i removed the ethercat task from the visu task.

    What could be the problem ??

    Thanks.

    IMG: Screenshot (56).png

     
  • Anonymous - 2016-12-16

    Originally created by: scott_cunningham

    Check your task execution time - average and max values. Your task cycle time could be too fast. I had a job where I used a 2ms Etherxat task time. Most of the time the task time executed in just under 2 ms. But occasionally it executes in 2.1 ms. Lost sync

     
  • GiorgioT

    GiorgioT - 2016-12-16

    Hi, Thanks for you fast reply.

    Here are some results:

    with a Ethercat task of 4ms and 25% sync offset i get this: Max Cycle Time : 1830 microsec but an unreasonable Jitter Max: 6029 microsec e Min: -3531 microsec as you can see in the second picture.

    Then with an Ethercat task of 8ms and 50% sync offset i get: Max Cycle Time : 1732 microsec but an unreasonable Jitter Max: 6675 microsec e Min: -6685 microsec as you can see in the first picture.

    This Jitter values are likely to be the problem !!!! I've never seen Jitters so high. What can be the problem? I used 2 BBB with the same results.

    I use this kernel:

    Zitat:
    Linux beaglebone 4.4.14-bone-rt-r11 #1 PREEMPT RT Fri Jul 1 01:43:25 UTC 2016 armv7l GNU/Linux

    I tried with the OS installed on SD as well on the eMMC.

    EDIT: I also tried with a raspberry Pi 2 Model B

    Please help.

    Thank you

    IMG: Screenshot (62).png

    IMG: Screenshot (59).png

     
  • GiorgioT

    GiorgioT - 2016-12-16

    Hi,
    I solved my own problem. I set ethercat task back to 4ms with 30% sync offset. Then i set the priority of the Visu task to 31 whilst the ethercat task priority was set to 0. Now the jitter is between +- 150 microsec and the lost sync error is gone.

    Thank you for pointing me to the right direction.

     
  • Anonymous - 2016-12-16

    Originally created by: scott_cunningham

    Great to hear. Sorry I forgot to mention the task priority!!!

     
  • cookiy

    cookiy - 2018-12-02

    Dear sir:
    I have the same question with you. I also use a codesys with 2 hours and now when I set the sync to 4ms and offset 20%, it gets a error of fieldbus lost synchronicity when I try to control 5 real motor after about half ah hour. which is amzing is the drivers do not have any error about this,just error occured in codesys.
    I try to fiind the jitter of the ethercat task, about 1300+us, I think the jitter is too large so lead the error occuring,then I changed the offset with different values and find a best value is -20% with the jitter within 150us. And I think i get the real question about this error,but after about half an hour, i also got the same error and i find the jitter becomes more and more big.
    I really do not know the interal reason of the error "fieldbus lost synchronicity" and if it comes up with the task jitters.
    Do you got the answer of this ?
    Thanks for reading!

     
  • eschwellinger

    eschwellinger - 2018-12-02

    Hi,
    A rt_preempt patched Linux kernel is mandatory and 1:1 connected ethercat slaves...
    BR
    Edwin

     

Log in to post a comment.