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

Stepper Drive with Ethercat

esave
2024-03-14
2 days ago
  • esave - 2024-03-14

    Hello everybody

    I am new into Codesys. I have a stepper driver (EM3E-556E) from Leadshine. I want to controll the stepper driver via EtherCat to a ST programm but I dont have any function block or anything that i can use. I only have the XML-File wich I loaded. With it I implemented the drive as a Ethercat slave and now I see these variables. (See picture)
    I dont know how to controll the stepper drive. And the manufacturer doesnt provide support for me.
    Can anybody help me or atleast tell me how they would do it?

     
  • esave - 2024-03-21

    The stepper supports CiA402 maybe I can use a CiA402 library to controll the stepper motor. Has anybody experience with that?

     
  • florian - 2024-03-22

    Codesys has a motion libraries (SoftMotion), but you need to buy a licence keys for them to work.

    the most basic one is SoftMotionLight.

    you just have to select your drive in the device view and add a SoftMotionLight CiA402 axis.
    then the library is added to your project.
    You can use the SML_* motion FBs and configure the axis now.

     
  • esave - 2024-03-22

    Thank you very much Florian

    The SoftMotionLight package is actually more expencive than the normal SoftMotion. What is exactly the difference?
    Does my PLC need to be compatible with SoftMotion or does this work with any PLC?

     
  • ph0010421 - 2024-03-22

    Hello
    That's certainly CiA402. I'll attach a part of the manual for my servos, but the state diagram should be the same at yours. To be sure, get one from your manufacturer.
    Look at the bits in the StatusWord to see where you are in the diagram, then twiddle the bits in the ControlWord to get you to the next step.
    Then there are other bits in the StatusWord to tell you 'InPosition' and things like that.

    From the screenshot, as it mentions only 'PositionProfile' the driver will create the motion profile.
    So you need to put a target position in here - there should be profile velocity somewhere?
    Possibly, you need to write these with SDO's?
    At the minimum, you need to write a value to 0x6081, 0x6083 and 0x6084 (velocity, accel, decel)

     
  • esave - 2024-03-28

    Hello @ph0010421

    Thanks for you answer. I dont really get the state machine that you sent me. Is that only for enabling the drive? How can i make movement? Is this with these SDO's? What is SDO exactly?
    Sorry but i am a little lost (:|)

     
  • esave - 2 days ago

    I bought and installed SoftMotion Light now. When I try to add a SoftMotion Light Axis to my stepper drive and I go online it shows: "The license is missing or invalid". See picture
    What am I doing wrong?

    This is the right way right? First add your EtherCat XML-File from your stepper driver and then add the SoftMotion Light axis right?

    Thanks for your help

    esave

     

Log in to post a comment.