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

SanyoDenkyRS2 EtherCAT

gdalbo
2018-09-25
2018-10-02
  • gdalbo - 2018-09-25

    Hi at all, i'm using a Sanyo Denki RS2 and i have these problems:

    --- Deafault values are: EtherCAT Task 4ms - Distribuited Clock 4000us, offset 20% ---
    Task EtherCAT ** Distribuited Clock ** Notes
    2500 us 2500 us Motor spins for 5sec and then RS2 is in fault
    2000 us 3000 us Motor spins but sometimes it lost some steps
    3000 us 3000 us The same of first case
    1000 us 2000 us Motor spins but sometimes it lost some steps
    1000 us 4000 us No problems
    2000 us 8000 us No problems

    It would be fantastic if i could set "Task EtherCAT" at 1000us and "Distribuited Clock" at 2000 (max offset 35/40%).
    Jitter is +/- 250 (more or less), and it's ok for me. I must stay under 300.

    I don't understand why, for example, in the third case i have problems, but not in the fourth even if in last one Ethercat Task has "only" 1000 us...

    Someone can help me to resolve this problem? If you need other infos, i'm here.

    Best Regards,
    Gianmarco

    IMG: master.PNG

    IMG: sanyo.PNG

     
  • eschwellinger

    eschwellinger - 2018-09-25

    Hi,
    please check if the Motor runs with sync offset 20 (default is for 99% the best solution I guess)
    Are you using Raspberry Pi with rt_preempt patched Linux Kernel?
    Then use 'FrameAtTaskstart' this is from my point of view mandatory for drives... see screenshot.

    BR
    Edwin

    IMG: FrameAtTaskStart.png

     
  • gdalbo - 2018-09-26

    Hi Edwin, thank you very much for the answers.

    I'm using an OMAP-L137 board with real time preemption kernel @444 MHz.

    I'm also using "EtherCAT_MasterSoftmotion" wich alreaady has "FrameAtTaskStarts" setted "TRUE".

    Anyway with "max offset 35%/40%" i mean that for me it's ok if for some reason i have to set these values up to 35%/40%...
    I tested values on the "table" in the first post using 20%/30%/35%/40% of offset, the best result was using 35% and 2000us Ethercat Task - 2000us DClock.

    Maybe is it an hardware limit? No... i think.. because the strange thing is that with 6000us Ethercat Task and 6000us DClock and quite immediately sanyo going in fault

    EDIT:
    I've just try to use CodesysWin to control Sanyo, and problems are the same... therefore i think that it isn't an hardware limit

    Best Regards,
    Gianmarco

     
  • eschwellinger

    eschwellinger - 2018-09-26

    Hi Gianmarco,

    please check the realtime capabilities of your system.
    Taskmonitor - you should see jitter times <100us (if you do a reset by rightclick in the Ethercat Task)
    On realtime capable plc's ( ->Control Win is not possible to use!!) the Sanyo drive will work with 20% Offset (Default)
    and no matter 1000us,2000us,3000us,4000us Taskcycle(Ethercat) and DC clock should the be the same setting -> use the same sync time than the ethercat master Task is.

    BR
    Edwin

     
  • gdalbo - 2018-09-28

    Edwin Schwellinger hat geschrieben:
    Hi Gianmarco,
    please check the realtime capabilities of your system.
    Taskmonitor - you should see jitter times <100us (if you do a reset by rightclick in the Ethercat Task)
    On realtime capable plc's ( ->Control Win is not possible to use!!) the Sanyo drive will work with 20% Offset (Default)
    and no matter 1000us,2000us,3000us,4000us Taskcycle(Ethercat) and DC clock should the be the same setting -> use the same sync time than the ethercat master Task is.
    BR
    Edwin

    Hi Edwin,

    our system is ok about realtime... unfortunately it isn't very fast, infact for us and our applications it's ok a jitter <=300us

    It's ok about Task Etchercat cycle and DC too.

    In these days we have done another test:

    Our board has an Ethernet switch (MICREL) and two eth port, the first one is connected to the lan (then from codesys i can choose it through scanning devices), and the last one goes to Ethercat devices.

    Now i'm doing tests using board and Sanyo driver.
    If i send positions (sanyo is in csp), for example at 2ms ETC Task and 2ms DC, drive loses some steps, but if i remove the cable which connects board to lan, it loses less steps!
    Maybe is there some particular config to use? Is it possible that Ethercat comes into conflict with other packets in the Ethernet line? Probably this is a part of the problem...
    but i cant understand why if i set 6ms on ETC Task and 6ms on DC, driver goes instantly in fault...

    Thank you for your patience,
    Gianmarco

     
  • eschwellinger

    eschwellinger - 2018-09-30

    Hi Gianmarco,

    hm could you add your CODESYSControl.cfg file?
    Is this physically only one ethercat port then? ( switched)
    Ethercat need an own port ...

    BR
    Edwin

     
  • gdalbo - 2018-10-01

    Edwin Schwellinger hat geschrieben:
    Hi Gianmarco,
    hm could you add your CODESYSControl.cfg file?
    Is this physically only one ethercat port then? ( switched)
    Ethercat need an own port ...
    BR
    Edwin

    Hi Edwin and good Monday!

    Yes, you're right, our board has the eth switch (Micrel KSZ8893MQL) and in the main uC there is only one ethernet port.

    You can find "CODESYSControl 3.5SP12Patch3.cfg" and "CODESYSControl .cfg" in the attachments.

    Thank you very much.

    Best Regards,
    Gianmarco

    CODESYScontrol.cfg.zip [4.93 KiB]

     
  • eschwellinger

    eschwellinger - 2018-10-01

    Gooday Gianmarco,

    I need the CODESYSControl.cfg file from the plc - guess these are from CODESYS and your pc.

    Not sure if this will work if you have really only one port for doing this.
    Ethercat need to run exclusive at one port ( without other traffic)
    Is it possible to connect a USB-to-ethernet adapter and do the CODESYS connection via this.
    Than have Ethercat exclusive with the Sanyo denki connected?

    BR
    Edwin

     
  • gdalbo - 2018-10-02

    Edwin Schwellinger hat geschrieben:
    Gooday Gianmarco,
    I need the CODESYSControl.cfg file from the plc - guess these are from CODESYS and your pc.
    Not sure if this will work if you have really only one port for doing this.
    Ethercat need to run exclusive at one port ( without other traffic)
    Is it possible to connect a USB-to-ethernet adapter and do the CODESYS connection via this.
    Than have Ethercat exclusive with the Sanyo denki connected?
    BR
    Edwin

    Goodmorning Edwin,

    Sorry, here you are the right CODESYSConfig.cfg form the plc.

    Anyway, at the moment our board is directly connected to Sanyo.
    It is connected on lan only when I'm logged in to donwload code/start some process, but as soon as i did this i can disconnect it from lan.
    In this way motor loses less steps.. >gdalbo hat geschrieben:
    If i send positions (sanyo is in csp), for example at 2ms ETC Task and 2ms DC, drive loses some steps, but if i remove the cable which connects board to lan, it loses less steps!

    In the attachments you can find the right " .cfg", and a very very simple scheme of what we're using.

    P.S.: Do you know why if i set 6ms on ETC task and DC, sanyo goes in fault? Is it too much?

    Thank you so much Edwin,
    Gianmarco

    CODESYScontrol.cfg.rar [7.53 KiB]

     
  • eschwellinger

    eschwellinger - 2018-10-02

    Hi Gianmarco,

    config file is ok.
    I fear it is really a problem of this switched port you need really 2 ports.

    I could check if my drive works with 6ms - will give feedback a.s.a.p.

    BR
    Edwin

     
  • eschwellinger

    eschwellinger - 2018-10-02

    Hi,
    I agree with 6ms the drive does not run,
    seems a slave Problem I think.
    With other cycle times it works like charm.

    BR
    Edwin

     

Log in to post a comment.