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

EtherCAT Motor Drive seems was affected by Modbus TCP

listenyang
2013-07-08
2013-07-10
  • listenyang - 2013-07-08

    hello, all

    I am facing a problem in v3.5, there is a motor driver connect via EtherCAT slave, and one remote plc via Modbus TCP Slave.
    the EtherCAT is for driving the motor, and Modbus TCP is only I/O exchanging with CoDeSys v3.5.
    problem is:
    The motor was not running smoothly enough(rotating fastly or reversely suddenly), it seems motor was lost some pulses/step sometimes, if I delete the Modbus TCP slave, motor was runing perfectly, EtherCAT seems was affected by Modbus TCP, when I changed Modbus TCP polling cycle time, motor running better.

    can any one gives any tips? I really need some help from you guys now.

    thanks a lot.

     
  • eschwellinger

    eschwellinger - 2013-07-08

    Hi,

    please check taskdeployment tap in the plc device,
    you need to split all I/O's according to their task.
    Ethercat IO need to be updatet in the Ethercat Task context and modbus IO's need to be updated in the modbus task context.
    Set the IO update task in the plc setting to Ethercat
    and in the modbus master you need to specify the modbus task as update task for the modbus io's
    Then it will work.
    cu

     
  • listenyang - 2013-07-09

    Edwin Schwellinger hat geschrieben:
    Hi,
    please check taskdeployment tap in the plc device,
    you need to split all I/O's according to their task.
    Ethercat IO need to be updatet in the Ethercat Task context and modbus IO's need to be updated in the modbus task context.
    Set the IO update task in the plc setting to Ethercat
    and in the modbus master you need to specify the modbus task as update task for the modbus io's
    Then it will work.
    cu

    hi, Edwin
    thanks your reply.
    I had check IO updating by corresponding task, pls refer to attached picture. I had test it, it was not working as expecting.
    do I need any extra setting?

    thanks a lot...

    IMG: tasks specify.JPG

     
  • eschwellinger

    eschwellinger - 2013-07-09

    hi,

    please add the screenshot from the Task deployment

    there you should see if the IO's are used in the right Task.

    cu

    IMG: taskdeployment.png

     
  • listenyang - 2013-07-09

    Edwin Schwellinger hat geschrieben:
    hi,
    please add the screenshot from the Task deployment
    there you should see if the IO's are used in the right Task.
    cu

    hi, Edwin
    Thanks your fast reply.
    maybe you are right, i didn't find any IO specify into Modbus in task_deployment, i am just define IO to the address(like:var1 AT %QX167.0:BOOL; all the IO signals work fine), not fill into the Modbus IO mapping list. funny that they are all belong to Main_task, is it problem?
    other thing is, EtherCAT IO is:ID0~ID39, QD0~QD39, but in deployment all is 0. how come?

    thanks a lot...

    IMG: tasks deployment.JPG

     
  • eschwellinger

    eschwellinger - 2013-07-09

    yes that's the problem, you need to change your application in that way
    that you only reference the modbus io's in the modbus Task, and the ethercat io's in the ethercat Task.
    Thats the solution. The Task deployment tap give you the Feedback after compile / generate code it is updated.
    These red and blue cross show you in which task you are using the specified input/output.
    If you change that our problems should be solved.

    cu

     
  • listenyang - 2013-07-10

    Edwin Schwellinger hat geschrieben:
    yes that's the problem, you need to change your application in that way
    that you only reference the modbus io's in the modbus Task, and the ethercat io's in the ethercat Task.
    Thats the solution. The Task deployment tap give you the Feedback after compile / generate code it is updated.
    These red and blue cross show you in which task you are using the specified input/output.
    If you change that our problems should be solved.
    cu

    hi, Edwin
    Seems the problem has been solved, thanks your useful tips.

     

Log in to post a comment.