Welcome to our new forum
All users of the legacy CODESYS Forums, please create a new account at account.codesys.com. But make sure to use the same E-Mail address as in the old Forum. Then your posts will be matched. Close

Raspiberrypi Ethercat Softmotion Communication Error(EL2521)

audi0615
2018-02-11
2018-02-13
  • audi0615 - 2018-02-11

    Hi.

    I'm new to ethercat softmotion (especially with raspberrypi), I'm trying to run a stepper motor with Beckhoff EK1100 + EL2521 without success.

    It seems there is a communication error or sync error, please refer to attached screenshots below.

    I've made some search on this issue and found following topic which says EL2521 driver works without any real time patch for Pi.
    However in my case it does not work.
    l viewtopic.php?f=21&t=8560 l

    Any help would be appreciated.

    Best Regards.

    Y.M. Kim

    IMG: 2018

    IMG: 2018

    IMG: 2018

    IMG: 2018

     
  • eschwellinger

    eschwellinger - 2018-02-11

    Hi,
    did you check the if workaround works for you(from the link you have posted)?

    Because to have dc enabled is mandotary for Softmotion, but for EL2521 on Raspberry PI or Control Win,
    EL2521 would work without... so you need to increase the syncwindow a lot.
    BR
    Edwin

    IMG: SyncWindow.jpg

    IMG: EL2521.jpg

     
  • audi0615 - 2018-02-11

    Hi Mr. Edwin

    Thank you a lot .
    I tried the solution in the post and unfortunately it does not work for me.
    Followings are my settings, is thare any other setting i need to change from the default? Please advise.

    <ethercat master=""></ethercat>

    <ek1100></ek1100>

    <el2521></el2521>

    <axis></axis>

    Best Regards.

    Y.M. Kim

    IMG: Ethercat Master.png

    IMG: EK1100.png

    IMG: EL2521.png

    IMG: SM_Drive_EL2521.png

     
  • eschwellinger

    eschwellinger - 2018-02-11

    Hi,
    sync offset back to 20(default) in the master
    Could you please give a screenshot from taskmonitor for the jitter usage of the Motion/ethercat Task?
    BR
    Edwin

     
  • audi0615 - 2018-02-11

    Dear Edwin

    the sync offset is now 20 again, thanks.

    following is the monitoring screen from the project. EtherCAT_Mater.EtherCAT_Task is located under MainTask.

    MODIFIED:

    the EtherCAT_Master.EtherCAT_Task has been seperated from MainTask to another task with interval of 4000 mico second, here is the monitoring screen.

    Best Regards.

    Y.M. Kim

    IMG: 2018

    IMG: 2018

     
  • eschwellinger

    eschwellinger - 2018-02-12

    Hi,
    could you reset the line by rightclick...

    BR
    Edwin

    IMG: reset.jpg

     
  • audi0615 - 2018-02-13

    Thanks for your response, Edwin.

    Now it seems the communication issue has been solved after patching Preempt_RT to RaspberryPi as screenshot below.
    However another issue i'm facing is... MC_... function blocks are not working (MC_POWER, MC_JOG...)

    MC_POWER.status is still FALSE and busy is TRUE after MC_POWER is enabled.

    I would appreciate your help.

    Best Regards.

    Y.M.Kim

    IMG: 2018

    IMG: 2018

     
  • eschwellinger

    eschwellinger - 2018-02-13

    Hi Kim,
    if you call the motion fb's in the ethercat Task it will work.

    BR
    Edwin

     
  • audi0615 - 2018-02-13

    Thank you for your fast response.

    Unfortunately, it seems the proposed solution does not work for me.

    Still, "status" is FALSE and "busy" is TRUE in MC_POWER.

    I was just wondering if this issue has to do with axis type, is it correct to use a name of "AXIS_REF_ETC_EL2521" as an input axis of MC_POWER?

    Codesys is saying it has to be "AXIS_REF_SM3" axis.

    Best Regards.

    Y.M. Kim

    IMG: 2018

    IMG: 2018

     
  • audi0615 - 2018-02-13

    Hi. Edwin

    I was stupid to put MC_POWER in CASE statement, which resulted in calling the FB only for a one cycle.

    After putting MC_POWER FB outside the CASE statement, everything is OK.

    Thanks for your help.

     

Log in to post a comment.